Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
-
oAuth2 authentication.
-
Flow: clientCredentials
-
Token URL = /oauth/token
-
| Scope | Scope Description |
|---|
Code samples
GET http://localhost:8080/_/info HTTP/1.1 Host: localhost:8080 Accept: application/json GET /_/info
Example responses
200 Response
{ "server": "string", "version": "string" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2ConfigInfo |
| default | Default | Error | V2ErrorResponse |
| 5XX | Unknown | Error | V2ErrorResponse |
Code samples
GET http://localhost:8080/_/metrics HTTP/1.1 Host: localhost:8080 Accept: application/json GET /_/metrics
Example responses
200 Response
{ "property1": null, "property2": null }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Inline |
| default | Default | Error | V2ErrorResponse |
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » additionalProperties | any | false | none | none |
Code samples
GET http://localhost:8080/v2 HTTP/1.1 Host: localhost:8080 Accept: application/json GET /v2
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| pageSize | query | integer(int64) | false | The maximum number of results to return per page. |
| cursor | query | string | false | Parameter used in pagination requests. Maximum page size is set to 15. |
pageSize: The maximum number of results to return per page.
cursor: Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set.
Example responses
200 Response
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "name": "string", "addedAt": "2019-08-24T14:15:22Z", "bucket": "string", "metadata": { "admin": "true" } } ] } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2LedgerListResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
GET http://localhost:8080/v2/{ledger} HTTP/1.1 Host: localhost:8080 Accept: application/json GET /v2/{ledger}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
Example responses
200 Response
{ "data": { "name": "string", "addedAt": "2019-08-24T14:15:22Z", "bucket": "string", "metadata": { "admin": "true" } } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2GetLedgerResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
POST http://localhost:8080/v2/{ledger} HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json POST /v2/{ledger}
Body parameter
{ "bucket": "string", "metadata": { "admin": "true" }, "features": { "property1": "string", "property2": "string" } }| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | V2CreateLedgerRequest | false | none |
| ledger | path | string | true | Name of the ledger. |
Example responses
default Response
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | OK | None |
| default | Default | Error | V2ErrorResponse |
Code samples
PUT http://localhost:8080/v2/{ledger}/metadata HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json PUT /v2/{ledger}/metadata
Body parameter
{ "admin": "true" }| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | V2Metadata | false | none |
| ledger | path | string | true | Name of the ledger. |
Example responses
default Response
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | OK | None |
| default | Default | Error | V2ErrorResponse |
| 5XX | Unknown | Error | V2ErrorResponse |
Code samples
DELETE http://localhost:8080/v2/{ledger}/metadata/{key} HTTP/1.1 Host: localhost:8080 Accept: application/json DELETE /v2/{ledger}/metadata/{key}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| key | path | string | true | Key to remove. |
Example responses
default Response
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | OK | None |
| default | Default | Error | V2ErrorResponse |
Code samples
GET http://localhost:8080/v2/{ledger}/_info HTTP/1.1 Host: localhost:8080 Accept: application/json GET /v2/{ledger}/_info
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
Example responses
200 Response
{ "data": { "name": "ledger001", "storage": { "migrations": [ { "version": 11, "name": "migrations:001", "date": "2019-08-24T14:15:22Z", "state": "TO DO" } ] } } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2LedgerInfoResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
POST http://localhost:8080/v2/{ledger}/_bulk HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json POST /v2/{ledger}/_bulk
Body parameter
[ { "action": "string", "ik": "string", "data": { "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "script": { "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": { "user": "users:042" } }, "reference": "ref:001", "metadata": { "admin": "true" } } } ]| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| continueOnFailure | query | boolean | false | Continue on failure |
| atomic | query | boolean | false | Make bulk atomic |
| parallel | query | boolean | false | Process bulk elements in parallel |
| body | body | V2Bulk | false | none |
Example responses
200 Response
{ "data": [ { "responseType": "string", "logID": 0, "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } } ], "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2BulkResponse |
| 400 | Bad Request | OK | V2BulkResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
HEAD http://localhost:8080/v2/{ledger}/accounts HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json HEAD /v2/{ledger}/accounts
Body parameter
{}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| pit | query | string(date-time) | false | none |
| body | body | object | false | none |
Example responses
default Response
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | OK | None |
| default | Default | Error | V2ErrorResponse |
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 204 | Count | integer | bigint | none |
Code samples
GET http://localhost:8080/v2/{ledger}/accounts HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json GET /v2/{ledger}/accounts
List accounts from a ledger, sorted by address in descending order.
Body parameter
{}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| pageSize | query | integer(int64) | false | The maximum number of results to return per page. |
| cursor | query | string | false | Parameter used in pagination requests. Maximum page size is set to 15. |
| expand | query | string | false | none |
| pit | query | string(date-time) | false | none |
| body | body | object | false | none |
pageSize: The maximum number of results to return per page.
cursor: Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set.
Example responses
200 Response
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "address": "users:001", "metadata": { "admin": "true" }, "volumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } }, "effectiveVolumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } } } ] } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2AccountsCursorResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
GET http://localhost:8080/v2/{ledger}/accounts/{address} HTTP/1.1 Host: localhost:8080 Accept: application/json GET /v2/{ledger}/accounts/{address}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| address | path | string | true | Exact address of the account. It must match the following regular expressions pattern: |
| expand | query | string | false | none |
| pit | query | string(date-time) | false | none |
address: Exact address of the account. It must match the following regular expressions pattern:
^\w+(:\w+)*$ Example responses
200 Response
{ "data": { "address": "users:001", "metadata": { "admin": "true" }, "volumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } }, "effectiveVolumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } } } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2AccountResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
POST http://localhost:8080/v2/{ledger}/accounts/{address}/metadata HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json Idempotency-Key: string POST /v2/{ledger}/accounts/{address}/metadata
Body parameter
{ "admin": "true" }| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| address | path | string | true | Exact address of the account. It must match the following regular expressions pattern: |
| dryRun | query | boolean | false | Set the dry run mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker. |
| Idempotency-Key | header | string | false | Use an idempotency key |
| body | body | V2Metadata | true | metadata |
address: Exact address of the account. It must match the following regular expressions pattern:
^\w+(:\w+)*$ Example responses
default Response
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | No Content | None |
| default | Default | Error | V2ErrorResponse |
Code samples
DELETE http://localhost:8080/v2/{ledger}/transactions/{id}/metadata/{key} HTTP/1.1 Host: localhost:8080 Accept: application/json DELETE /v2/{ledger}/transactions/{id}/metadata/{key}
Delete metadata by key
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| id | path | integer(bigint) | true | Transaction ID. |
| key | path | string | true | The key to remove. |
Example responses
default Response
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 2XX | Unknown | Key deleted | None |
| default | Default | Error | V2ErrorResponse |
Code samples
GET http://localhost:8080/v2/{ledger}/stats HTTP/1.1 Host: localhost:8080 Accept: application/json GET /v2/{ledger}/stats
Get statistics from a ledger. (aggregate metrics on accounts and transactions)
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | name of the ledger |
Example responses
200 Response
{ "data": { "accounts": 0, "transactions": 0 } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2StatsResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
HEAD http://localhost:8080/v2/{ledger}/transactions HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json HEAD /v2/{ledger}/transactions
Body parameter
{}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| pit | query | string(date-time) | false | none |
| body | body | object | false | none |
Example responses
default Response
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | OK | None |
| default | Default | Error | V2ErrorResponse |
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 204 | Count | integer | int64 | none |
Code samples
GET http://localhost:8080/v2/{ledger}/transactions HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json GET /v2/{ledger}/transactions
List transactions from a ledger, sorted by id in descending order.
Body parameter
{}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| pageSize | query | integer(int64) | false | The maximum number of results to return per page. |
| cursor | query | string | false | Parameter used in pagination requests. Maximum page size is set to 15. |
| expand | query | string | false | none |
| pit | query | string(date-time) | false | none |
| order | query | string | false | none |
| reverse | query | boolean | false | none |
| body | body | object | false | none |
pageSize: The maximum number of results to return per page.
cursor: Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set.
| Parameter | Value |
|---|---|
| order | effective |
Example responses
200 Response
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } ] } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2TransactionsCursorResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
POST http://localhost:8080/v2/{ledger}/transactions HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json Idempotency-Key: string POST /v2/{ledger}/transactions
Body parameter
{ "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "script": { "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": { "user": "users:042" } }, "reference": "ref:001", "metadata": { "admin": "true" } }| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| dryRun | query | boolean | false | Set the dryRun mode. dry run mode doesn't add the logs to the database or publish a message to the message broker. |
| Idempotency-Key | header | string | false | Use an idempotency key |
| force | query | boolean | false | Disable balance checks when passing postings |
| body | body | V2PostTransaction | true | The request body must contain at least one of the following objects: |
body: The request body must contain at least one of the following objects:
postings: suitable for simple transactionsscript: enabling more complex transactions with Numscript
Example responses
200 Response
{ "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2CreateTransactionResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
GET http://localhost:8080/v2/{ledger}/transactions/{id} HTTP/1.1 Host: localhost:8080 Accept: application/json GET /v2/{ledger}/transactions/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| id | path | integer(bigint) | true | Transaction ID. |
| expand | query | string | false | none |
| pit | query | string(date-time) | false | none |
Example responses
200 Response
{ "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2GetTransactionResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
POST http://localhost:8080/v2/{ledger}/transactions/{id}/metadata HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json Idempotency-Key: string POST /v2/{ledger}/transactions/{id}/metadata
Body parameter
{ "admin": "true" }| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| id | path | integer(bigint) | true | Transaction ID. |
| dryRun | query | boolean | false | Set the dryRun mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker. |
| Idempotency-Key | header | string | false | Use an idempotency key |
| body | body | V2Metadata | false | metadata |
Example responses
default Response
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | No Content | None |
| default | Default | Error | V2ErrorResponse |
Code samples
POST http://localhost:8080/v2/{ledger}/transactions/{id}/revert HTTP/1.1 Host: localhost:8080 Accept: application/json POST /v2/{ledger}/transactions/{id}/revert
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| id | path | integer(bigint) | true | Transaction ID. |
| force | query | boolean | false | Force revert |
| atEffectiveDate | query | boolean | false | Revert transaction at effective date of the original tx |
| dryRun | query | boolean | false | Set the dryRun mode. dry run mode doesn't add the logs to the database or publish a message to the message broker. |
Example responses
201 Response
{ "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | OK | V2CreateTransactionResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
GET http://localhost:8080/v2/{ledger}/aggregate/balances HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json GET /v2/{ledger}/aggregate/balances
Body parameter
{}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| pit | query | string(date-time) | false | none |
| useInsertionDate | query | boolean | false | Use insertion date instead of effective date |
| body | body | object | false | none |
Example responses
200 Response
{ "data": { "USD": 100, "EUR": 12 } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2AggregateBalancesResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
GET http://localhost:8080/v2/{ledger}/volumes HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json GET /v2/{ledger}/volumes
Body parameter
{}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| pageSize | query | integer(int64) | false | The maximum number of results to return per page. |
| cursor | query | string | false | Parameter used in pagination requests. Maximum page size is set to 15. |
| ledger | path | string | true | Name of the ledger. |
| endTime | query | string(date-time) | false | none |
| startTime | query | string(date-time) | false | none |
| insertionDate | query | boolean | false | Use insertion date instead of effective date |
| groupBy | query | integer(int64) | false | Group volumes and balance by the level of the segment of the address |
| body | body | object | false | none |
pageSize: The maximum number of results to return per page.
cursor: Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set.
Example responses
200 Response
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "account": "string", "asset": "string", "input": 0, "output": 0, "balance": 0 } ] } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2VolumesWithBalanceCursorResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
GET http://localhost:8080/v2/{ledger}/logs HTTP/1.1 Host: localhost:8080 Content-Type: application/json Accept: application/json GET /v2/{ledger}/logs
List the logs from a ledger, sorted by ID in descending order.
Body parameter
{}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| pageSize | query | integer(int64) | false | The maximum number of results to return per page. |
| cursor | query | string | false | Parameter used in pagination requests. Maximum page size is set to 15. |
| pit | query | string(date-time) | false | none |
| body | body | object | false | none |
pageSize: The maximum number of results to return per page.
cursor: Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set.
Example responses
200 Response
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "id": 1234, "type": "NEW_TRANSACTION", "data": {}, "hash": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", "date": "2019-08-24T14:15:22Z" } ] } }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | V2LogsCursorResponse |
| default | Default | Error | V2ErrorResponse |
Code samples
POST http://localhost:8080/v2/{ledger}/logs/import HTTP/1.1 Host: localhost:8080 Content-Type: application/octet-stream Accept: application/json POST /v2/{ledger}/logs/import
Body parameter
string | Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
| body | body | string | false | none |
Example responses
default Response
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" }| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | Import OK | None |
| default | Default | Error | V2ErrorResponse |
Code samples
POST http://localhost:8080/v2/{ledger}/logs/export HTTP/1.1 Host: localhost:8080 Accept: application/octet-stream POST /v2/{ledger}/logs/export
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| ledger | path | string | true | Name of the ledger. |
Example responses
default Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Import OK | None |
| default | Default | Error | string |
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "address": "users:001", "metadata": { "admin": "true" }, "volumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } }, "effectiveVolumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } } } ] } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| cursor | object | true | none | none |
| » pageSize | integer(int64) | true | none | none |
| » hasMore | boolean | true | none | none |
| » previous | string | false | none | none |
| » next | string | false | none | none |
| » data | [V2Account] | true | none | none |
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } ] } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| cursor | object | true | none | none |
| » pageSize | integer(int64) | true | none | none |
| » hasMore | boolean | true | none | none |
| » previous | string | false | none | none |
| » next | string | false | none | none |
| » data | [V2Transaction] | true | none | none |
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "id": 1234, "type": "NEW_TRANSACTION", "data": {}, "hash": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", "date": "2019-08-24T14:15:22Z" } ] } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| cursor | object | true | none | none |
| » pageSize | integer(int64) | true | none | none |
| » hasMore | boolean | true | none | none |
| » previous | string | false | none | none |
| » next | string | false | none | none |
| » data | [V2Log] | true | none | none |
{ "data": { "address": "users:001", "metadata": { "admin": "true" }, "volumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } }, "effectiveVolumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } } } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| data | V2Account | true | none | none |
{ "data": { "USD": 100, "EUR": 12 } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| data | V2AssetsBalances | true | none | none |
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "account": "string", "asset": "string", "input": 0, "output": 0, "balance": 0 } ] } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| cursor | object | true | none | none |
| » pageSize | integer(int64) | true | none | none |
| » hasMore | boolean | true | none | none |
| » previous | string | false | none | none |
| » next | string | false | none | none |
| » data | [V2VolumesWithBalance] | true | none | none |
{ "account": "string", "asset": "string", "input": 0, "output": 0, "balance": 0 } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| account | string | true | none | none |
| asset | string | true | none | none |
| input | integer(bigint) | true | none | none |
| output | integer(bigint) | true | none | none |
| balance | integer(bigint) | true | none | none |
{ "admin": "true" } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| additionalProperties | string | false | none | none |
{ "server": "string", "version": "string" } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| server | string | true | none | none |
| version | string | true | none | none |
{ "address": "users:001", "metadata": { "admin": "true" }, "volumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } }, "effectiveVolumes": { "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| address | string | true | none | none |
| metadata | object | true | none | none |
| » additionalProperties | string | false | none | none |
| volumes | V2Volumes | false | none | none |
| effectiveVolumes | V2Volumes | false | none | none |
{ "USD": 100, "EUR": 12 } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| additionalProperties | integer(bigint) | false | none | none |
{ "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| amount | integer(bigint) | true | none | none |
| asset | string | true | none | none |
| destination | string | true | none | none |
| source | string | true | none | none |
{ "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| insertedAt | string(date-time) | false | none | none |
| timestamp | string(date-time) | true | none | none |
| postings | [V2Posting] | true | none | none |
| reference | string | false | none | none |
| metadata | V2Metadata | true | none | none |
| id | integer(bigint) | true | none | none |
| reverted | boolean | true | none | none |
| revertedAt | string(date-time) | false | none | none |
| preCommitVolumes | V2AggregatedVolumes | false | none | none |
| postCommitVolumes | V2AggregatedVolumes | false | none | none |
| preCommitEffectiveVolumes | V2AggregatedVolumes | false | none | none |
| postCommitEffectiveVolumes | V2AggregatedVolumes | false | none | none |
{ "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "script": { "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": { "user": "users:042" } }, "reference": "ref:001", "metadata": { "admin": "true" } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| timestamp | string(date-time) | false | none | none |
| postings | [V2Posting] | false | none | none |
| script | object | false | none | none |
| » plain | string | true | none | none |
| » vars | object | false | none | none |
| »» additionalProperties | string | false | none | none |
| reference | string | false | none | none |
| metadata | V2Metadata | true | none | none |
{ "accounts": 0, "transactions": 0 } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| accounts | integer(int64) | true | none | none |
| transactions | integer(bigint) | true | none | none |
{ "id": 1234, "type": "NEW_TRANSACTION", "data": {}, "hash": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", "date": "2019-08-24T14:15:22Z" } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | integer(bigint) | true | none | none |
| type | string | true | none | none |
| data | object | true | none | none |
| hash | string | true | none | none |
| date | string(date-time) | true | none | none |
| Property | Value |
|---|---|
| type | NEW_TRANSACTION |
| type | SET_METADATA |
| type | REVERTED_TRANSACTION |
| type | DELETE_METADATA |
{ "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| data | V2Transaction | true | none | none |
{ "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } } None
{ "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| data | V2Transaction | true | none | none |
{ "data": { "accounts": 0, "transactions": 0 } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| data | V2Stats | true | none | none |
{ "server": "string", "version": "string" } None
{ "input": 100, "output": 20, "balance": 80 } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| input | integer(bigint) | true | none | none |
| output | integer(bigint) | true | none | none |
| balance | integer(bigint) | false | none | none |
{ "USD": { "input": 100, "output": 10, "balance": 90 }, "EUR": { "input": 100, "output": 10, "balance": 90 } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| additionalProperties | V2Volume | false | none | none |
{ "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| additionalProperties | V2Volumes | false | none | none |
{ "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| errorCode | V2ErrorsEnum | true | none | none |
| errorMessage | string | true | none | none |
| details | string | false | none | none |
"VALIDATION" | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
| Property | Value |
|---|---|
| anonymous | INTERNAL |
| anonymous | INSUFFICIENT_FUND |
| anonymous | VALIDATION |
| anonymous | CONFLICT |
| anonymous | COMPILATION_FAILED |
| anonymous | METADATA_OVERRIDE |
| anonymous | NOT_FOUND |
| anonymous | REVERT_OCCURRING |
| anonymous | ALREADY_REVERT |
| anonymous | NO_POSTINGS |
| anonymous | LEDGER_NOT_FOUND |
| anonymous | IMPORT |
| anonymous | TIMEOUT |
| anonymous | BULK_SIZE_EXCEEDED |
| anonymous | INTERPRETER_PARSE |
| anonymous | INTERPRETER_RUNTIME |
| anonymous | LEDGER_ALREADY_EXISTS |
| anonymous | OUTDATED_SCHEMA |
{ "data": { "name": "ledger001", "storage": { "migrations": [ { "version": 11, "name": "migrations:001", "date": "2019-08-24T14:15:22Z", "state": "TO DO" } ] } } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| data | V2LedgerInfo | false | none | none |
{ "name": "ledger001", "storage": { "migrations": [ { "version": 11, "name": "migrations:001", "date": "2019-08-24T14:15:22Z", "state": "TO DO" } ] } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| name | string | false | none | none |
| storage | object | false | none | none |
| » migrations | [V2MigrationInfo] | false | none | none |
{ "version": 11, "name": "migrations:001", "date": "2019-08-24T14:15:22Z", "state": "TO DO" } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| version | string | false | none | none |
| name | string | false | none | none |
| date | string(date-time) | false | none | none |
| state | string | false | none | none |
| Property | Value |
|---|---|
| state | TO DO |
| state | DONE |
[ { "action": "string", "ik": "string", "data": { "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "script": { "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": { "user": "users:042" } }, "reference": "ref:001", "metadata": { "admin": "true" } } } ] | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | [V2BulkElement] | false | none | none |
{ "action": "string", "ik": "string" } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| action | string | true | none | none |
| ik | string | false | none | none |
{ "action": "string", "ik": "string", "data": { "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "script": { "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": { "user": "users:042" } }, "reference": "ref:001", "metadata": { "admin": "true" } } } oneOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BulkElementCreateTransaction | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BulkElementAddMetadata | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BulkElementRevertTransaction | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BulkElementDeleteMetadata | false | none | none |
{ "action": "string", "ik": "string", "data": { "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "script": { "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": { "user": "users:042" } }, "reference": "ref:001", "metadata": { "admin": "true" } } } allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BaseBulkElement | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » data | V2PostTransaction | false | none | none |
"string" oneOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | integer(bigint) | false | none | none |
"TRANSACTION" | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
| Property | Value |
|---|---|
| anonymous | TRANSACTION |
| anonymous | ACCOUNT |
{ "action": "string", "ik": "string", "data": { "targetId": "string", "targetType": "TRANSACTION", "metadata": { "property1": "string", "property2": "string" } } } allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BaseBulkElement | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » data | object | false | none | none |
| »» targetId | V2TargetId | true | none | none |
| »» targetType | V2TargetType | true | none | none |
| »» metadata | object | true | none | none |
| »»» additionalProperties | string | false | none | none |
{ "action": "string", "ik": "string", "data": { "id": 0, "force": true, "atEffectiveDate": true } } allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BaseBulkElement | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » data | object | false | none | none |
| »» id | integer(bigint) | true | none | none |
| »» force | boolean | false | none | none |
| »» atEffectiveDate | boolean | false | none | none |
{ "action": "string", "ik": "string", "data": { "targetId": "string", "targetType": "TRANSACTION", "key": "string" } } allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BaseBulkElement | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » data | object | false | none | none |
| »» targetId | V2TargetId | true | none | none |
| »» targetType | V2TargetType | true | none | none |
| »» key | string | true | none | none |
{ "data": [ { "responseType": "string", "logID": 0, "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } } ], "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param", "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" } allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » data | [V2BulkElementResult] | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2ErrorResponse | false | none | none |
{ "responseType": "string", "logID": 0, "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } } oneOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BulkElementResultCreateTransaction | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BulkElementResultAddMetadata | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BulkElementResultRevertTransaction | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BulkElementResultDeleteMetadata | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BulkElementResultError | false | none | none |
{ "responseType": "string", "logID": 0 } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| responseType | string | true | none | none |
| logID | integer | true | none | none |
{ "responseType": "string", "logID": 0, "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } } allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BaseBulkElementResult | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » data | V2Transaction | true | none | none |
{ "responseType": "string", "logID": 0 } None
{ "responseType": "string", "logID": 0, "data": { "insertedAt": "2019-08-24T14:15:22Z", "timestamp": "2019-08-24T14:15:22Z", "postings": [ { "amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001" } ], "reference": "ref:001", "metadata": { "admin": "true" }, "id": 0, "reverted": true, "revertedAt": "2019-08-24T14:15:22Z", "preCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "preCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } }, "postCommitEffectiveVolumes": { "orders:1": { "USD": { "input": 100, "output": 10, "balance": 90 } }, "orders:2": { "USD": { "input": 100, "output": 10, "balance": 90 } } } } } allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BaseBulkElementResult | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » data | V2Transaction | true | none | none |
{ "responseType": "string", "logID": 0 } None
{ "responseType": "string", "logID": 0, "errorCode": "string", "errorDescription": "string", "errorDetails": "string" } allOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | V2BaseBulkElementResult | false | none | none |
and
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | object | false | none | none |
| » errorCode | string | true | none | none |
| » errorDescription | string | true | none | none |
| » errorDetails | string | false | none | none |
{ "bucket": "string", "metadata": { "admin": "true" }, "features": { "property1": "string", "property2": "string" } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| bucket | string | false | none | none |
| metadata | V2Metadata | false | none | none |
| features | object | false | none | none |
| » additionalProperties | string | false | none | none |
{ "name": "string", "addedAt": "2019-08-24T14:15:22Z", "bucket": "string", "metadata": { "admin": "true" } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| name | string | true | none | none |
| addedAt | string(date-time) | true | none | none |
| bucket | string | true | none | none |
| metadata | V2Metadata | false | none | none |
{ "cursor": { "pageSize": 15, "hasMore": false, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", "next": "", "data": [ { "name": "string", "addedAt": "2019-08-24T14:15:22Z", "bucket": "string", "metadata": { "admin": "true" } } ] } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| cursor | object | true | none | none |
| » pageSize | integer(int64) | true | none | none |
| » hasMore | boolean | true | none | none |
| » previous | string | false | none | none |
| » next | string | false | none | none |
| » data | [V2Ledger] | true | none | none |
{ "admin": "true" } None
{ "data": { "name": "string", "addedAt": "2019-08-24T14:15:22Z", "bucket": "string", "metadata": { "admin": "true" } } } | Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| data | V2Ledger | true | none | none |