Documentation
Documentation
https://aptos.dev/en/build/apis/fullnode-rest-api
APIReference
https://api.mainnet.aptoslabs.com/v1/spec
Authentication
https://geomi.dev/docs/api-keys
openapi: 3.0.0
info:
title: Aptos Node Accounts Tables API
description: The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
version: 1.2.0
contact:
name: Aptos Labs
url: https://github.com/aptos-labs/aptos-core
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: /v1
tags:
- name: Tables
description: Access to tables
paths:
/tables/{table_handle}/item:
post:
tags:
- Tables
summary: Get table item
description: '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 params, 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:
- name: table_handle
schema:
$ref: '#/components/schemas/Address'
in: path
description: Table handle hex encoded 32-byte string
required: true
deprecated: false
explode: true
- name: ledger_version
schema:
$ref: '#/components/schemas/U64'
in: query
description: 'Ledger version to get state of account
If not provided, it will be the latest version'
required: false
deprecated: false
explode: true
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TableItemRequest'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MoveValue'
application/x-bcs:
schema:
type: array
items:
type: integer
format: uint8
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
required: true
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-CURSOR:
description: 'Cursor to be used for endpoints that support cursor-based
pagination. Pass this to the `start` field of the endpoint
on the next call to get the next page of results.'
deprecated: false
schema:
type: string
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'410':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'503':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
operationId: get_table_item
/tables/{table_handle}/raw_item:
post:
tags:
- Tables
summary: Get raw table item
description: 'Get a table item at a specific ledger version from the table identified by {table_handle}
in the path and the "key" (RawTableItemRequest) provided in the request body.
The `get_raw_table_item` requires only a serialized key comparing to the full move type information
comparing to the `get_table_item` api, and can only return the query in the bcs format.
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:
- name: table_handle
schema:
$ref: '#/components/schemas/Address'
in: path
description: Table handle hex encoded 32-byte string
required: true
deprecated: false
explode: true
- name: ledger_version
schema:
$ref: '#/components/schemas/U64'
in: query
description: 'Ledger version to get state of account
If not provided, it will be the latest version'
required: false
deprecated: false
explode: true
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RawTableItemRequest'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MoveValue'
application/x-bcs:
schema:
type: array
items:
type: integer
format: uint8
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
required: true
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-CURSOR:
description: 'Cursor to be used for endpoints that support cursor-based
pagination. Pass this to the `start` field of the endpoint
on the next call to get the next page of results.'
deprecated: false
schema:
type: string
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'410':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'503':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/aptos/refs/heads/main/openapi/aptos-tables-api-openapi.yml