Numscript Library

Save a numscript

Changed on

Appends an immutable version to a ledger's numscript library. The version field must be an explicit full semver (e.g. "1.0.0"); it creates a new version and fails if that version already exists. The per-name latest is always the greatest stored semver.

put/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.

Request body

contentstring required

The numscript source code

versionstring required

Explicit full semver (e.g. "1.0.0"). Appends a new immutable version; fails if that version already exists. "latest" and partial selectors are not accepted for save.

Example request

{
  "version": "1.0.0"
}

Response

Numscript saved successfully

Example response

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

Changes

    • info

      api operation id saveNumscript removed and replaced with v3SaveNumscript

    • 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

    • info

      added the non-success response with the status