Download OpenAPI specification:Download
This HTTP pragmatic REST API is built on top of Sawtooth's existing ZMQ/Protobuf infrastructure, simplifying client interaction with the blockchain by exposing endpoints that use common HTTP/JSON standards.
Accepts a protobuf formatted BatchList as an octet-stream binary
file and submits it to the validator to be committed.
The API will return immediately with a status of 202. There will be
no data object, only a link to a /batch_statuses endpoint to be
polled to check the status of submitted batches.
A binary encoded protobuf BatchList
Array of objects (Batch) |
Fetches a paginated list of batches from the validator.
| head | string Default: "latest" Index or id of head block |
| start | string Id to start paging (inclusive) |
| limit | integer Default: 1000 Number of items to return |
| reverse | string If the list should be reversed |
Fetches an array of objects with a status and id for each batch
requested. There are four possible statuses with string values
'COMMITTED', 'INVALID', 'PENDING', and 'UNKNOWN'.
The batch(es) you want to check can be specified using the id filter
parameter. If a wait time is specified in the URL, the API will wait
to respond until all batches are committed, or the time in seconds has
elapsed. If the value of wait is not set (i.e., ?wait&id=...), or
it is set to any non-integer value other than false, the wait time
will be just under the API's specified timeout (usually 300).
Note that because this route does not return full resources, the
response will not be paginated, and there will be no head or
paging properties.
| id required | string A comma-separated list of batch ids |
| wait | integer A time in seconds to wait for commit |
Identical to GET /batch_statuses, but takes ids of batches as a JSON
formatted POST body rather than a query parameter. This allows for many
more batches to be checked and should be used for more than 15 ids.
Note that because query information is not encoded in the URL, no link
will be returned with this query.
| wait | integer A time in seconds to wait for commit |
A JSON array of batch id strings
[- "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c"
]Fetches a paginated list of entries for the current state, or relative to a particular head block. Using the address filter parameter will narrow the list to any entries that have an address beginning with the characters specified.
Note that the partial address in address parameter should have even number of hexadecimal characters (i.e., complete bytes).
| head | string Default: "latest" Index or id of head block |
| address | string A partial address to filter leaves by |
| start | string Id to start paging (inclusive) |
| limit | integer Default: 1000 Number of items to return |
| reverse | string If the list should be reversed |
Takes full 70-character address and fetches a particular leaf. For partial address (i.e., group of leaves) use /state above.
| address required | string Radix address of a leaf |
| head | string Default: "latest" Index or id of head block |
Fetches a paginated list of blocks from the validator.
| head | string Default: "latest" Index or id of head block |
| start | string Id to start paging (inclusive) |
| limit | integer Default: 1000 Number of items to return |
| reverse | string If the list should be reversed |
Fetches a paginated list of transactions from the validator.
| head | string Default: "latest" Index or id of head block |
| start | string Id to start paging (inclusive) |
| limit | integer Default: 1000 Number of items to return |
| reverse | string If the list should be reversed |
Fetches an array of objects for each receipt requested.
The receipt(s) you want to retrieve can be specified using the id
filter parameter, where id refers to the transaction id of the
transaction the receipt is associated with.
| id required | string A comma-separated list of transaction ids |
Identical to GET /receipts, but takes ids of transactions as a JSON
formatted POST body rather than a query parameter. This allows for many
more receipts to be fetched and should be used with more than 15 ids.
Note that because query information is not encoded in the URL, no link
will be returned with this request.
| wait | integer A time in seconds to wait for commit |
A JSON array of transaction id strings
[- "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c"
]