API reference
Fetch the header for a specifc block if available

Fetch the header for a specifc block if available

Gets the header for a specifc block if available.

Params:

  • block_number - block number (required)

Response:

If block_status = "verifying-confidence|verifying-data|finished", the header is available, and the response is:

HTTP/1.1 200 OK
Content-Type: application/json
 
{
  "hash": "{hash}",
  "parent_hash": "{parent-hash}",
  "number": {number},
  "state_root": "{state-root}",
  "extrinsics_root": "{extrinsics-root}",
  "extension": {
    "rows": {rows},
    "cols": {cols},
    "data_root": "{data-root}", // Optional
    "commitments": [
      "{commitment}", ...
    ],
    "app_lookup": {
      "size": {size},
      "index": [
        {
          "app_id": {app-id},
          "start": {start}
        }
      ]
    }
  }
}

If block_status = "unavailable|pending|verifying-header", header is not available and response is:

HTTP/1.1 400 Bad Request
curl "localhost:7007/v2/blocks/592445/header"