API reference
Fetch the appdata of a specific block

Fetch the appdata of a specific block

Given a block number, it retrieves the hex-encoded extrinsics for the specified block, if available. Alternatively, if specified by a query parameter, the retrieved extrinsic is decoded and returned as a base64-encoded string.

Params:

  • block_number - block number (required)
  • decode - true if decoded extrinsics are requested (boolean, optional, default is false)
curl "localhost:7007/v1/appdata/1?decode=true"
Sample Response:
{
  "block": 46,
  "extrinsics": ["ZXhhbXBsZQ=="]
}
  • If application data is available, and decode is false or unspecified:
{
  "block": 1,
  "extrinsics": [
    "0xc5018400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01308e88ca257b65514b7b44fc1913a6a9af6abc34c3d22761b0e425674d68df7de26be1c8533a7bbd01fdb3a8daa5af77df6d3fb0a67cde8241f461f4fe16f188000000041d011c6578616d706c65"
  ]
}

If application data is available, and decode is true:

{ "block": 1, "extrinsics": ["ZXhhbXBsZQ=="] }

if application data is available, decode is true, and the base64 extrinsic is decoded

"example"

If application data is not available, and specified block is the latest block:

"Processing block"

If application data is not available, and specified block is not the latest block:

"Not found"