POST /v1/tables/{table_handle}/item

Get table item

Get a table item at a specific ledger version from the table identified by {table_handle} in the path and the "key" (TableItemRequest) provided in the request body.

This is a POST endpoint because the "key" for requesting a specific table item (TableItemRequest) could be quite complex, as each of its fields could themselves be composed of other structs. This makes it impractical to express using query parameters, meaning GET isn't an option.

The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.

Parameters

  • table_handle REQUIRED: (string<hex>) - Table handle hex encoded 32-byte string

  • ledger_version OPTIONAL: (string<uint64>) - Ledger version to get state of account

Returns

An enum of the possible Move value types

Example

Request

curl --request POST \
  --url 'https://aptos-mainnet.blastapi.io/<project-id>/v1/tables/0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1/item?ledger_version=item' \
  --header 'Accept: application/json, application/x-bcs' \
  --header 'Content-Type: application/json' \
  --data '{
  "key_type": "string",
  "value_type": "string",
  "key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
}'

Last updated