Changeset View
Changeset View
Standalone View
Standalone View
doc/REST-interface.md
Show All 23 Lines | |||||
#### Blocks | #### Blocks | ||||
`GET /rest/block/<BLOCK-HASH>.<bin|hex|json>` | `GET /rest/block/<BLOCK-HASH>.<bin|hex|json>` | ||||
`GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>` | `GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>` | ||||
Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats. | Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats. | ||||
Responds with 404 if the block doesn't exist. | Responds with 404 if the block doesn't exist. | ||||
The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 2.66MB (1 MB max block, plus hex encoding) per request. | The HTTP request and response are both handled entirely in-memory. | ||||
With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response. | With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response. | ||||
#### Blockheaders | #### Blockheaders | ||||
`GET /rest/headers/<COUNT>/<BLOCK-HASH>.<bin|hex|json>` | `GET /rest/headers/<COUNT>/<BLOCK-HASH>.<bin|hex|json>` | ||||
Given a block hash: returns <COUNT> amount of blockheaders in upward direction. | Given a block hash: returns <COUNT> amount of blockheaders in upward direction. | ||||
Returns empty if the block doesn't exist or it isn't in the active chain. | Returns empty if the block doesn't exist or it isn't in the active chain. | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |