curl --request POST \
--url http://localhost/api/ledger/v2/{ledger}/_bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"action": "<string>",
"ik": "<string>",
"data": {
"metadata": {
"admin": "true"
},
"timestamp": "2023-11-07T05:31:56Z",
"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"
}
},
"runtime": "experimental-interpreter",
"reference": "ref:001",
"accountMetadata": {},
"force": true
}
}
]
'{
"data": [
{
"responseType": "<string>",
"logID": 123,
"data": {
"timestamp": "2023-11-07T05:31:56Z",
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"metadata": {
"admin": "true"
},
"id": 1,
"reverted": true,
"insertedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"reference": "ref:001",
"revertedAt": "2023-11-07T05:31:56Z",
"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"
}curl --request POST \
--url http://localhost/api/ledger/v2/{ledger}/_bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"action": "<string>",
"ik": "<string>",
"data": {
"metadata": {
"admin": "true"
},
"timestamp": "2023-11-07T05:31:56Z",
"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"
}
},
"runtime": "experimental-interpreter",
"reference": "ref:001",
"accountMetadata": {},
"force": true
}
}
]
'{
"data": [
{
"responseType": "<string>",
"logID": 123,
"data": {
"timestamp": "2023-11-07T05:31:56Z",
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"metadata": {
"admin": "true"
},
"id": 1,
"reverted": true,
"insertedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"reference": "ref:001",
"revertedAt": "2023-11-07T05:31:56Z",
"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"
}The access token received from the authorization server in the OAuth 2.0 flow.
Name of the ledger.
"ledger001"
Continue on failure
true
Make bulk atomic
true
Process bulk elements in parallel
true
Show child attributes
The numscript runtime used to execute the script. Uses "machine" by default, unless the "--experimental-numscript-interpreter" feature flag is passed.
experimental-interpreter, machine "ref:001"
OK
Show child attributes
Show child attributes
x >= 0"ref:001"
Show child attributes
Show child attributes
{
"USD": { "input": 100, "output": 10, "balance": 90 },
"EUR": { "input": 100, "output": 10, "balance": 90 }
}{
"orders:1": {
"USD": { "input": 100, "output": 10, "balance": 90 }
},
"orders:2": {
"USD": { "input": 100, "output": 10, "balance": 90 }
}
}Show child attributes
Show child attributes
{
"USD": { "input": 100, "output": 10, "balance": 90 },
"EUR": { "input": 100, "output": 10, "balance": 90 }
}{
"orders:1": {
"USD": { "input": 100, "output": 10, "balance": 90 }
},
"orders:2": {
"USD": { "input": 100, "output": 10, "balance": 90 }
}
}Show child attributes
Show child attributes
{ "input": 100, "output": 20, "balance": 80 }{
"USD": { "input": 100, "output": 10, "balance": 90 },
"EUR": { "input": 100, "output": 10, "balance": 90 }
}{
"orders:1": {
"USD": { "input": 100, "output": 10, "balance": 90 }
},
"orders:2": {
"USD": { "input": 100, "output": 10, "balance": 90 }
}
}Show child attributes
Show child attributes
{ "input": 100, "output": 20, "balance": 80 }{
"USD": { "input": 100, "output": 10, "balance": 90 },
"EUR": { "input": 100, "output": 10, "balance": 90 }
}{
"orders:1": {
"USD": { "input": 100, "output": 10, "balance": 90 }
},
"orders:2": {
"USD": { "input": 100, "output": 10, "balance": 90 }
}
}INTERNAL, INSUFFICIENT_FUND, VALIDATION, CONFLICT, COMPILATION_FAILED, METADATA_OVERRIDE, NOT_FOUND, REVERT_OCCURRING, ALREADY_REVERT, NO_POSTINGS, LEDGER_NOT_FOUND, IMPORT, TIMEOUT, BULK_SIZE_EXCEEDED, INTERPRETER_PARSE, INTERPRETER_RUNTIME, LEDGER_ALREADY_EXISTS, OUTDATED_SCHEMA "VALIDATION"
"[VALIDATION] invalid 'cursor' query param"