---
title: "List numscript versions"
method: GET
path: "/v3/{ledgerName}/numscripts/{name}/versions"
tags: ["Numscript Library"]
---

# List numscript versions

`GET /v3/{ledgerName}/numscripts/{name}/versions`

## Request

- Base URL: `http://localhost:9000`
- URL: `http://localhost:9000/v3/{ledgerName}/numscripts/{name}/versions`
- Auth: one of:
  - HTTP bearer
  - none

Returns the numscript's history: its current latest (greatest stored
semver) and every stored version, highest-first.

## Path parameters

- `ledgerName` string, required
- `name` string, required

## Headers

- `X-Consistency` 'linearizable' | 'stale'

## Response `200`

Numscript versions retrieved successfully

- ListNumscriptVersionsResponse
  - `data` object, required
    - `latestVersion` string: The current latest — the greatest stored semver
    - `versions` NumscriptVersionEntry[], nullable: Every stored version, highest-first
      - `version` string, required: Stored semver version string (e.g. "1.0.0")
      - `createdAt` string, date-time: When this version was stored (ISO 8601 format)

## Other responses

- `400`: Bad request
- `401`: Authentication required (missing or invalid JWT token)
- `403`: Insufficient permissions (missing required scope)
- `404`: Not found
- `405`: Method not allowed
- `500`: Internal server error
- `503`: Service unavailable — the server cannot serve the request right now but an immediate retry can succeed. The `errorCode` field discriminates the cause: `NO_LEADER` (no elected Raft leader), `CACHE_HORIZON_EXCEEDED` (admission snapshot too old, retry against a fresh one), `UNAVAILABLE` (an internal forwarded stream was torn down mid-transfer), or the reason of any domain error of the unavailable kind (e.g. `INDEX_BUILDING`).

## Changes

- **2026-11-03** `f5e817eca038`: 1 info
  - api operation id `listNumscriptVersions` removed and replaced with `v3ListNumscriptVersions`
- **2026-10-08** `3da23d327316`: 3 info
  - the endpoint scheme security `BearerAuth` was added to the API
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
- **2026-10-08** `b3ee1959d86a`: 1 info
  - added the new optional `header` request parameter `X-Consistency`
- **2026-09-30** `b747efd5cd77`: 1 info
  - endpoint added
- **2026-09-29** `6ff73ac9a6bd`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/formancehq/apis/ledger-api/changes/v3/:ledgerName/numscripts/:name/versions/get.md)

---

[API](https://skmtc.dev/formancehq/apis/ledger-api.md) - [All operations](https://skmtc.dev/formancehq/apis/ledger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/formancehq/apis/ledger-api/revisions/f5e817eca038?raw)
