block_by_num
Fetches block/s from the chain by block number. Multiple block numbers can be supplied in the same request body.
Header Parameters
x-cache-id string
Possible values: Value must match regular expression ^[a-z0-9]{32}$
An idempotent key for retrieving cached responses from the node
application/json
Request Body array required
List of block numbers to fetch blocks for in the chain
- Array [
- ]
number
Responses
- 200
- 400
Successful operation
application/json
Schema
Example (from schema)
Schema
id string
The ID of the call, which corresponds to the x-cache-id used in the header
status string
The status of the call, which will be one of either "Success", "Error", or "Pending"
reason string
The reason for the status of the call. Most useful to debug errors
route string
The endpoint route that was called
content array[]
{
"id": "45v340cd2f8c4782a5b058832565afb1",
"status": "Success",
"reason": "Database item(s) successfully retrieved",
"route": "block_by_num",
"content": [
[
{
"id": "8bdc6c43fa004725bbd5eabef41e9d5d",
"status": "Success",
"reason": "Database item(s) successfully retrieved",
"route": "block_by_num",
"content": [
[
"b00b7bb7ee1b41c857db05c86f8cf0f5548734d57dcb930605744d24425ea975d",
{
"block": {
"header": {
"version": 6,
"bits": 0,
"nonce_and_mining_tx_hash": [
[
54,
94,
67,
154,
"..."
],
"g4c25d5bf7f3bff93b5cf34bb1dbf4a7"
],
"b_num": 0,
"timestamp": 0,
"seed_value": [
57,
52,
57,
57,
"..."
],
"previous_hash": null,
"txs_merkle_root_and_hash": [
"6187c89a825c908668d7ade3d900fa38468be1d0dd5995adc690e6 1c9f3c4717",
"fd72629f4bb412913474be46095d1b65cac336b67be8db0959460c 4a41016ff6"
]
},
"transactions": [
"000000",
"000001",
"000010",
"000011"
]
}
}
]
]
}
]
]
}
Invalid input
application/json
Schema
Example (from schema)
Schema
id string
status string
reason string
route string
content string
{
"id": null,
"status": "Error",
"reason": "Bad Request",
"route": null,
"content": null
}
Loading...