Skip to main content

/v1/tables/{table_handle}/item REST API Endpoint

Retrieves a specific item from the table using {table_handle} in the path and the "key" provided in the request body (TableItemRequest) and returns the corresponding item at the specified ledger version.

Updated on
Oct 4, 2023

/v1/tables/{table_handle}/item REST API Endpoint

Path Parameters

table_handle
string
REQUIRED
The table handle, encoded in 32-byte hexadecimal format

Query Parameters

ledger_version
string
The ledger version to retrieve the account state

Body Parameters

key_type
string
REQUIRED
It specifies the data type of the key used to identify the required items within the table. It indicates the format of the key that will be provided to the API for the retrieval process. The key type can vary depending on the specific table and data schema, such as string, integer, or any other valid data type
value_type
string
REQUIRED
It specifies the data type of the value associated with the retrieved item. It indicates the format or structure of the data that will be returned by the API in response to the request. The value type can also vary based on the table schema and the nature of the stored data, such as string, integer, boolean, or more complex types like objects or arrays
key
string
REQUIRED
The value that uniquely identifies the item to be fetched from the table

Returns

result
The retrieved items from the specified table in a structured format, containing the data fields and values associated with the item
Request
1
curl --request POST \
2
--url https://docs-demo.aptos-mainnet.quiknode.pro/v1/tables/0x982be82410ddc6480dc8976e2866a2c7d162ee9d02d97ee842ac38b0b105086/item \
3
--header 'Content-Type: application/json' \
4
--data '{
5
"key": {
6
"collection":"Aptos Zero",
7
"creator":"0xabf3630d0532fef81dfe610dd4def095070d91e344d475051e1c49da5e6d51c3",
8
"name": "Aptos Zero: 1"
9
},
10
"key_type": "0x3::token::TokenDataId",
11
"value_type": "0x3::token::TokenData"
12
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free