Skip to main content

Tables

Returns information about a single table, including schema information.


Endpoint

GET /tables/{chainId}/{tableId}

The following describes the usage with placeholder parameters on a testnet gateway URL:

curl -X GET https://testnets.tableland.network/api/v1/tables/{chainId}/{tableId} \
-H 'Accept: application/json'

Parameters

NameInTypeRequiredDescription
chainIdpathinteger(int32)trueThe parent chain to target
tableIdpathstringtrueTable identifier

Responses

StatusMeaningDescriptionSchema
200https://tools.ietf.org/html/rfc7231#section-6.3.1successful operationnotion://www.notion.so/textile/REST-API-Latest-e622f52063314c0db8dca75363ebb793#schematable
400https://tools.ietf.org/html/rfc7231#section-6.5.1Invalid chain or table identifierNone
404https://tools.ietf.org/html/rfc7231#section-6.5.4Table Not FoundNone
429https://tools.ietf.org/html/rfc6585#section-4Too Many RequestsNone
500https://tools.ietf.org/html/rfc7231#section-6.6.1Internal Server ErrorNone

This operation does not require authentication

Response properties

NameTypeRequiredRestrictionsDescription
namestringfalsenonenone
external_urlstringfalsenonenone
animation_urlstringfalsenonenone
imagestringfalsenonenone
attributes[object]falsenonenone
» display_typestringfalsenoneThe display type for marketplaces
» trait_typestringfalsenoneThe trait type for marketplaces
» valueobjectfalsenoneThe value of the property
schemaobjectfalsenoneThe table schema

Schema properties

NameTypeRequiredRestrictionsDescription
namestringfalsenonenone
typestringfalsenonenone
constraints[string]falsenonenone

Example

curl -X GET https://testnets.tableland.network/api/v1/tables/80002/1 \
-H 'Accept: application/json'

Returns a successful (200) response:

{
"name": "healthbot_80002_1",
"external_url": "https://testnets.tableland.network/api/v1/tables/80002/1",
"animation_url": "https://tables.testnets.tableland.xyz/80002/1.html",
"image": "https://tables.testnets.tableland.xyz/80002/1.svg",
"attributes": [
{
"display_type": "date",
"trait_type": "created",
"value": 1673973329
}
],
"schema": {
"columns": [
{
"name": "counter",
"type": "integer"
}
]
}
}