Storage

Get a list of storage items for a pallet.

get

Returns a list of storage item metadata for storage items of the specified palletId.

Path parameters
palletIdstringRequired

Name or index of the pallet to query the storage of. Note: the pallet name must match what is specified in the runtime metadata.

Query parameters
onlyIdsbooleanOptional

Only return the names (IDs) of the storage items instead of all of each storage item's metadata.

atstring · unsignedInteger or $hexOptional

Block identifier, as the block height or block hash.

Responses
200
successful operation
application/json
get
GET /pallets/{palletId}/storage HTTP/1.1
Host: dot-playbook.nownodes.io
Accept: */*
{
  "pallet": "democracy",
  "palletIndex": "15",
  "items": [
    {
      "name": "ReferendumInfoOf",
      "modifier": "Optional",
      "type": {},
      "fallback": "0x00",
      "docs": " Information concerning any given referendum.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
    }
  ]
}

Get the value of a storage item.

get

Returns the value stored under the storageItemId. If it is a map, query param key1 is required. If the storage item is double map query params key1 and key2 are required.

Path parameters
palletIdstringRequired

Name or index of the pallet to query the storage of. Note: pallet name aligns with pallet name as specified in runtime metadata.

storageItemIdstringRequired

Id of the storage item to query for.

Query parameters
keysstring[]Optional

An array of storage keys.

atstring · unsignedInteger or $hexOptional

Block identifier, as the block height or block hash.

metadatabooleanOptional

Include the storage items metadata (including documentation) if set to true.

Default: false
Responses
200
successful operation
application/json
get
GET /pallets/{palletId}/storage/{storageItemId} HTTP/1.1
Host: dot-playbook.nownodes.io
Accept: */*
{
  "at": {
    "hash": "text",
    "height": "text"
  },
  "pallet": "democracy",
  "palletIndex": "15",
  "storageItem": "referendumInfoOf",
  "keys": [
    "0x00",
    "0x01"
  ],
  "value": {
    "Ongoing": {
      "end": "1612800",
      "proposalHash": "0x7de70fc8be782076d0b5772be77153d172a5381c72dd56d3385e25f62abf507e",
      "threshold": "Supermajorityapproval",
      "delay": "403200",
      "tally": {
        "ayes": "41925212461400000",
        "nays": "214535586500000",
        "turnout": "34485320658000000"
      }
    }
  },
  "metadata": {
    "name": "ReferendumInfoOf",
    "modifier": "Optional",
    "type": {},
    "fallback": "0x00",
    "docs": " Information concerning any given referendum.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
  }
}