Tables — Move REST API
Overview
Query on-chain Move tables using table handle and key payload.
Endpoint
POST /v1/tables/{handle}/item
Movement-Specific Notes
- Keys/values are BCS-encoded; provide
key_type
andvalue_type
with JSON-encoded key.
Request
Body Schema
{
"key_type": "0x1::string::String",
"value_type": "0x1::string::String",
"key": "example"
}
Response
Success Response (200)
"value"
Code Examples
TypeScript
const res = await fetch('https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1/tables/0x<handle>/item', {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ key_type: '0x1::string::String', value_type: '0x1::string::String', key: 'example' })
});
console.log(await res.json());
cURL
curl -X POST https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1/tables/0x<handle>/item \
-H "Content-Type: application/json" \
-d '{"key_type":"0x1::string::String","value_type":"0x1::string::String","key":"example"}'
EVM Equivalent
Use eth_call
to read contract mappings/storage by ABI encoding the key in call data.