Numscript Library

Get a numscript

Changed on

Retrieves a numscript by name from a ledger. Use the version query parameter to get a specific semver version. If omitted or empty, the latest version is returned.

get/v3/{ledgerName}/numscripts/{name}

Request

  • Base URL
    http://localhost:9000
  • URL
    http://localhost:9000/v3/{ledgerName}/numscripts/{name}
  • Auth
    • HTTP bearer
    • or none

Path parameters

ledgerNamestring required

Name of the ledger

namestring required

Name of the numscript, URL-encoded as one path segment. Decoded exactly once.

Query parameters

versionstring

Semver version to retrieve (e.g. "1.0.0"). If omitted or empty, the latest version is returned.

Headers

X-Consistency'linearizable' | 'stale'

Read consistency. linearizable (the default) runs a Raft ReadIndex barrier and waits for the receiving node to apply up to it. stale serves the read from the receiving node's own store, with no barrier and no forwarding to the leader, so the answer may lag the leader. Matching ignores case and surrounding whitespace. An unknown value, or a repeated or comma-joined header, returns 400 INVALID_REQUEST on every /v3 route, writes included; a valid value has no effect on writes. The gRPC equivalent is the x-consistency request metadata.

Response

Numscript retrieved successfully

Example response

{
  "data": {
    "version": "1.0.0"
  }
}

Changes

    • info

      api operation id getNumscript removed and replaced with v3GetNumscript

    • info

      the endpoint scheme security BearerAuth was added to the API

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status