https://api.chaintable.com. See Authentication for credential setup and API calls for response conventions, error handling, and CU consumption.
Credential access
A Personal Access Token can access every OpenAPI endpoint on this page, subject to the user’s resource permissions. Access Keys serve production applications and services making calls at scale. They support only the following endpoints, subject to the owning account’s resource permissions:| Method | Path | Purpose |
|---|---|---|
POST | /v1/function/invoke | Invoke a Function |
POST | /v1/leafage/{chain_id} | Call Leafage |
X-Account-ID. An Access Key uses its owning account; if this header is supplied, it must match.
Send GET parameters in the query string and POST parameters in a JSON body. For nested fields, “Required” applies when the containing object is supplied. Optional fields accept null only when their type includes it. Return fields describe data; conditional related fields appear only when requested or applicable.
IDs and results in examples are illustrative; replace them with your own resources. Credentials are read from environment variables. Expand an object or array to see its fields. object[] denotes an array of objects.
Endpoints
space
GET /v1/space — Get a Space
GET /v1/space — Get a Space
id is a Space ID. Returns data: null if it does not exist.Method: GETPath:
/v1/spaceParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Space ID; 1–64 characters |
data is null if the object does not exist.| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl --get https://api.chaintable.com/v1/space \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=demo
{
"code": 0,
"message": "ok",
"data": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
GET /v1/space/list — List visible Spaces
GET /v1/space/list — List visible Spaces
GETPath:
/v1/space/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 1000; Default 100 |
account_id | string / null | No | Account ID; 32–32 characters; Pattern: ^[0-9a-f]{32}$ |
order_by | string | No | Sort field; Values: "id", "created_at", "updated_at"; Default "updated_at" |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
| Field | Type | Description |
|---|---|---|
start | integer | Pagination offset, starting at 0 |
limit | integer | Maximum number of entries |
items | object[] | Entries on this page |
total_count | integer | Total number of matching entries |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Space visibility |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
table_count | integer | Number of tables in the Space |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl --get https://api.chaintable.com/v1/space/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode start=0 \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
},
"table_count": 1
}
],
"total_count": 1,
"start": 0,
"limit": 10
}
}
table
Row-reading endpoints represent 64-bit integers, UINT256, and DECIMAL values as strings to preserve precision. See Data types.GET /v1/table — Get a table definition
GET /v1/table — Get a table definition
is_l1=false for the main definition; use true to read a derived data table.Method: GETPath:
/v1/tableParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
is_l1 | boolean | No | Whether to read a derived data table definition; Default false |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
chain_id | string / null | Platform chain identifier, such as eth; empty or null for non-block tables |
table_type | string | Table type |
description | string / null | Description |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
columns | object[] | Initialized column definitions; omitted from list responses |
indexes | object[] | Initialized indexes; omitted from list responses |
view | object / null | Table display settings |
start_height | integer / null | Start block height |
deps | integer | Number of dependencies reading the table |
last_write_at_ms | integer / null | Last write time in Unix milliseconds; null if unavailable |
first_write_at | number / null | First write time in Unix seconds; returned for Time tables |
inited | boolean | Whether initialized; returned by detail and schema operations |
table_rows | integer | Number of table rows |
table_size | integer | Table data size in bytes |
replica_num | integer | Number of replicas |
s3_synced_at | number / null | Data synchronization time in Unix seconds |
subtables | object[] | Related tables |
parent | object | Owning table’s ID and type |
label | string | Display label or category |
relations | object[] | Related tables |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string | Name |
type | string | Logical column type; see the data types reference; see Data types |
is_system | boolean | Whether this is a system column or index |
Show indexes — Item fields
Show indexes — Item fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
columns | string[] | Column names in index order |
is_primary | boolean | Whether this is the primary key index |
is_system | boolean | Whether this is a system column or index |
is_hidden | boolean | Whether the index is hidden |
Show view — Value fields
Show view — Value fields
| Field | Type | Description |
|---|---|---|
sort | integer | Column display order, starting at 0 |
Show subtables — Item fields
Show subtables — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
Show parent — Fields
Show parent — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
table_type | string | Table type |
Show relations — Item fields
Show relations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
curl --get https://api.chaintable.com/v1/table \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=demo.asset_notes
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.asset_notes",
"space": "demo",
"name": "asset_notes",
"chain_id": "",
"table_type": "normal",
"description": "Asset notes",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"columns": [
{
"id": "id",
"name": "id",
"type": "STRING",
"is_system": true
},
{
"id": "note",
"name": "note",
"type": "STRING",
"is_system": false
}
],
"indexes": [
{
"columns": [
"id"
],
"is_primary": true,
"is_system": true
}
],
"table_rows": 1,
"table_size": 64,
"replica_num": 1,
"inited": true,
"subtables": [],
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"view": {
"id": {
"sort": 0
},
"note": {
"sort": 1
}
},
"deps": 0,
"last_write_at_ms": 1788220800000
}
}
POST /v1/table/columns/update — Update columns
POST /v1/table/columns/update — Update columns
POSTPath:
/v1/table/columns/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
columns | object[] | Yes | Column definitions |
view | object / null | No | Table display settings |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–64 characters |
name | string | Yes | Name; 1–64 characters |
type | string | Yes | Logical column type; see the data types reference; see Data types; ≥ 1 characters |
Show view — Value fields
Show view — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
sort | integer | No | Column display order, starting at 0 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
chain_id | string / null | Platform chain identifier, such as eth; empty or null for non-block tables |
table_type | string | Table type |
description | string / null | Description |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
columns | object[] | Initialized column definitions; omitted from list responses |
indexes | object[] | Initialized indexes; omitted from list responses |
view | object / null | Table display settings |
start_height | integer / null | Start block height |
deps | integer | Number of dependencies reading the table |
last_write_at_ms | integer / null | Last write time in Unix milliseconds; null if unavailable |
first_write_at | number / null | First write time in Unix seconds; returned for Time tables |
inited | boolean | Whether initialized; returned by detail and schema operations |
table_rows | integer | Number of table rows |
table_size | integer | Table data size in bytes |
replica_num | integer | Number of replicas |
s3_synced_at | number / null | Data synchronization time in Unix seconds |
subtables | object[] | Related tables |
parent | object | Owning table’s ID and type |
label | string | Display label or category |
relations | object[] | Related tables |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string | Name |
type | string | Logical column type; see the data types reference; see Data types |
is_system | boolean | Whether this is a system column or index |
Show indexes — Item fields
Show indexes — Item fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
columns | string[] | Column names in index order |
is_primary | boolean | Whether this is the primary key index |
is_system | boolean | Whether this is a system column or index |
is_hidden | boolean | Whether the index is hidden |
Show view — Value fields
Show view — Value fields
| Field | Type | Description |
|---|---|---|
sort | integer | Column display order, starting at 0 |
Show subtables — Item fields
Show subtables — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
Show parent — Fields
Show parent — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
table_type | string | Table type |
Show relations — Item fields
Show relations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
curl https://api.chaintable.com/v1/table/columns/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "demo.asset_notes",
"columns": [
{
"id": "id",
"name": "id",
"type": "STRING"
},
{
"id": "note",
"name": "note",
"type": "STRING"
}
]
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.asset_notes",
"space": "demo",
"name": "asset_notes",
"chain_id": "",
"table_type": "normal",
"description": "Asset notes",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"columns": [
{
"id": "id",
"name": "id",
"type": "STRING",
"is_system": true
},
{
"id": "note",
"name": "note",
"type": "STRING",
"is_system": false
}
],
"indexes": [
{
"columns": [
"id"
],
"is_primary": true,
"is_system": true
}
],
"table_rows": 1,
"table_size": 64,
"replica_num": 1,
"inited": true,
"subtables": [],
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"view": {
"id": {
"sort": 0
},
"note": {
"sort": 1
}
},
"deps": 0,
"last_write_at_ms": 1788220800000
}
}
POST /v1/table/columns/validate — Validate a column name
POST /v1/table/columns/validate — Validate a column name
POSTPath:
/v1/table/columns/validateParameters| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name; ≥ 1 characters |
| Field | Type | Description |
|---|---|---|
is_valid | boolean | Whether the name is valid |
reason | string / null | Reason, or null when none applies |
curl https://api.chaintable.com/v1/table/columns/validate \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"name": "note"
}'
{
"code": 0,
"message": "ok",
"data": {
"is_valid": true,
"reason": null
}
}
POST /v1/table/create — Create a table
POST /v1/table/create — Create a table
space.name and must not exceed 64 characters. Block table names need the matching chain suffix; chain_id uses an identifier such as eth.Method: POSTPath:
/v1/table/createParameters| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name; 1–255 characters |
table_type | string | Yes | Table type; Values: "normal", "block_event", "block_state", "time" |
chain_id | string / null | No | Platform chain identifier, such as eth; required for block tables; Default "" |
description | string / null | No | Description; ≤ 255 characters |
space | string | Yes | Space ID; 1–64 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
chain_id | string / null | Platform chain identifier, such as eth; empty or null for non-block tables |
table_type | string | Table type |
description | string / null | Description |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
curl https://api.chaintable.com/v1/table/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"space": "demo",
"name": "asset_notes",
"table_type": "normal",
"description": "Asset notes"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.asset_notes",
"space": "demo",
"name": "asset_notes",
"chain_id": "",
"table_type": "normal",
"description": "Asset notes",
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
}
GET /v1/table/id_types — List primary key types
GET /v1/table/id_types — List primary key types
GETPath:
/v1/table/id_typesParametersNo request parameters.Returns| Field | Type | Description |
|---|---|---|
data | string[] | Supported primary key type names |
curl https://api.chaintable.com/v1/table/id_types \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID"
{
"code": 0,
"message": "ok",
"data": [
"STRING",
"ADDRESS",
"TOKENID",
"HASH",
"BLOCKID",
"CHAINID",
"TXID"
]
}
POST /v1/table/indexes/update — Update indexes
POST /v1/table/indexes/update — Update indexes
indexes as a whole; include existing indexes you want to retain.Method: POSTPath:
/v1/table/indexes/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
indexes | object[] | Yes | Index definitions |
Show indexes — Item fields
Show indexes — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string / null | No | Required for Normal table indexes; retain an existing index’s ID to keep it; 1–64 characters |
columns | string[] | Yes | Column names in index order; ≥ 1 items |
is_hidden | boolean / null | No | Read-only flag; ignored when supplied |
is_system | boolean / null | No | Read-only flag; ignored when supplied |
is_primary | boolean / null | No | Read-only flag; ignored when supplied |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
chain_id | string / null | Platform chain identifier, such as eth; empty or null for non-block tables |
table_type | string | Table type |
description | string / null | Description |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
columns | object[] | Initialized column definitions; omitted from list responses |
indexes | object[] | Initialized indexes; omitted from list responses |
view | object / null | Table display settings |
start_height | integer / null | Start block height |
deps | integer | Number of dependencies reading the table |
last_write_at_ms | integer / null | Last write time in Unix milliseconds; null if unavailable |
first_write_at | number / null | First write time in Unix seconds; returned for Time tables |
inited | boolean | Whether initialized; returned by detail and schema operations |
table_rows | integer | Number of table rows |
table_size | integer | Table data size in bytes |
replica_num | integer | Number of replicas |
s3_synced_at | number / null | Data synchronization time in Unix seconds |
subtables | object[] | Related tables |
parent | object | Owning table’s ID and type |
label | string | Display label or category |
relations | object[] | Related tables |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string | Name |
type | string | Logical column type; see the data types reference; see Data types |
is_system | boolean | Whether this is a system column or index |
Show indexes — Item fields
Show indexes — Item fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
columns | string[] | Column names in index order |
is_primary | boolean | Whether this is the primary key index |
is_system | boolean | Whether this is a system column or index |
is_hidden | boolean | Whether the index is hidden |
Show view — Value fields
Show view — Value fields
| Field | Type | Description |
|---|---|---|
sort | integer | Column display order, starting at 0 |
Show subtables — Item fields
Show subtables — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
Show parent — Fields
Show parent — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
table_type | string | Table type |
Show relations — Item fields
Show relations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
curl https://api.chaintable.com/v1/table/indexes/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "demo.asset_notes",
"indexes": [
{
"id": "note_index",
"columns": [
"note"
]
}
]
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.asset_notes",
"space": "demo",
"name": "asset_notes",
"chain_id": "",
"table_type": "normal",
"description": "Asset notes",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"columns": [
{
"id": "id",
"name": "id",
"type": "STRING",
"is_system": true
},
{
"id": "note",
"name": "note",
"type": "STRING",
"is_system": false
}
],
"indexes": [
{
"columns": [
"id"
],
"is_primary": true,
"is_system": true
},
{
"id": "note_index",
"columns": [
"note"
],
"is_system": false
}
],
"table_rows": 1,
"table_size": 64,
"replica_num": 1,
"inited": true,
"subtables": [],
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"view": {
"id": {
"sort": 0
},
"note": {
"sort": 1
}
},
"deps": 0,
"last_write_at_ms": 1788220800000
}
}
POST /v1/table/init — Initialize a table
POST /v1/table/init — Initialize a table
id column. Column IDs and names must be unique. Time tables have fixed columns; block tables retain their system columns.Method: POSTPath:
/v1/table/initParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
columns | object[] | No | Column definitions |
indexes | object[] | No | Index definitions |
view | object / null | No | Table display settings |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–64 characters |
name | string | Yes | Name; 1–64 characters |
type | string | Yes | Logical column type; see the data types reference; see Data types; ≥ 1 characters |
Show indexes — Item fields
Show indexes — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string / null | No | Required for Normal table indexes; retain an existing index’s ID to keep it; 1–64 characters |
columns | string[] | Yes | Column names in index order; ≥ 1 items |
is_hidden | boolean / null | No | Read-only flag; ignored when supplied |
is_system | boolean / null | No | Read-only flag; ignored when supplied |
is_primary | boolean / null | No | Read-only flag; ignored when supplied |
Show view — Value fields
Show view — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
sort | integer | No | Column display order, starting at 0 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
chain_id | string / null | Platform chain identifier, such as eth; empty or null for non-block tables |
table_type | string | Table type |
description | string / null | Description |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
columns | object[] | Initialized column definitions; omitted from list responses |
indexes | object[] | Initialized indexes; omitted from list responses |
view | object / null | Table display settings |
start_height | integer / null | Start block height |
deps | integer | Number of dependencies reading the table |
last_write_at_ms | integer / null | Last write time in Unix milliseconds; null if unavailable |
first_write_at | number / null | First write time in Unix seconds; returned for Time tables |
inited | boolean | Whether initialized; returned by detail and schema operations |
table_rows | integer | Number of table rows |
table_size | integer | Table data size in bytes |
replica_num | integer | Number of replicas |
s3_synced_at | number / null | Data synchronization time in Unix seconds |
subtables | object[] | Related tables |
parent | object | Owning table’s ID and type |
label | string | Display label or category |
relations | object[] | Related tables |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string | Name |
type | string | Logical column type; see the data types reference; see Data types |
is_system | boolean | Whether this is a system column or index |
Show indexes — Item fields
Show indexes — Item fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
columns | string[] | Column names in index order |
is_primary | boolean | Whether this is the primary key index |
is_system | boolean | Whether this is a system column or index |
is_hidden | boolean | Whether the index is hidden |
Show view — Value fields
Show view — Value fields
| Field | Type | Description |
|---|---|---|
sort | integer | Column display order, starting at 0 |
Show subtables — Item fields
Show subtables — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
Show parent — Fields
Show parent — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
table_type | string | Table type |
Show relations — Item fields
Show relations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
curl https://api.chaintable.com/v1/table/init \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "demo.asset_notes",
"columns": [
{
"id": "id",
"name": "id",
"type": "STRING"
},
{
"id": "note",
"name": "note",
"type": "STRING"
}
],
"indexes": [],
"view": {
"id": {
"sort": 0
},
"note": {
"sort": 1
}
}
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.asset_notes",
"space": "demo",
"name": "asset_notes",
"chain_id": "",
"table_type": "normal",
"description": "Asset notes",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"columns": [
{
"id": "id",
"name": "id",
"type": "STRING",
"is_system": true
},
{
"id": "note",
"name": "note",
"type": "STRING",
"is_system": false
}
],
"indexes": [
{
"columns": [
"id"
],
"is_primary": true,
"is_system": true
}
],
"table_rows": 1,
"table_size": 64,
"replica_num": 1,
"inited": true,
"subtables": [],
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"view": {
"id": {
"sort": 0
},
"note": {
"sort": 1
}
},
"deps": 0,
"last_write_at_ms": 1788220800000
}
}
GET /v1/table/instance/list — List related Notebook instances
GET /v1/table/instance/list — List related Notebook instances
access selects read or write activity. Returns instances visible to the caller.Method: GETPath:
/v1/table/instance/listParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
access | string | Yes | Read or write activity; Values: "read", "write" |
limit | integer | No | Maximum number of entries; ≥ 1; Default 100 |
| Field | Type | Description |
|---|---|---|
instances | object[] | Notebook execution instances |
count | integer | Number of returned instances |
Show instances — Item fields
Show instances — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
last_accessed_at_ms | integer / null | Last access time in Unix milliseconds |
name | string / null | Name |
display_status | string | Instance display status; Values: "running", "succeeded", "failed", "canceled", "starting" |
launched | string | How the instance was launched; Values: "manual", "schedule" |
notebook_id | string / null | Notebook ID |
schedule_id | string / null | Schedule ID |
exit_message | string / null | Exit reason; null while running |
curl --get https://api.chaintable.com/v1/table/instance/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=demo.asset_notes \
--data-urlencode access=write \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"instances": [
{
"id": "01900000000070008000000000000009",
"last_accessed_at_ms": 1788220800000,
"name": "print_message",
"display_status": "running",
"launched": "manual",
"notebook_id": "01900000000070008000000000000002",
"schedule_id": null,
"exit_message": null
}
],
"count": 1
}
}
GET /v1/table/list — List tables
GET /v1/table/list — List tables
GETPath:
/v1/table/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 100; Default 10 |
order_by | string | No | Sort field; Values: "id", "name", "created_at", "updated_at"; Default "updated_at" |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
space | string / null | No | Filter by Space; when omitted, list resources in visible Spaces; 1–64 characters |
name | string / null | No | Name substring filter |
with_activity | boolean | No | Include usage and write activity; Default false |
| Field | Type | Description |
|---|---|---|
start | integer | Pagination offset, starting at 0 |
limit | integer | Maximum number of entries |
items | object[] | Entries on this page |
total_count | integer | Total number of matching entries |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
chain_id | string / null | Platform chain identifier, such as eth; empty or null for non-block tables |
table_type | string | Table type |
description | string / null | Description |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
deps | integer | Number of dependencies reading the table |
last_write_at_ms | integer / null | Last write time in Unix milliseconds; null if unavailable |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl --get https://api.chaintable.com/v1/table/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode space=demo \
--data-urlencode limit=10 \
--data-urlencode with_activity=true
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "demo.asset_notes",
"space": "demo",
"name": "asset_notes",
"chain_id": "",
"table_type": "normal",
"description": "Asset notes",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"deps": 0,
"last_write_at_ms": 1788220800000
}
],
"total_count": 1,
"start": 0,
"limit": 10
}
}
POST /v1/table/row/create — Upsert a row
POST /v1/table/row/create — Upsert a row
id in data and use values matching the table schema.Method: POSTPath:
/v1/table/row/createParameters| Field | Type | Required | Description |
|---|---|---|---|
table_id | string | Yes | Full table ID; 1–255 characters |
data | object | Yes | Row fields and values |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/table/row/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"table_id": "demo.asset_notes",
"data": {
"id": "usdc",
"note": "Stablecoin"
}
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/table/row/delete — Delete a row
POST /v1/table/row/delete — Delete a row
id is the primary key of the row to delete.Method: POSTPath:
/v1/table/row/deleteParameters| Field | Type | Required | Description |
|---|---|---|---|
table_id | string | Yes | Full table ID; 1–255 characters |
id | string | Yes | Row primary key; ≥ 1 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/table/row/delete \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"table_id": "demo.asset_notes",
"id": "usdc"
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/table/row/get — Read rows by primary key
POST /v1/table/row/get — Read rows by primary key
pks is an array of primary key strings with up to 10,000 entries.Method: POSTPath:
/v1/table/row/getParameters| Field | Type | Required | Description |
|---|---|---|---|
table_id | string | Yes | Full table ID; 1–255 characters |
pks | string[] | Yes | Primary key values; ≤ 10000 items |
| Field | Type | Description |
|---|---|---|
columns | object[] | Result column definitions |
rows | object[] | Result rows, each keyed by column name |
total_count | integer / null | Matching row count for row/get; normally null for row/list and row/query |
start | integer | Pagination offset returned by row/list |
limit | integer | Page size returned by row/list |
truncated | boolean | Whether row/query results were truncated |
rows_count | integer | Number of rows returned by row/query |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Type |
curl https://api.chaintable.com/v1/table/row/get \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"table_id": "demo.asset_notes",
"pks": [
"usdc"
]
}'
{
"code": 0,
"message": "ok",
"data": {
"columns": [
{
"id": "id",
"name": "id",
"type": "STRING"
},
{
"id": "note",
"name": "note",
"type": "STRING"
}
],
"rows": [
{
"id": "usdc",
"note": "Stablecoin"
}
],
"total_count": 1
}
}
GET /v1/table/row/list — List rows
GET /v1/table/row/list — List rows
GETPath:
/v1/table/row/listParameters| Field | Type | Required | Description |
|---|---|---|---|
table_id | string | Yes | Full table ID; 1–255 characters |
start | integer | No | Pagination offset, starting at 0; ≥ 0; ≤ 9223372036854775807; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 10000; Default 1000 |
filter | string / null | No | JSON-encoded filter conditions |
order_by | string / null | No | Sort field |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
| Field | Type | Description |
|---|---|---|
columns | object[] | Result column definitions |
rows | object[] | Result rows, each keyed by column name |
total_count | integer / null | Matching row count for row/get; normally null for row/list and row/query |
start | integer | Pagination offset returned by row/list |
limit | integer | Page size returned by row/list |
truncated | boolean | Whether row/query results were truncated |
rows_count | integer | Number of rows returned by row/query |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Type |
curl --get https://api.chaintable.com/v1/table/row/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode table_id=demo.asset_notes \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"columns": [
{
"id": "id",
"name": "id",
"type": "STRING"
},
{
"id": "note",
"name": "note",
"type": "STRING"
}
],
"rows": [
{
"id": "usdc",
"note": "Stablecoin"
}
],
"total_count": null,
"start": 0,
"limit": 10
}
}
POST /v1/table/row/query — Query one table
POST /v1/table/row/query — Query one table
SELECT * statement against the specified table, with WHERE, ORDER BY, and LIMIT. Returns up to 10,000 rows. Use Query endpoints for aggregation and joins.Method: POSTPath:
/v1/table/row/queryParameters| Field | Type | Required | Description |
|---|---|---|---|
table_id | string | Yes | Full table ID; 1–255 characters |
sql | string | Yes | Single-table SQL query; ≥ 1 characters |
| Field | Type | Description |
|---|---|---|
columns | object[] | Result column definitions |
rows | object[] | Result rows, each keyed by column name |
total_count | integer / null | Matching row count for row/get; normally null for row/list and row/query |
start | integer | Pagination offset returned by row/list |
limit | integer | Page size returned by row/list |
truncated | boolean | Whether row/query results were truncated |
rows_count | integer | Number of rows returned by row/query |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Type |
curl https://api.chaintable.com/v1/table/row/query \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"table_id": "demo.asset_notes",
"sql": "SELECT * FROM demo.asset_notes LIMIT 10"
}'
{
"code": 0,
"message": "ok",
"data": {
"columns": [
{
"name": "id",
"type": "STRING"
},
{
"name": "note",
"type": "STRING"
}
],
"rows": [
{
"id": "usdc",
"note": "Stablecoin"
}
],
"total_count": null,
"rows_count": 1,
"truncated": false
}
}
POST /v1/table/row/update — Update a row
POST /v1/table/row/update — Update a row
data.id must match the top-level id.Method: POSTPath:
/v1/table/row/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
table_id | string | Yes | Full table ID; 1–255 characters |
id | string | Yes | Row primary key; ≥ 1 characters |
data | object | Yes | Row fields and values |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/table/row/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"table_id": "demo.asset_notes",
"id": "usdc",
"data": {
"note": "USD Coin"
}
}'
{
"code": 0,
"message": "ok",
"data": null
}
GET /v1/table/start_height/editable — Check whether the start height can change
GET /v1/table/start_height/editable — Check whether the start height can change
GETPath:
/v1/table/start_height/editableParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
| Field | Type | Description |
|---|---|---|
editable | boolean | Whether the start height can be changed |
reason | string / null | Reason, or null when none applies |
curl --get https://api.chaintable.com/v1/table/start_height/editable \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=demo.pool_reserves.eth
{
"code": 0,
"message": "ok",
"data": {
"editable": true,
"reason": null
}
}
POST /v1/table/start_height/update — Set the start height
POST /v1/table/start_height/update — Set the start height
/v1/table/start_height/editable first.Method: POSTPath:
/v1/table/start_height/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
start_height | integer | Yes | Start block height; ≥ 0; ≤ 9223372036854775807 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
chain_id | string / null | Platform chain identifier, such as eth; empty or null for non-block tables |
table_type | string | Table type |
description | string / null | Description |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
columns | object[] | Initialized column definitions; omitted from list responses |
indexes | object[] | Initialized indexes; omitted from list responses |
view | object / null | Table display settings |
start_height | integer / null | Start block height |
deps | integer | Number of dependencies reading the table |
last_write_at_ms | integer / null | Last write time in Unix milliseconds; null if unavailable |
first_write_at | number / null | First write time in Unix seconds; returned for Time tables |
inited | boolean | Whether initialized; returned by detail and schema operations |
table_rows | integer | Number of table rows |
table_size | integer | Table data size in bytes |
replica_num | integer | Number of replicas |
s3_synced_at | number / null | Data synchronization time in Unix seconds |
subtables | object[] | Related tables |
parent | object | Owning table’s ID and type |
label | string | Display label or category |
relations | object[] | Related tables |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string | Name |
type | string | Logical column type; see the data types reference; see Data types |
is_system | boolean | Whether this is a system column or index |
Show indexes — Item fields
Show indexes — Item fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
columns | string[] | Column names in index order |
is_primary | boolean | Whether this is the primary key index |
is_system | boolean | Whether this is a system column or index |
is_hidden | boolean | Whether the index is hidden |
Show view — Value fields
Show view — Value fields
| Field | Type | Description |
|---|---|---|
sort | integer | Column display order, starting at 0 |
Show subtables — Item fields
Show subtables — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
Show parent — Fields
Show parent — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
table_type | string | Table type |
Show relations — Item fields
Show relations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
curl https://api.chaintable.com/v1/table/start_height/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "demo.pool_reserves.eth",
"start_height": 21000000
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.pool_reserves.eth",
"space": "demo",
"name": "pool_reserves.eth",
"chain_id": "eth",
"table_type": "block_state",
"description": "Asset notes",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"columns": [
{
"id": "id",
"name": "id",
"type": "HASH",
"is_system": true
},
{
"id": "block_height",
"name": "block_height",
"type": "BLOCKHEIGHT",
"is_system": true
},
{
"id": "block_id",
"name": "block_id",
"type": "HASH",
"is_system": true
},
{
"id": "block_timestamp",
"name": "block_timestamp",
"type": "TIMESTAMP",
"is_system": true
}
],
"indexes": [
{
"columns": [
"id"
],
"is_primary": true,
"is_system": true
}
],
"table_rows": 0,
"table_size": 0,
"replica_num": 1,
"inited": true,
"subtables": [],
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"view": {},
"start_height": 21000000
}
}
GET /v1/table/stats/block — Get block write statistics
GET /v1/table/stats/block — Get block write statistics
recent is the number of recent blocks. Returned lag values are in milliseconds.Method: GETPath:
/v1/table/stats/blockParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
recent | integer | No | Number of recent blocks; ≥ 1; ≤ 60; Default 30 |
| Field | Type | Description |
|---|---|---|
start_height | integer | Start block height |
consensus_height | integer / null | Table consensus height, or null if unavailable |
chain_height | integer / null | Current chain height, or null if unavailable |
completeness | object[] | Processed block height ranges |
blocks | object[] | Per-block write statistics |
completeness_count | integer | Total processed ranges; completeness may be empty when there are too many ranges |
Show completeness — Item fields
Show completeness — Item fields
| Field | Type | Description |
|---|---|---|
start | integer | Start height of a processed range |
end | integer | End block height |
Show blocks — Item fields
Show blocks — Item fields
| Field | Type | Description |
|---|---|---|
block_height | integer | Block height |
rows | integer | Number of rows written for the block |
lag_ms | integer / null | Processing lag in milliseconds, or null if unavailable |
processed | boolean | Whether the block has been processed |
curl --get https://api.chaintable.com/v1/table/stats/block \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=demo.pool_reserves.eth \
--data-urlencode recent=2
{
"code": 0,
"message": "ok",
"data": {
"start_height": 21000000,
"consensus_height": 21000001,
"chain_height": 21000001,
"completeness": [
{
"start": 21000000,
"end": 21000001
}
],
"completeness_count": 1,
"blocks": [
{
"block_height": 21000000,
"rows": 1,
"lag_ms": 50,
"processed": true
},
{
"block_height": 21000001,
"rows": 0,
"lag_ms": 45,
"processed": true
}
]
}
}
GET /v1/table/stats/daily — Get daily write statistics
GET /v1/table/stats/daily — Get daily write statistics
year, or supply both from and to in YYYY-MM-DD format.Method: GETPath:
/v1/table/stats/dailyParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
year | integer / null | No | Year to summarize; ≥ 1; ≤ 9999 |
from | string / null | No | Start date; date |
to | string / null | No | End date; date |
| Field | Type | Description |
|---|---|---|
buckets | object[] | Write statistics grouped by time |
Show buckets — Item fields
Show buckets — Item fields
| Field | Type | Description |
|---|---|---|
time_at | string / number | Date for daily statistics; Unix seconds for minute statistics |
rows | integer | Number of records in the time bucket |
curl --get https://api.chaintable.com/v1/table/stats/daily \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=demo.price_samples \
--data-urlencode from=2026-09-01 \
--data-urlencode to=2026-09-01
{
"code": 0,
"message": "ok",
"data": {
"buckets": [
{
"time_at": "2026-09-01",
"rows": 1
}
]
}
}
GET /v1/table/stats/minute — Get per-minute write statistics
GET /v1/table/stats/minute — Get per-minute write statistics
GETPath:
/v1/table/stats/minuteParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
minutes | integer | No | Number of recent minutes; ≥ 1; ≤ 60; Default 30 |
| Field | Type | Description |
|---|---|---|
buckets | object[] | Write statistics grouped by time |
Show buckets — Item fields
Show buckets — Item fields
| Field | Type | Description |
|---|---|---|
time_at | string / number | Date for daily statistics; Unix seconds for minute statistics |
rows | integer | Number of records in the time bucket |
curl --get https://api.chaintable.com/v1/table/stats/minute \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=demo.price_samples \
--data-urlencode minutes=1
{
"code": 0,
"message": "ok",
"data": {
"buckets": [
{
"time_at": 1788220800.0,
"rows": 1
}
]
}
}
GET /v1/table/templates — Get a table template
GET /v1/table/templates — Get a table template
GETPath:
/v1/table/templatesParameters| Field | Type | Required | Description |
|---|---|---|---|
table_type | string | No | Table type; Values: "normal", "block_event", "block_state", "time"; Default "normal" |
| Field | Type | Description |
|---|---|---|
columns | object[] | Column definitions |
indexes | object[] | Index definitions |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string | Name |
type | string | Logical column type; see the data types reference; see Data types |
is_system | boolean | Whether this is a system column or index |
Show indexes — Item fields
Show indexes — Item fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
columns | string[] | Column names in index order |
is_primary | boolean | Whether this is the primary key index |
is_system | boolean | Whether this is a system column or index |
is_hidden | boolean | Whether the index is hidden |
curl --get https://api.chaintable.com/v1/table/templates \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode table_type=normal
{
"code": 0,
"message": "ok",
"data": {
"columns": [
{
"name": "id",
"type": "STRING"
}
],
"indexes": []
}
}
POST /v1/table/view/update — Update table display settings
POST /v1/table/view/update — Update table display settings
POSTPath:
/v1/table/view/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full table ID, such as demo.asset_notes; 1–255 characters |
view | object / null | Yes | Table display settings |
Show view — Value fields
Show view — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
sort | integer | No | Column display order, starting at 0 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
chain_id | string / null | Platform chain identifier, such as eth; empty or null for non-block tables |
table_type | string | Table type |
description | string / null | Description |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
columns | object[] | Initialized column definitions; omitted from list responses |
indexes | object[] | Initialized indexes; omitted from list responses |
view | object / null | Table display settings |
start_height | integer / null | Start block height |
deps | integer | Number of dependencies reading the table |
last_write_at_ms | integer / null | Last write time in Unix milliseconds; null if unavailable |
first_write_at | number / null | First write time in Unix seconds; returned for Time tables |
inited | boolean | Whether initialized; returned by detail and schema operations |
table_rows | integer | Number of table rows |
table_size | integer | Table data size in bytes |
replica_num | integer | Number of replicas |
s3_synced_at | number / null | Data synchronization time in Unix seconds |
subtables | object[] | Related tables |
parent | object | Owning table’s ID and type |
label | string | Display label or category |
relations | object[] | Related tables |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string | Name |
type | string | Logical column type; see the data types reference; see Data types |
is_system | boolean | Whether this is a system column or index |
Show indexes — Item fields
Show indexes — Item fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
columns | string[] | Column names in index order |
is_primary | boolean | Whether this is the primary key index |
is_system | boolean | Whether this is a system column or index |
is_hidden | boolean | Whether the index is hidden |
Show view — Value fields
Show view — Value fields
| Field | Type | Description |
|---|---|---|
sort | integer | Column display order, starting at 0 |
Show subtables — Item fields
Show subtables — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
Show parent — Fields
Show parent — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
table_type | string | Table type |
Show relations — Item fields
Show relations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
label | string | Display label or category |
curl https://api.chaintable.com/v1/table/view/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "demo.asset_notes",
"view": {
"id": {
"sort": 0
},
"note": {
"sort": 1
}
}
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.asset_notes",
"space": "demo",
"name": "asset_notes",
"chain_id": "",
"table_type": "normal",
"description": "Asset notes",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"columns": [
{
"id": "id",
"name": "id",
"type": "STRING",
"is_system": true
},
{
"id": "note",
"name": "note",
"type": "STRING",
"is_system": false
}
],
"indexes": [
{
"columns": [
"id"
],
"is_primary": true,
"is_system": true
}
],
"table_rows": 1,
"table_size": 64,
"replica_num": 1,
"inited": true,
"subtables": [],
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"view": {
"id": {
"sort": 0
},
"note": {
"sort": 1
}
},
"deps": 0,
"last_write_at_ms": 1788220800000
}
}
function
GET /v1/function — Get a Function
GET /v1/function — Get a Function
GETPath:
/v1/functionParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full Function ID, such as demo.usdc_amount; 1–255 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | Executable code; SQL for a Query |
parameters | object[] | Parameter definitions |
return_type | string / null | Return type |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Parameter name |
type | string | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Parameter display ID; generated by the service in responses |
order | integer / null | Parameter order; Function parameters must all omit it or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl --get https://api.chaintable.com/v1/function \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=demo.usdc_amount
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.usdc_amount",
"space": "demo",
"name": "usdc_amount",
"language": "python",
"code": "def usdc_amount(raw_amount):\n return raw_amount / 10**6",
"parameters": [
{
"name": "raw_amount",
"type": "INT",
"options": null,
"default": null,
"id": "01900000000070008000000000000014",
"order": 0
}
],
"return_type": "FLOAT",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
POST /v1/function/create — Create a Function
POST /v1/function/create — Create a Function
POSTPath:
/v1/function/createParameters| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name; 1–255 characters |
language | string | Yes | Code language; Values: "python", "go", "javascript", "sql" |
code | string | No | Executable code; SQL for a Query; Default "" |
parameters | object[] | No | Parameter definitions; updates replace the entire array |
return_type | string | No | Return type; Default "" |
space | string | Yes | Space ID; 1–64 characters |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string / null | Yes | Parameter name |
type | string | Yes | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | No | Allowed choices for the parameter |
default | object / null | No | Default parameter value |
id | JSON / null | No | Parameter display ID; generated by the service in responses |
order | integer / null | No | Parameter order; Function parameters must all omit it or use consecutive values from 0; ≥ 0 |
Show default — Fields
Show default — Fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | Executable code; SQL for a Query |
parameters | object[] | Parameter definitions |
return_type | string / null | Return type |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Parameter name |
type | string | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Parameter display ID; generated by the service in responses |
order | integer / null | Parameter order; Function parameters must all omit it or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/function/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"space": "demo",
"name": "usdc_amount",
"language": "python",
"code": "def usdc_amount(raw_amount):\n return raw_amount / 10**6",
"parameters": [
{
"name": "raw_amount",
"type": "INT"
}
],
"return_type": "FLOAT"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.usdc_amount",
"space": "demo",
"name": "usdc_amount",
"language": "python",
"code": "def usdc_amount(raw_amount):\n return raw_amount / 10**6",
"parameters": [
{
"name": "raw_amount",
"type": "INT",
"options": null,
"default": null,
"id": "01900000000070008000000000000014",
"order": 0
}
],
"return_type": "FLOAT",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
POST /v1/function/delete — Delete a Function
POST /v1/function/delete — Delete a Function
POSTPath:
/v1/function/deleteParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full Function ID, such as demo.usdc_amount; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/function/delete \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "demo.usdc_amount"
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/function/invoke — Invoke a saved Function
POST /v1/function/invoke — Invoke a saved Function
arguments, or [] for no arguments.Method: POSTPath:
/v1/function/invokeParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full Function ID, such as demo.usdc_amount; 1–255 characters |
arguments | JSON[] | Yes | Positional argument values; pass [] for no arguments |
| Field | Type | Description |
|---|---|---|
data | JSON | JSON value returned by the Function, determined by its return type and implementation |
curl https://api.chaintable.com/v1/function/invoke \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"id": "demo.usdc_amount",
"arguments": [
1500000
]
}'
{
"code": 0,
"message": "ok",
"data": 1.5
}
GET /v1/function/list — List Functions
GET /v1/function/list — List Functions
GETPath:
/v1/function/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 10000; Default 20 |
order_by | string | No | Sort field; Values: "id", "name", "created_at", "updated_at"; Default "updated_at" |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
space | string / null | No | Filter by Space; when omitted, list resources in visible Spaces; 1–64 characters |
name | string / null | No | Name substring filter |
keyword | string / null | No | Search keyword |
match_type | string | No | Search scope; Values: "name", "code"; Default "name" |
| Field | Type | Description |
|---|---|---|
start | integer | Pagination offset, starting at 0 |
limit | integer | Maximum number of entries |
items | object[] | Entries on this page |
total_count | integer | Total number of matching entries |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | Executable code; SQL for a Query |
parameters | object[] | Parameter definitions |
return_type | string / null | Return type |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
matched_lines | object[] | Returned for code keyword searches, with at most 10 lines |
matched_line_count | integer | Total matching line count for a code keyword search |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Parameter name |
type | string | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Parameter display ID; generated by the service in responses |
order | integer / null | Parameter order; Function parameters must all omit it or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show matched_lines — Item fields
Show matched_lines — Item fields
| Field | Type | Description |
|---|---|---|
line | integer | Code line number, starting at 1 |
text | string | Contents of the matching code line |
curl --get https://api.chaintable.com/v1/function/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode space=demo \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "demo.usdc_amount",
"space": "demo",
"name": "usdc_amount",
"language": "python",
"code": "def usdc_amount(raw_amount):\n return raw_amount / 10**6",
"parameters": [
{
"name": "raw_amount",
"type": "INT",
"options": null,
"default": null,
"id": "01900000000070008000000000000014",
"order": 0
}
],
"return_type": "FLOAT",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
],
"total_count": 1,
"start": 0,
"limit": 10
}
}
POST /v1/function/run — Run Function code
POST /v1/function/run — Run Function code
status indicates the execution outcome; output contains debug output and error details.Method: POSTPath:
/v1/function/runParameters| Field | Type | Required | Description |
|---|---|---|---|
language | string | Yes | Code language; Values: "python", "go", "javascript", "sql" |
code | string | Yes | Executable code; SQL for a Query; ≥ 1 characters |
func_name | string | No | Entry function name; Default "" |
parameters | object[] | No | Parameter definitions; updates replace the entire array |
arguments | object[] | No | Argument values for this execution |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string / null | Yes | Parameter name |
type | string | Yes | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | No | Allowed choices for the parameter |
default | object / null | No | Default parameter value |
id | JSON / null | No | Parameter display ID; generated by the service in responses |
order | integer / null | No | Parameter order; Function parameters must all omit it or use consecutive values from 0; ≥ 0 |
Show default — Fields
Show default — Fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
name | string / null | No | Name of the matching parameter |
order | integer / null | No | Omit for every argument, or use consecutive values from 0 to determine argument order; ≥ 0 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
language | string | Code language |
code | string | Executable code; SQL for a Query |
parameters | object[] | Parameter definitions |
args | JSON[] | Resolved positional argument values |
status | string | Execution outcome; Values: "succeeded", "failed", "timeout" |
output | object | Debug output and error details |
return_value | JSON | Function’s JSON return value; null on failure |
creator_id | string | Creator’s user ID |
created_at | number | Creation time in Unix seconds |
started_at | number | Start time in Unix seconds; null before execution starts |
finished_at | number | Completion time in Unix seconds; null before completion |
arguments | object[] | Argument values for this execution |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Parameter name |
type | string | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Parameter display ID; generated by the service in responses |
order | integer / null | Parameter order; Function parameters must all omit it or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show output — Fields
Show output — Fields
| Field | Type | Description |
|---|---|---|
text | string | Captured standard output and standard error text |
truncated | boolean | Whether the captured output was truncated |
original_size_bytes | integer | Output size before truncation, in bytes |
failure | object / null | Failure details, or null on success |
error_stack | string | Error stack trace |
local_vars_json | string | JSON-encoded local variables at the failure location |
execution_duration_ms | integer | Execution duration in milliseconds |
queue_wait_ms | integer | Queue wait in milliseconds |
call_id | string / null | Upstream call ID |
Show failure — Fields
Show failure — Fields
| Field | Type | Description |
|---|---|---|
code | string | Upstream failure type identifier |
message | string | Description or error message |
retryable | boolean | Whether the upstream marks the failure as retryable |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
curl https://api.chaintable.com/v1/function/run \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"language": "python",
"code": "def usdc_amount(raw_amount):\n return raw_amount / 10**6",
"func_name": "usdc_amount",
"parameters": [
{
"name": "raw_amount",
"type": "INT"
}
],
"arguments": [
{
"name": "raw_amount",
"value": 1500000
}
]
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000017",
"language": "python",
"code": "def usdc_amount(raw_amount):\n return raw_amount / 10**6",
"parameters": [
{
"name": "raw_amount",
"type": "INT",
"options": null,
"default": null,
"id": "01900000000070008000000000000014",
"order": 0
}
],
"args": [
1500000
],
"arguments": [
{
"name": "raw_amount",
"value": 1500000,
"order": null
}
],
"status": "succeeded",
"output": {
"text": "",
"truncated": false,
"original_size_bytes": 0,
"failure": null,
"error_stack": "",
"local_vars_json": "",
"execution_duration_ms": 2,
"queue_wait_ms": 0,
"call_id": "01900000000070008000000000000018"
},
"return_value": 1.5,
"creator_id": "0190000000007000800000000000000c",
"created_at": 1788220800.0,
"started_at": 1788220800.0,
"finished_at": 1788220800.002
}
}
GET /v1/function/testcase — Get a test case
GET /v1/function/testcase — Get a test case
GETPath:
/v1/function/testcaseParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
function_id | string / null | Full Function ID |
arguments | JSON[] | Positional argument values for the test case |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
curl --get https://api.chaintable.com/v1/function/testcase \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000008
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000008",
"function_id": "demo.usdc_amount",
"arguments": [
1500000
],
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
}
POST /v1/function/testcase/create — Create a test case
POST /v1/function/testcase/create — Create a test case
arguments is an array of JSON values. Duplicate arguments for the same Function return 409.Method: POSTPath:
/v1/function/testcase/createParameters| Field | Type | Required | Description |
|---|---|---|---|
function_id | string | Yes | Full Function ID; 1–255 characters |
arguments | JSON[] | No | Positional argument values for the test case |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
function_id | string / null | Full Function ID |
arguments | JSON[] | Positional argument values for the test case |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
curl https://api.chaintable.com/v1/function/testcase/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"function_id": "demo.usdc_amount",
"arguments": [
1500000
]
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000008",
"function_id": "demo.usdc_amount",
"arguments": [
1500000
],
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
}
POST /v1/function/testcase/delete — Delete a test case
POST /v1/function/testcase/delete — Delete a test case
POSTPath:
/v1/function/testcase/deleteParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/function/testcase/delete \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000008"
}'
{
"code": 0,
"message": "ok",
"data": null
}
GET /v1/function/testcase/list — List test cases
GET /v1/function/testcase/list — List test cases
GETPath:
/v1/function/testcase/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 100; Default 20 |
function_id | string | Yes | Full Function ID; 1–255 characters |
order_by | string | No | Sort field; Values: "id", "created_at", "updated_at"; Default "updated_at" |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
| Field | Type | Description |
|---|---|---|
start | integer | Pagination offset, starting at 0 |
limit | integer | Maximum number of entries |
items | object[] | Entries on this page |
total_count | integer | Total number of matching entries |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
function_id | string / null | Full Function ID |
arguments | JSON[] | Argument values for this execution |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
curl --get https://api.chaintable.com/v1/function/testcase/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode function_id=demo.usdc_amount \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "01900000000070008000000000000008",
"function_id": "demo.usdc_amount",
"arguments": [
1500000
],
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
],
"total_count": 1,
"start": 0,
"limit": 10
}
}
POST /v1/function/testcase/update — Update a test case
POST /v1/function/testcase/update — Update a test case
arguments as a whole. The owning Function cannot change.Method: POSTPath:
/v1/function/testcase/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
arguments | JSON[] | No | Positional argument values for the test case |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
function_id | string / null | Full Function ID |
arguments | JSON[] | Positional argument values for the test case |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
curl https://api.chaintable.com/v1/function/testcase/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000008",
"arguments": [
2000000
]
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000008",
"function_id": "demo.usdc_amount",
"arguments": [
2000000
],
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
}
POST /v1/function/update — Update a Function
POST /v1/function/update — Update a Function
POSTPath:
/v1/function/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Full Function ID, such as demo.usdc_amount; 1–255 characters |
name | string | No | Name; 1–255 characters |
language | string | No | Code language; Values: "python", "go", "javascript", "sql" |
code | string | No | Executable code; SQL for a Query |
parameters | object[] | No | Parameter definitions; updates replace the entire array |
return_type | string | No | Return type |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string / null | Yes | Parameter name |
type | string | Yes | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | No | Allowed choices for the parameter |
default | object / null | No | Default parameter value |
id | JSON / null | No | Parameter display ID; generated by the service in responses |
order | integer / null | No | Parameter order; Function parameters must all omit it or use consecutive values from 0; ≥ 0 |
Show default — Fields
Show default — Fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | Executable code; SQL for a Query |
parameters | object[] | Parameter definitions |
return_type | string / null | Return type |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Parameter name |
type | string | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Parameter display ID; generated by the service in responses |
order | integer / null | Parameter order; Function parameters must all omit it or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/function/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "demo.usdc_amount",
"code": "def usdc_amount(raw_amount):\n return raw_amount / 10**6"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "demo.usdc_amount",
"space": "demo",
"name": "usdc_amount",
"language": "python",
"code": "def usdc_amount(raw_amount):\n return raw_amount / 10**6",
"parameters": [
{
"name": "raw_amount",
"type": "INT",
"options": null,
"default": null,
"id": "01900000000070008000000000000014",
"order": 0
}
],
"return_type": "FLOAT",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
notebook
GET /v1/notebook — Get a Notebook
GET /v1/notebook — Get a Notebook
GETPath:
/v1/notebookParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | Notebook code; omitted from list responses |
parameters | object[] | Parameter definitions |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Unique object ID |
order | integer / null | Parameter order; consecutive numbering is not required |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl --get https://api.chaintable.com/v1/notebook \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000002
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000002",
"space": "demo",
"name": "print_message",
"language": "python",
"code": "print(\"Hello, Chaintable\")",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
POST /v1/notebook/create — Create a Notebook
POST /v1/notebook/create — Create a Notebook
POSTPath:
/v1/notebook/createParameters| Field | Type | Required | Description |
|---|---|---|---|
space | string | Yes | Space ID; 1–64 characters |
name | string | Yes | Name; 1–255 characters |
language | string | No | Code language; Values: "python"; Default "python" |
code | string / null | No | Executable code; SQL for a Query; Default "" |
parameters | object[] / null | No | Parameter definitions; updates replace the entire array |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string / null | Yes | Name |
type | string | Yes | Logical parameter type; see Data types |
options | JSON[] / null | No | Allowed choices for the parameter |
default | object / null | No | Default parameter value |
id | JSON / null | No | Unique object ID |
order | integer / null | No | Parameter order; consecutive numbering is not required; ≥ 0 |
Show default — Fields
Show default — Fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | Notebook code; omitted from list responses |
parameters | object[] | Parameter definitions |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Unique object ID |
order | integer / null | Parameter order; consecutive numbering is not required |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/notebook/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"space": "demo",
"name": "print_message",
"language": "python",
"code": "print(\"Hello, Chaintable\")",
"parameters": []
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000002",
"space": "demo",
"name": "print_message",
"language": "python",
"code": "print(\"Hello, Chaintable\")",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
POST /v1/notebook/delete — Delete a Notebook
POST /v1/notebook/delete — Delete a Notebook
POSTPath:
/v1/notebook/deleteParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/notebook/delete \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000002"
}'
{
"code": 0,
"message": "ok",
"data": null
}
GET /v1/notebook/instance — Get an instance
GET /v1/notebook/instance — Get an instance
GETPath:
/v1/notebook/instanceParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Notebook execution instance ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
notebook_id | string / null | Notebook ID |
name | string / null | Name |
code | string / null | Code for this execution; omitted from instance lists |
parameters | object[] | Parameter definitions |
arguments | object[] | Argument values for this execution |
max_memory | integer / null | Memory allocation in bytes |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_network_rx | integer / null | Recorded network receive allocation |
max_network_tx | integer / null | Recorded network transmit allocation |
account_id | string / null | Account ID |
user_id | string / null | ID of the user who started execution |
schedule_id | string / null | Schedule ID |
background | boolean / null | Whether to run in the background |
debug | boolean / null | Whether to use debug mode |
deadline | number / null | Foreground instance expiry in Unix seconds; null for background instances |
status | string | Status; Values: "running", "ended" |
exit_code | integer / null | Exit code; null while running, 0 on success |
oom_killed | boolean / null | Whether the instance was terminated for exceeding memory |
exited_at | number / null | Exit time in Unix seconds; null while running |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
display_status | string | Instance display status; Values: "running", "succeeded", "failed", "canceled", "starting" |
launched | string | How the instance was launched; Values: "manual", "schedule" |
exit_message | string / null | Exit reason; null while running |
account | object / null | Account details |
user | object / null | Launcher details, or null if unavailable |
notebook | object / null | Related Notebook summary, or null if unavailable |
schedule | object / null | Related schedule, or null when none exists |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Unique object ID |
order | integer / null | Parameter order; consecutive numbering is not required |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show user — Fields
Show user — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show notebook — Fields
Show notebook — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string / null | Name |
space | string | Space ID |
Show schedule — Fields
Show schedule — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
deleted_at | number / null | Deletion time in Unix seconds; null if not deleted |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
curl --get https://api.chaintable.com/v1/notebook/instance \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000009
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000009",
"notebook_id": "01900000000070008000000000000002",
"name": "print_message",
"code": "print(\"Hello, Chaintable\")",
"parameters": [],
"arguments": [],
"max_cpu": 100,
"max_memory": 4294967296,
"max_network_rx": null,
"max_network_tx": null,
"account_id": "0190000000007000800000000000000b",
"user_id": "0190000000007000800000000000000c",
"schedule_id": null,
"background": false,
"debug": false,
"deadline": 1788220950.0,
"status": "running",
"exit_code": null,
"oom_killed": null,
"exited_at": null,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"display_status": "running",
"launched": "manual",
"exit_message": null,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
},
"user": {
"id": "0190000000007000800000000000000c",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": null
},
"notebook": {
"id": "01900000000070008000000000000002",
"name": "print_message",
"space": "demo"
},
"schedule": null
}
}
POST /v1/notebook/instance/cancel — Cancel an instance
POST /v1/notebook/instance/cancel — Cancel an instance
POSTPath:
/v1/notebook/instance/cancelParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Notebook execution instance ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/notebook/instance/cancel \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000009"
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/notebook/instance/keepalive — Keep a foreground instance alive
POST /v1/notebook/instance/keepalive — Keep a foreground instance alive
POSTPath:
/v1/notebook/instance/keepaliveParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Notebook execution instance ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/notebook/instance/keepalive \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000009"
}'
{
"code": 0,
"message": "ok",
"data": null
}
GET /v1/notebook/instance/list — List instances
GET /v1/notebook/instance/list — List instances
code. The effective limit is capped at 50. keyword takes precedence over name and matches the instance name or the launcher’s personal account slug.Method: GETPath:
/v1/notebook/instance/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; Default 10 |
notebook_id | string / null | No | Notebook ID |
schedule_id | string / null | No | Schedule ID |
display_status | string / null | No | Instance display status; Values: "running", "succeeded", "failed", "canceled" |
launched | string / null | No | How the instance was launched; Values: "manual", "schedule" |
keyword | string / null | No | Search keyword; ≤ 255 characters |
name | string / null | No | Name substring filter; ≤ 255 characters |
| Field | Type | Description |
|---|---|---|
total_count | integer | Total number of matching entries |
instances | object[] | Notebook execution instances |
Show instances — Item fields
Show instances — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
notebook_id | string / null | Notebook ID |
name | string / null | Name |
code | string / null | Code for this execution; omitted from instance lists |
parameters | object[] | Parameter definitions |
arguments | object[] | Argument values for this execution |
max_memory | integer / null | Memory allocation in bytes |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_network_rx | integer / null | Recorded network receive allocation |
max_network_tx | integer / null | Recorded network transmit allocation |
account_id | string / null | Account ID |
user_id | string / null | ID of the user who started execution |
schedule_id | string / null | Schedule ID |
background | boolean / null | Whether to run in the background |
debug | boolean / null | Whether to use debug mode |
deadline | number / null | Foreground instance expiry in Unix seconds; null for background instances |
status | string | Status; Values: "running", "ended" |
exit_code | integer / null | Exit code; null while running, 0 on success |
oom_killed | boolean / null | Whether the instance was terminated for exceeding memory |
exited_at | number / null | Exit time in Unix seconds; null while running |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
display_status | string | Instance display status; Values: "running", "succeeded", "failed", "canceled", "starting" |
launched | string | How the instance was launched; Values: "manual", "schedule" |
exit_message | string / null | Exit reason; null while running |
account | object / null | Account details |
user | object / null | Launcher details, or null if unavailable |
notebook | object / null | Related Notebook summary, or null if unavailable |
schedule | object / null | Related schedule, or null when none exists |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Unique object ID |
order | integer / null | Parameter order; consecutive numbering is not required |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show user — Fields
Show user — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show notebook — Fields
Show notebook — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string / null | Name |
space | string | Space ID |
Show schedule — Fields
Show schedule — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
deleted_at | number / null | Deletion time in Unix seconds; null if not deleted |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
curl --get https://api.chaintable.com/v1/notebook/instance/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode notebook_id=01900000000070008000000000000002 \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"total_count": 1,
"instances": [
{
"id": "01900000000070008000000000000009",
"notebook_id": "01900000000070008000000000000002",
"name": "print_message",
"parameters": [],
"arguments": [],
"max_cpu": 100,
"max_memory": 4294967296,
"max_network_rx": null,
"max_network_tx": null,
"account_id": "0190000000007000800000000000000b",
"user_id": "0190000000007000800000000000000c",
"schedule_id": null,
"background": false,
"debug": false,
"deadline": 1788220950.0,
"status": "running",
"exit_code": null,
"oom_killed": null,
"exited_at": null,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"display_status": "running",
"launched": "manual",
"exit_message": null,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
},
"user": {
"id": "0190000000007000800000000000000c",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": null
},
"notebook": {
"id": "01900000000070008000000000000002",
"name": "print_message",
"space": "demo"
},
"schedule": null
}
]
}
}
GET /v1/notebook/instance/logs/history — Read instance logs
GET /v1/notebook/instance/logs/history — Read instance logs
timestamp to continue reading subsequent logs.Method: GETPath:
/v1/notebook/instance/logs/historyParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Notebook execution instance ID; 1–255 characters |
timestamp | integer / null | No | Log timestamp cursor; ≥ 0 |
| Field | Type | Description |
|---|---|---|
logs | object[] | Log records; fields depend on the log type |
timestamp | number | Log cursor for subsequent reads; pass it back unchanged |
curl --get https://api.chaintable.com/v1/notebook/instance/logs/history \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000009
{
"code": 0,
"message": "ok",
"data": {
"logs": [],
"timestamp": 1788220800000
}
}
GET /v1/notebook/instance/metrics/blockx — Get compute task metrics
GET /v1/notebook/instance/metrics/blockx — Get compute task metrics
GETPath:
/v1/notebook/instance/metrics/blockxParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Notebook execution instance ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
instance_id | string | Notebook execution instance ID |
from | number | Metric range start in Unix seconds |
to | number | Metric range end in Unix seconds |
step | integer | Sampling interval in seconds |
charts | object | Charts keyed by metric name |
Show charts — Value fields
Show charts — Value fields
| Field | Type | Description |
|---|---|---|
unit | string | Metric unit |
series | object[] | Chart series |
Show series — Item fields
Show series — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
points | number[][] | Samples, each represented as [Unix seconds, value] |
curl --get https://api.chaintable.com/v1/notebook/instance/metrics/blockx \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000009
{
"code": 0,
"message": "ok",
"data": {
"instance_id": "01900000000070008000000000000009",
"from": 1788220800.0,
"to": 1788220860.0,
"step": 3,
"charts": {
"block_lag": {
"unit": "ms",
"series": [
{
"name": "block_lag",
"points": [
[
1788220800.0,
50
],
[
1788220803.0,
45
]
]
}
]
},
"tasks": {
"unit": "per_sec",
"series": [
{
"name": "task_total",
"points": [
[
1788220800.0,
10
]
]
},
{
"name": "task_failed",
"points": [
[
1788220800.0,
0
]
]
}
]
},
"task_duration": {
"unit": "ms",
"series": [
{
"name": "total",
"points": [
[
1788220800.0,
20
]
]
},
{
"name": "builder",
"points": [
[
1788220800.0,
3
]
]
},
{
"name": "calls",
"points": [
[
1788220800.0,
12
]
]
},
{
"name": "writer",
"points": [
[
1788220800.0,
5
]
]
}
]
},
"calls": {
"unit": "per_sec",
"series": [
{
"name": "call_total",
"points": [
[
1788220800.0,
10
]
]
},
{
"name": "result_count",
"points": [
[
1788220800.0,
10
]
]
}
]
}
}
}
}
GET /v1/notebook/instance/metrics/container — Get CPU and memory metrics
GET /v1/notebook/instance/metrics/container — Get CPU and memory metrics
GETPath:
/v1/notebook/instance/metrics/containerParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Notebook execution instance ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
instance_id | string | Notebook execution instance ID |
from | number | Metric range start in Unix seconds |
to | number | Metric range end in Unix seconds |
step | integer | Sampling interval in seconds |
charts | object | Charts keyed by metric name |
Show charts — Value fields
Show charts — Value fields
| Field | Type | Description |
|---|---|---|
unit | string | Metric unit |
series | object[] | Chart series |
Show series — Item fields
Show series — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
points | number[][] | Samples, each represented as [Unix seconds, value] |
curl --get https://api.chaintable.com/v1/notebook/instance/metrics/container \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000009
{
"code": 0,
"message": "ok",
"data": {
"instance_id": "01900000000070008000000000000009",
"from": 1788220800.0,
"to": 1788220860.0,
"step": 3,
"charts": {
"cpu": {
"unit": "percent",
"series": [
{
"name": "cpu_usage",
"points": [
[
1788220800.0,
12.5
],
[
1788220803.0,
12.5
]
]
}
]
},
"memory": {
"unit": "bytes",
"series": [
{
"name": "memory_usage",
"points": [
[
1788220800.0,
104857600
],
[
1788220803.0,
104857600
]
]
}
]
},
"net_rx": {
"unit": "bytes_per_sec",
"series": [
{
"name": "net_rx",
"points": [
[
1788220800.0,
1024
],
[
1788220803.0,
1024
]
]
}
]
},
"net_tx": {
"unit": "bytes_per_sec",
"series": [
{
"name": "net_tx",
"points": [
[
1788220800.0,
512
],
[
1788220803.0,
512
]
]
}
]
}
}
}
}
POST /v1/notebook/instance/set_background — Move an instance to the background
POST /v1/notebook/instance/set_background — Move an instance to the background
background: true. An instance cannot be moved back to the foreground.Method: POSTPath:
/v1/notebook/instance/set_backgroundParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Notebook execution instance ID; 1–255 characters |
background | boolean | No | Whether to run in the background; Default true |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/notebook/instance/set_background \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000009",
"background": true
}'
{
"code": 0,
"message": "ok",
"data": null
}
GET /v1/notebook/instance/specs — List available compute specifications
GET /v1/notebook/instance/specs — List available compute specifications
GETPath:
/v1/notebook/instance/specsParametersNo request parameters.Returns| Field | Type | Description |
|---|---|---|
allowed_quota_spec | object[] | Available CPU and memory pairs |
Show allowed_quota_spec — Item fields
Show allowed_quota_spec — Item fields
| Field | Type | Description |
|---|---|---|
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
curl https://api.chaintable.com/v1/notebook/instance/specs \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID"
{
"code": 0,
"message": "ok",
"data": {
"allowed_quota_spec": [
{
"max_cpu": 100,
"max_memory": 4294967296
},
{
"max_cpu": 200,
"max_memory": 8589934592
},
{
"max_cpu": 200,
"max_memory": 17179869184
},
{
"max_cpu": 200,
"max_memory": 34359738368
},
{
"max_cpu": 400,
"max_memory": 17179869184
},
{
"max_cpu": 400,
"max_memory": 34359738368
}
]
}
}
GET /v1/notebook/list — List Notebooks
GET /v1/notebook/list — List Notebooks
GETPath:
/v1/notebook/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 100; Default 10 |
order_by | string | No | Sort field; Values: "id", "name", "created_at", "updated_at"; Default "updated_at" |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
space | string / null | No | Filter by Space; when omitted, list resources in visible Spaces; 1–64 characters |
name | string / null | No | Name substring filter |
schedule_space | string / null | No | Filter by the schedule Space; 1–64 characters |
with_schedule | boolean | No | Include schedule information; Default false |
| Field | Type | Description |
|---|---|---|
start | integer | Pagination offset, starting at 0 |
limit | integer | Maximum number of entries |
items | object[] | Entries on this page |
total_count | integer | Total number of matching entries |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
parameters | object[] | Parameter definitions |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
schedule | object / null | Schedule configuration snapshot returned only with with_schedule=true; null if none exists |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Unique object ID |
order | integer / null | Parameter order; consecutive numbering is not required |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show schedule — Fields
Show schedule — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
curl --get https://api.chaintable.com/v1/notebook/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode space=demo \
--data-urlencode limit=10 \
--data-urlencode with_schedule=true
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "01900000000070008000000000000002",
"space": "demo",
"name": "print_message",
"language": "python",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"schedule": null
}
],
"total_count": 1,
"start": 0,
"limit": 10
}
}
POST /v1/notebook/run — Run a Notebook
POST /v1/notebook/run — Run a Notebook
id or inline code. When both are supplied, the inline code and parameter definitions take precedence. Use a compute specification pair returned by /v1/notebook/instance/specs.Method: POSTPath:
/v1/notebook/runParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string / null | No | Unique object ID; 1–32 characters |
code | string / null | No | Executable code; SQL for a Query |
parameters | object[] / null | No | Parameter definitions; updates replace the entire array |
arguments | object[] | No | Argument values for this execution |
max_cpu | integer | Yes | CPU allocation; 100 represents 1 vCPU; > 0 |
max_memory | integer | Yes | Memory allocation in bytes; > 0 |
debug | boolean | No | Whether to use debug mode; Default false |
background | boolean | No | Whether to run in the background; Default false |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string / null | Yes | Name |
type | string | Yes | Logical parameter type; see Data types |
options | JSON[] / null | No | Allowed choices for the parameter |
default | object / null | No | Default parameter value |
id | JSON / null | No | Unique object ID |
order | integer / null | No | Parameter order; consecutive numbering is not required; ≥ 0 |
Show default — Fields
Show default — Fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
name | string / null | No | Name of the matching parameter |
order | integer / null | No | Omit for every argument, or use consecutive values from 0 to determine argument order; ≥ 0 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
notebook_id | string / null | Notebook ID |
name | string / null | Name |
code | string / null | Code for this execution; omitted from instance lists |
parameters | object[] | Parameter definitions |
arguments | object[] | Argument values for this execution |
max_memory | integer / null | Memory allocation in bytes |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_network_rx | integer / null | Recorded network receive allocation |
max_network_tx | integer / null | Recorded network transmit allocation |
account_id | string / null | Account ID |
user_id | string / null | ID of the user who started execution |
schedule_id | string / null | Schedule ID |
background | boolean / null | Whether to run in the background |
debug | boolean / null | Whether to use debug mode |
deadline | number / null | Foreground instance expiry in Unix seconds; null for background instances |
status | string | Status; Values: "running", "ended" |
exit_code | integer / null | Exit code; null while running, 0 on success |
oom_killed | boolean / null | Whether the instance was terminated for exceeding memory |
exited_at | number / null | Exit time in Unix seconds; null while running |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
display_status | string | Instance display status; Values: "running", "succeeded", "failed", "canceled", "starting" |
launched | string | How the instance was launched; Values: "manual", "schedule" |
exit_message | string / null | Exit reason; null while running |
account | object / null | Account details |
user | object / null | Launcher details, or null if unavailable |
notebook | object / null | Related Notebook summary, or null if unavailable |
schedule | object / null | Related schedule, or null when none exists |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Unique object ID |
order | integer / null | Parameter order; consecutive numbering is not required |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show user — Fields
Show user — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show notebook — Fields
Show notebook — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
name | string / null | Name |
space | string | Space ID |
Show schedule — Fields
Show schedule — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
deleted_at | number / null | Deletion time in Unix seconds; null if not deleted |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
curl https://api.chaintable.com/v1/notebook/run \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000002",
"max_cpu": 100,
"max_memory": 4294967296,
"arguments": []
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000009",
"notebook_id": "01900000000070008000000000000002",
"name": "print_message",
"code": "print(\"Hello, Chaintable\")",
"parameters": [],
"arguments": [],
"max_cpu": 100,
"max_memory": 4294967296,
"max_network_rx": null,
"max_network_tx": null,
"account_id": "0190000000007000800000000000000b",
"user_id": "0190000000007000800000000000000c",
"schedule_id": null,
"background": false,
"debug": false,
"deadline": 1788220950.0,
"status": "running",
"exit_code": null,
"oom_killed": null,
"exited_at": null,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"display_status": "running",
"launched": "manual",
"exit_message": null,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
},
"user": {
"id": "0190000000007000800000000000000c",
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": null
},
"notebook": {
"id": "01900000000070008000000000000002",
"name": "print_message",
"space": "demo"
},
"schedule": null
}
}
POST /v1/notebook/update — Update a Notebook
POST /v1/notebook/update — Update a Notebook
POSTPath:
/v1/notebook/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
name | string | No | Name; 1–255 characters |
language | string | No | Code language; Values: "python" |
code | string / null | No | Executable code; SQL for a Query |
parameters | object[] / null | No | Parameter definitions; updates replace the entire array |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string / null | Yes | Name |
type | string | Yes | Logical parameter type; see Data types |
options | JSON[] / null | No | Allowed choices for the parameter |
default | object / null | No | Default parameter value |
id | JSON / null | No | Unique object ID |
order | integer / null | No | Parameter order; consecutive numbering is not required; ≥ 0 |
Show default — Fields
Show default — Fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | Notebook code; omitted from list responses |
parameters | object[] | Parameter definitions |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Unique object ID |
order | integer / null | Parameter order; consecutive numbering is not required |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/notebook/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000002",
"name": "print_message"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000002",
"space": "demo",
"name": "print_message",
"language": "python",
"code": "print(\"Hello, Chaintable\")",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
query
GET /v1/query — Get a Query
GET /v1/query — Get a Query
GETPath:
/v1/queryParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | SQL source; omitted from list responses |
parameters | object[] | Parameter definitions |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
visualizations | object[] | Visualizations in detail responses; list responses require with_visualizations=true |
is_starred | boolean | Whether the calling user has starred the resource; returned in details, or lists with with_star=true or sorting by star_count |
star_count | integer | Number of stars; returned in details, or lists with with_star=true or sorting by star_count |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | string / null | Parameter display ID stored with the definition |
order | integer / null | Omit for every parameter, or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show visualizations — Item fields
Show visualizations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
curl --get https://api.chaintable.com/v1/query \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000001
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000001",
"space": "demo",
"name": "Asset count",
"language": "sql",
"code": "SELECT COUNT(*) AS row_count FROM demo.asset_notes",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"visualizations": [
{
"id": "01900000000070008000000000000016",
"query_id": "01900000000070008000000000000001",
"name": "Query results",
"type": "table",
"options": {},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
],
"is_starred": false,
"star_count": 0
}
}
POST /v1/query/create — Create a Query
POST /v1/query/create — Create a Query
id and a default table visualization.Method: POSTPath:
/v1/query/createParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
space | string | Yes | Space ID; 1–64 characters |
name | string | Yes | Name; 1–64 characters |
code | string / null | No | Executable code; SQL for a Query |
language | string | No | Query language; use sql for execution; Values: "sql", "python"; Default "sql" |
parameters | object[] / null | No | Parameter definitions; updates replace the entire array |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name; 1–64 characters |
type | string | Yes | Logical parameter type; see Data types; 1–64 characters |
options | JSON[] / null | No | Allowed choices for the parameter |
default | object / null | No | Default parameter value |
id | string / null | No | Parameter display ID stored with the definition; ≤ 64 characters |
order | integer / null | No | Omit for every parameter, or use consecutive values from 0; ≥ 0 |
Show default — Fields
Show default — Fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | SQL source; omitted from list responses |
parameters | object[] | Parameter definitions |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
visualizations | object[] | Visualizations in detail responses; list responses require with_visualizations=true |
is_starred | boolean | Whether the calling user has starred the resource; returned in details, or lists with with_star=true or sorting by star_count |
star_count | integer | Number of stars; returned in details, or lists with with_star=true or sorting by star_count |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | string / null | Parameter display ID stored with the definition |
order | integer / null | Omit for every parameter, or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show visualizations — Item fields
Show visualizations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
curl https://api.chaintable.com/v1/query/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000001",
"space": "demo",
"name": "Asset count",
"code": "SELECT COUNT(*) AS row_count FROM demo.asset_notes",
"language": "sql"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000001",
"space": "demo",
"name": "Asset count",
"language": "sql",
"code": "SELECT COUNT(*) AS row_count FROM demo.asset_notes",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"visualizations": [
{
"id": "01900000000070008000000000000016",
"query_id": "01900000000070008000000000000001",
"name": "Query results",
"type": "table",
"options": {},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
],
"is_starred": false,
"star_count": 0
}
}
POST /v1/query/delete — Delete a Query
POST /v1/query/delete — Delete a Query
POSTPath:
/v1/query/deleteParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/query/delete \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000001"
}'
{
"code": 0,
"message": "ok",
"data": null
}
GET /v1/query/job — Get query execution status
GET /v1/query/job — Get query execution status
job.status. Successful result details are in job_succeeded; failures are in job_failed.Method: GETPath:
/v1/query/jobParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Query execution ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
job | object | Execution record |
job_pending | object | Pending-stage details; an empty object otherwise |
job_running | object | Running-stage details; an empty object otherwise |
job_succeeded | object | Success-stage details; an empty object otherwise |
job_failed | object | Failure-stage details; an empty object otherwise |
Show job — Fields
Show job — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string | Query ID |
status | string | Status; Values: "pending", "running", "canceling", "canceled", "succeeded", "failed" |
error_msg | string / null | Execution error message; null if no error exists |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
started_at | number / null | Start time in Unix seconds; null before execution starts |
finished_at | number / null | Completion time in Unix seconds; null before completion |
Show job_pending — Fields
Show job_pending — Fields
| Field | Type | Description |
|---|---|---|
position | integer | Legend position; arranged automatically when omitted |
Show job_running — Fields
Show job_running — Fields
| Field | Type | Description |
|---|---|---|
progress_percentage | number | Execution progress percentage |
Show job_succeeded — Fields
Show job_succeeded — Fields
| Field | Type | Description |
|---|---|---|
query_result_id | string | Query result ID used to fetch rows |
Show job_failed — Fields
Show job_failed — Fields
| Field | Type | Description |
|---|---|---|
error_msg | string / null | Execution error message; null if no error exists |
curl --get https://api.chaintable.com/v1/query/job \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000006
{
"code": 0,
"message": "ok",
"data": {
"job": {
"id": "01900000000070008000000000000006",
"query_id": "01900000000070008000000000000001",
"status": "succeeded",
"error_msg": null,
"created_at": 1788220800.0,
"updated_at": 1788220801.0,
"started_at": 1788220800.0,
"finished_at": 1788220801.0
},
"job_pending": {},
"job_running": {},
"job_succeeded": {
"query_result_id": "01900000000070008000000000000007"
},
"job_failed": {}
}
}
POST /v1/query/job/cancel — Cancel a query execution
POST /v1/query/job/cancel — Cancel a query execution
POSTPath:
/v1/query/job/cancelParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Query execution ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/query/job/cancel \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000006"
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/query/job/latest — Find the latest matching execution
POST /v1/query/job/latest — Find the latest matching execution
job_id: null when no match exists.Method: POSTPath:
/v1/query/job/latestParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
code | string | Yes | Executable code; SQL for a Query |
arguments | object[] / null | No | Argument values for this execution |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | SQL placeholder name |
value | JSON | Yes | Value substituted for the SQL placeholder |
| Field | Type | Description |
|---|---|---|
job_id | string / null | Query execution ID; null if no matching job exists |
curl https://api.chaintable.com/v1/query/job/latest \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000001",
"code": "SELECT COUNT(*) AS row_count FROM demo.asset_notes",
"arguments": []
}'
{
"code": 0,
"message": "ok",
"data": {
"job_id": "01900000000070008000000000000006"
}
}
GET /v1/query/list — List Queries
GET /v1/query/list — List Queries
GETPath:
/v1/query/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 100; Default 10 |
order_by | string | No | Sort field; Values: "id", "name", "created_at", "updated_at", "star_count"; Default "updated_at" |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
space | string / null | No | Filter by Space; when omitted, list resources in visible Spaces; 1–64 characters |
name | string / null | No | Name substring filter |
with_star | boolean | No | Include star information; Default false |
with_schedule | boolean | No | Include schedule information; Default false |
with_visualizations | boolean | No | Include visualizations; Default false |
| Field | Type | Description |
|---|---|---|
start | integer | Pagination offset, starting at 0 |
limit | integer | Maximum number of entries |
items | object[] | Entries on this page |
total_count | integer | Total number of matching entries |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
parameters | object[] | Parameter definitions |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
visualizations | object[] | Visualizations in detail responses; list responses require with_visualizations=true |
is_starred | boolean | Whether the calling user has starred the resource; returned in details, or lists with with_star=true or sorting by star_count |
star_count | integer | Number of stars; returned in details, or lists with with_star=true or sorting by star_count |
schedule | object / null | Schedule configuration snapshot returned only with with_schedule=true; null if none exists |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | string / null | Parameter display ID stored with the definition |
order | integer / null | Omit for every parameter, or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show visualizations — Item fields
Show visualizations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
Show schedule — Fields
Show schedule — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
curl --get https://api.chaintable.com/v1/query/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode space=demo \
--data-urlencode limit=10 \
--data-urlencode with_visualizations=true
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "01900000000070008000000000000001",
"space": "demo",
"name": "Asset count",
"language": "sql",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"visualizations": [
{
"id": "01900000000070008000000000000005",
"query_id": "01900000000070008000000000000001",
"name": "Asset count",
"type": "chart",
"options": {
"type": "counter",
"column_name": "row_count",
"row_number": 0,
"decimals": 0
},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
]
}
],
"total_count": 1,
"start": 0,
"limit": 10
}
}
GET /v1/query/result — Read query results
GET /v1/query/result — Read query results
id is a query result ID, not a Query ID or job ID. Use metadata_only=true to read metadata only.Method: GETPath:
/v1/query/resultParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 10000; Default 10 |
id | string | Yes | Query result ID; 1–255 characters |
metadata_only | boolean | No | Whether to return metadata only; Default false |
search | string / null | No | Search query for results |
order_by | string / null | No | Sort field |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
| Field | Type | Description |
|---|---|---|
metadata | object | Result columns and full-result statistics |
data | object[] | Rows keyed by column name; empty when metadata_only=true |
Show metadata — Fields
Show metadata — Fields
| Field | Type | Description |
|---|---|---|
columns | object[] | Column definitions |
statistics | object | Full-result statistics |
Show columns — Item fields
Show columns — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Type |
Show statistics — Fields
Show statistics — Fields
| Field | Type | Description |
|---|---|---|
rows_count | integer | Number of returned rows |
rows_size_bytes | integer | Estimated result memory size in bytes |
curl --get https://api.chaintable.com/v1/query/result \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000007 \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"metadata": {
"columns": [
{
"name": "row_count",
"type": "BIGINT"
}
],
"statistics": {
"rows_count": 1,
"rows_size_bytes": 256
}
},
"data": [
{
"row_count": 1
}
]
}
}
POST /v1/query/run — Run a SQL query
POST /v1/query/run — Run a SQL query
job_id, then fetch results using query_result_id. Returns 409 if a job is already pending or running.Method: POSTPath:
/v1/query/runParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
code | string | Yes | Executable code; SQL for a Query |
arguments | object[] / null | No | Argument values for this execution |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | SQL placeholder name |
value | JSON | Yes | Value substituted for the SQL placeholder |
| Field | Type | Description |
|---|---|---|
job_id | string / null | Query execution ID; null if no matching job exists |
curl https://api.chaintable.com/v1/query/run \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000001",
"code": "SELECT COUNT(*) AS row_count FROM demo.asset_notes",
"arguments": []
}'
{
"code": 0,
"message": "ok",
"data": {
"job_id": "01900000000070008000000000000006"
}
}
POST /v1/query/update — Update a Query
POST /v1/query/update — Update a Query
POSTPath:
/v1/query/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
name | string | No | Name; 1–64 characters |
code | string / null | No | Executable code; SQL for a Query |
parameters | object[] / null | No | Parameter definitions; updates replace the entire array |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name; 1–64 characters |
type | string | Yes | Logical parameter type; see Data types; 1–64 characters |
options | JSON[] / null | No | Allowed choices for the parameter |
default | object / null | No | Default parameter value |
id | string / null | No | Parameter display ID stored with the definition; ≤ 64 characters |
order | integer / null | No | Omit for every parameter, or use consecutive values from 0; ≥ 0 |
Show default — Fields
Show default — Fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
language | string / null | Code language |
code | string / null | SQL source; omitted from list responses |
parameters | object[] | Parameter definitions |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
visualizations | object[] | Visualizations in detail responses; list responses require with_visualizations=true |
is_starred | boolean | Whether the calling user has starred the resource; returned in details, or lists with with_star=true or sorting by star_count |
star_count | integer | Number of stars; returned in details, or lists with with_star=true or sorting by star_count |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | string / null | Parameter display ID stored with the definition |
order | integer / null | Omit for every parameter, or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show visualizations — Item fields
Show visualizations — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
curl https://api.chaintable.com/v1/query/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000001",
"code": "SELECT COUNT(*) AS row_count FROM demo.asset_notes"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000001",
"space": "demo",
"name": "Asset count",
"language": "sql",
"code": "SELECT COUNT(*) AS row_count FROM demo.asset_notes",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"visualizations": [
{
"id": "01900000000070008000000000000016",
"query_id": "01900000000070008000000000000001",
"name": "Query results",
"type": "table",
"options": {},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
],
"is_starred": false,
"star_count": 0
}
}
POST /v1/query/visualization/create — Create a visualization
POST /v1/query/visualization/create — Create a visualization
type=table for options.type=table, or type=chart for bar, line, area, scatter, pie, or counter. All options fields are defined in the parameters below.Method: POSTPath:
/v1/query/visualization/createParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
query_id | string | Yes | Query ID; 1–255 characters |
name | string | Yes | Name; 1–64 characters |
type | string | Yes | Type; Values: "table", "chart", "counter" |
options | object / null | No | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
description | string / null | No | Description |
type | string | Yes | Type; Must be "table" |
columns | object / null | No | Display settings keyed by result column name |
export_options | object / null | No | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string / null | No | Name |
title | string / null | No | Display title |
align | string / null | No | Cell alignment; Values: "left", "center", "right" |
type | string / null | No | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | No | Number or date format string |
hide | boolean / null | No | Whether to hide the column |
colored_positive | boolean / null | No | Whether to color positive values |
colored_negative | boolean / null | No | Whether to color negative values |
url_template | string / null | No | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean / null | No | Whether exporting is enabled |
formats | string[] / null | No | Allowed export formats |
filename | string / null | No | Export filename |
include_all_data | boolean / null | No | Whether to export all data |
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
description | string / null | No | Description |
type | string | Yes | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | No | Result column for the x-axis |
y_columns | string[] / null | No | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | No | X-axis settings |
y_axis | object / null | No | Left y-axis settings |
right_y_axis | object / null | No | Right y-axis settings |
legend | object / null | No | Legend settings |
series | object / null | No | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | No | Whether to stack series |
show_data_labels | boolean / null | No | Whether to show data labels |
show_total_in_tooltip | boolean / null | No | Whether to show the total in tooltips |
group_by | string / null | No | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | No | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | No | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | No | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
tick_format | string / null | No | Tick format string, such as YYYY-MM-DD |
label_format | string / null | No | Tooltip or data-label format string |
type | string / null | No | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | No | Whether the y-axis includes zero; included when omitted |
min | number / null | No | Axis minimum; cannot exceed max |
max | number / null | No | Axis maximum |
sort_values | boolean / null | No | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | No | Whether to reverse axis order |
enable_right_axis | boolean / null | No | Enable the right axis for series with is_right set |
auto_tick | boolean / null | No | Whether to determine ticks automatically |
nice | boolean / null | No | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | No | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | No | Number of ticks; ≥ 1 |
width | number / null | No | Axis width; ≥ 0 |
reference_lines | object[] / null | No | Axis reference lines |
zones | object[] / null | No | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | number / string | Yes | Reference line position; time axes can use a date string |
stroke | string | Yes | Reference line color as a CSS color |
tick | object / null | No | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
from | number / string / null | No | Start of the highlighted region |
to | number / string / null | No | End of the highlighted region |
color | string / null | No | CSS color |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
tick_format | string / null | No | Tick format string, such as YYYY-MM-DD |
label_format | string / null | No | Tooltip or data-label format string |
type | string / null | No | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | No | Whether the y-axis includes zero; included when omitted |
min | number / null | No | Axis minimum; cannot exceed max |
max | number / null | No | Axis maximum |
sort_values | boolean / null | No | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | No | Whether to reverse axis order |
enable_right_axis | boolean / null | No | Enable the right axis for series with is_right set |
auto_tick | boolean / null | No | Whether to determine ticks automatically |
nice | boolean / null | No | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | No | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | No | Number of ticks; ≥ 1 |
width | number / null | No | Axis width; ≥ 0 |
reference_lines | object[] / null | No | Axis reference lines |
zones | object[] / null | No | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | number / string | Yes | Reference line position; time axes can use a date string |
stroke | string | Yes | Reference line color as a CSS color |
tick | object / null | No | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
from | number / string / null | No | Start of the highlighted region |
to | number / string / null | No | End of the highlighted region |
color | string / null | No | CSS color |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
tick_format | string / null | No | Tick format string, such as YYYY-MM-DD |
label_format | string / null | No | Tooltip or data-label format string |
type | string / null | No | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | No | Whether the y-axis includes zero; included when omitted |
min | number / null | No | Axis minimum; cannot exceed max |
max | number / null | No | Axis maximum |
sort_values | boolean / null | No | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | No | Whether to reverse axis order |
enable_right_axis | boolean / null | No | Enable the right axis for series with is_right set |
auto_tick | boolean / null | No | Whether to determine ticks automatically |
nice | boolean / null | No | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | No | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | No | Number of ticks; ≥ 1 |
width | number / null | No | Axis width; ≥ 0 |
reference_lines | object[] / null | No | Axis reference lines |
zones | object[] / null | No | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | number / string | Yes | Reference line position; time axes can use a date string |
stroke | string | Yes | Reference line color as a CSS color |
tick | object / null | No | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
from | number / string / null | No | Start of the highlighted region |
to | number / string / null | No | End of the highlighted region |
color | string / null | No | CSS color |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
Show legend — Fields
Show legend — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show; legends are shown when omitted |
position | string / null | No | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | No | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Legend and tooltip title; defaults to the series name |
type | string / null | No | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | No | CSS color |
is_right | boolean / null | No | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | No | Whether lines connect across null values |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
silent | boolean / null | No | Whether to disable series interactions |
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
description | string / null | No | Description |
type | string | Yes | Type; Must be "pie" |
label_column | string / null | No | Pie chart category column |
value_column | string / null | No | Pie chart value column |
legend | object / null | No | Legend settings |
show_data_labels | boolean / null | No | Whether to show data labels |
y_axis | object / null | No | Only label_format is used to format values |
values_options | object / null | No | Map of category values to slice color settings |
series_title | string / null | No | Series name in tooltips |
show_legend | boolean / null | No | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show; legends are shown when omitted |
position | string / null | No | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | No | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
tick_format | string / null | No | Tick format string, such as YYYY-MM-DD |
label_format | string / null | No | Tooltip or data-label format string |
type | string / null | No | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | No | Whether the y-axis includes zero; included when omitted |
min | number / null | No | Axis minimum; cannot exceed max |
max | number / null | No | Axis maximum |
sort_values | boolean / null | No | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | No | Whether to reverse axis order |
enable_right_axis | boolean / null | No | Enable the right axis for series with is_right set |
auto_tick | boolean / null | No | Whether to determine ticks automatically |
nice | boolean / null | No | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | No | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | No | Number of ticks; ≥ 1 |
width | number / null | No | Axis width; ≥ 0 |
reference_lines | object[] / null | No | Axis reference lines |
zones | object[] / null | No | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | number / string | Yes | Reference line position; time axes can use a date string |
stroke | string | Yes | Reference line color as a CSS color |
tick | object / null | No | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
from | number / string / null | No | Start of the highlighted region |
to | number / string / null | No | End of the highlighted region |
color | string / null | No | CSS color |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
color | string | Yes | CSS color |
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
description | string / null | No | Description |
type | string | Yes | Type; Must be "counter" |
column_name | string / null | No | Numeric column displayed by the counter |
row_number | integer / null | No | Zero-based result row index; defaults to 0; ≥ 0 |
prefix | string / null | No | Value prefix |
suffix | string / null | No | Value suffix |
decimals | integer / null | No | Decimal places; formatting follows the column type when omitted; ≥ 0; ≤ 20 |
colored_positive | boolean / null | No | Whether to color positive values |
colored_negative | boolean / null | No | Whether to color negative values |
label | string / null | No | Display label or category |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
curl https://api.chaintable.com/v1/query/visualization/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000005",
"query_id": "01900000000070008000000000000001",
"name": "Asset count",
"type": "chart",
"options": {
"type": "counter",
"column_name": "row_count",
"row_number": 0,
"decimals": 0
}
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000005",
"query_id": "01900000000070008000000000000001",
"name": "Asset count",
"type": "chart",
"options": {
"type": "counter",
"column_name": "row_count",
"row_number": 0,
"decimals": 0
},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
}
POST /v1/query/visualization/delete — Delete a visualization
POST /v1/query/visualization/delete — Delete a visualization
POSTPath:
/v1/query/visualization/deleteParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/query/visualization/delete \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000005"
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/query/visualization/ensure_default — Get or create the default visualization
POST /v1/query/visualization/ensure_default — Get or create the default visualization
POSTPath:
/v1/query/visualization/ensure_defaultParameters| Field | Type | Required | Description |
|---|---|---|---|
query_id | string | Yes | Query ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
curl https://api.chaintable.com/v1/query/visualization/ensure_default \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"query_id": "01900000000070008000000000000001"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000016",
"query_id": "01900000000070008000000000000001",
"name": "Query results",
"type": "table",
"options": {},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
}
GET /v1/query/visualization/list — List visualizations
GET /v1/query/visualization/list — List visualizations
GETPath:
/v1/query/visualization/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 1000; Default 100 |
order_by | string | No | Sort field; Values: "id", "name", "created_at", "updated_at"; Default "updated_at" |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
query_id | string | Yes | Query ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
start | integer | Pagination offset, starting at 0 |
limit | integer | Maximum number of entries |
items | object[] | Entries on this page |
total_count | integer | Total number of matching entries |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
curl --get https://api.chaintable.com/v1/query/visualization/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode query_id=01900000000070008000000000000001 \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "01900000000070008000000000000005",
"query_id": "01900000000070008000000000000001",
"name": "Asset count",
"type": "chart",
"options": {
"type": "counter",
"column_name": "row_count",
"row_number": 0,
"decimals": 0
},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
],
"total_count": 1,
"start": 0,
"limit": 10
}
}
POST /v1/query/visualization/update — Update a visualization
POST /v1/query/visualization/update — Update a visualization
options without executing SQL. options replaces the stored configuration; {} or null clears it. Omitted top-level fields remain unchanged.Method: POSTPath:
/v1/query/visualization/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
name | string / null | No | Name; 1–64 characters |
options | object / null | No | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
description | string / null | No | Description |
type | string | Yes | Type; Must be "table" |
columns | object / null | No | Display settings keyed by result column name |
export_options | object / null | No | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string / null | No | Name |
title | string / null | No | Display title |
align | string / null | No | Cell alignment; Values: "left", "center", "right" |
type | string / null | No | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | No | Number or date format string |
hide | boolean / null | No | Whether to hide the column |
colored_positive | boolean / null | No | Whether to color positive values |
colored_negative | boolean / null | No | Whether to color negative values |
url_template | string / null | No | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean / null | No | Whether exporting is enabled |
formats | string[] / null | No | Allowed export formats |
filename | string / null | No | Export filename |
include_all_data | boolean / null | No | Whether to export all data |
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
description | string / null | No | Description |
type | string | Yes | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | No | Result column for the x-axis |
y_columns | string[] / null | No | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | No | X-axis settings |
y_axis | object / null | No | Left y-axis settings |
right_y_axis | object / null | No | Right y-axis settings |
legend | object / null | No | Legend settings |
series | object / null | No | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | No | Whether to stack series |
show_data_labels | boolean / null | No | Whether to show data labels |
show_total_in_tooltip | boolean / null | No | Whether to show the total in tooltips |
group_by | string / null | No | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | No | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | No | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | No | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
tick_format | string / null | No | Tick format string, such as YYYY-MM-DD |
label_format | string / null | No | Tooltip or data-label format string |
type | string / null | No | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | No | Whether the y-axis includes zero; included when omitted |
min | number / null | No | Axis minimum; cannot exceed max |
max | number / null | No | Axis maximum |
sort_values | boolean / null | No | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | No | Whether to reverse axis order |
enable_right_axis | boolean / null | No | Enable the right axis for series with is_right set |
auto_tick | boolean / null | No | Whether to determine ticks automatically |
nice | boolean / null | No | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | No | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | No | Number of ticks; ≥ 1 |
width | number / null | No | Axis width; ≥ 0 |
reference_lines | object[] / null | No | Axis reference lines |
zones | object[] / null | No | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | number / string | Yes | Reference line position; time axes can use a date string |
stroke | string | Yes | Reference line color as a CSS color |
tick | object / null | No | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
from | number / string / null | No | Start of the highlighted region |
to | number / string / null | No | End of the highlighted region |
color | string / null | No | CSS color |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
tick_format | string / null | No | Tick format string, such as YYYY-MM-DD |
label_format | string / null | No | Tooltip or data-label format string |
type | string / null | No | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | No | Whether the y-axis includes zero; included when omitted |
min | number / null | No | Axis minimum; cannot exceed max |
max | number / null | No | Axis maximum |
sort_values | boolean / null | No | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | No | Whether to reverse axis order |
enable_right_axis | boolean / null | No | Enable the right axis for series with is_right set |
auto_tick | boolean / null | No | Whether to determine ticks automatically |
nice | boolean / null | No | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | No | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | No | Number of ticks; ≥ 1 |
width | number / null | No | Axis width; ≥ 0 |
reference_lines | object[] / null | No | Axis reference lines |
zones | object[] / null | No | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | number / string | Yes | Reference line position; time axes can use a date string |
stroke | string | Yes | Reference line color as a CSS color |
tick | object / null | No | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
from | number / string / null | No | Start of the highlighted region |
to | number / string / null | No | End of the highlighted region |
color | string / null | No | CSS color |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
tick_format | string / null | No | Tick format string, such as YYYY-MM-DD |
label_format | string / null | No | Tooltip or data-label format string |
type | string / null | No | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | No | Whether the y-axis includes zero; included when omitted |
min | number / null | No | Axis minimum; cannot exceed max |
max | number / null | No | Axis maximum |
sort_values | boolean / null | No | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | No | Whether to reverse axis order |
enable_right_axis | boolean / null | No | Enable the right axis for series with is_right set |
auto_tick | boolean / null | No | Whether to determine ticks automatically |
nice | boolean / null | No | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | No | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | No | Number of ticks; ≥ 1 |
width | number / null | No | Axis width; ≥ 0 |
reference_lines | object[] / null | No | Axis reference lines |
zones | object[] / null | No | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | number / string | Yes | Reference line position; time axes can use a date string |
stroke | string | Yes | Reference line color as a CSS color |
tick | object / null | No | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
from | number / string / null | No | Start of the highlighted region |
to | number / string / null | No | End of the highlighted region |
color | string / null | No | CSS color |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
Show legend — Fields
Show legend — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show; legends are shown when omitted |
position | string / null | No | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | No | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Legend and tooltip title; defaults to the series name |
type | string / null | No | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | No | CSS color |
is_right | boolean / null | No | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | No | Whether lines connect across null values |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
silent | boolean / null | No | Whether to disable series interactions |
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
description | string / null | No | Description |
type | string | Yes | Type; Must be "pie" |
label_column | string / null | No | Pie chart category column |
value_column | string / null | No | Pie chart value column |
legend | object / null | No | Legend settings |
show_data_labels | boolean / null | No | Whether to show data labels |
y_axis | object / null | No | Only label_format is used to format values |
values_options | object / null | No | Map of category values to slice color settings |
series_title | string / null | No | Series name in tooltips |
show_legend | boolean / null | No | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show; legends are shown when omitted |
position | string / null | No | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | No | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
tick_format | string / null | No | Tick format string, such as YYYY-MM-DD |
label_format | string / null | No | Tooltip or data-label format string |
type | string / null | No | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | No | Whether the y-axis includes zero; included when omitted |
min | number / null | No | Axis minimum; cannot exceed max |
max | number / null | No | Axis maximum |
sort_values | boolean / null | No | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | No | Whether to reverse axis order |
enable_right_axis | boolean / null | No | Enable the right axis for series with is_right set |
auto_tick | boolean / null | No | Whether to determine ticks automatically |
nice | boolean / null | No | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | No | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | No | Number of ticks; ≥ 1 |
width | number / null | No | Axis width; ≥ 0 |
reference_lines | object[] / null | No | Axis reference lines |
zones | object[] / null | No | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | number / string | Yes | Reference line position; time axes can use a date string |
stroke | string | Yes | Reference line color as a CSS color |
tick | object / null | No | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Required | Description |
|---|---|---|---|
show | boolean / null | No | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
from | number / string / null | No | Start of the highlighted region |
to | number / string / null | No | End of the highlighted region |
color | string / null | No | CSS color |
fill_gradient | string[] / null | No | Gradient start and end colors; exactly two CSS colors; 2–2 items |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
color | string | Yes | CSS color |
| Field | Type | Required | Description |
|---|---|---|---|
title | string / null | No | Display title |
description | string / null | No | Description |
type | string | Yes | Type; Must be "counter" |
column_name | string / null | No | Numeric column displayed by the counter |
row_number | integer / null | No | Zero-based result row index; defaults to 0; ≥ 0 |
prefix | string / null | No | Value prefix |
suffix | string / null | No | Value suffix |
decimals | integer / null | No | Decimal places; formatting follows the column type when omitted; ≥ 0; ≤ 20 |
colored_positive | boolean / null | No | Whether to color positive values |
colored_negative | boolean / null | No | Whether to color negative values |
label | string / null | No | Display label or category |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
curl https://api.chaintable.com/v1/query/visualization/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000005",
"name": "Total assets",
"options": {
"type": "counter",
"column_name": "row_count",
"decimals": 0
}
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000005",
"query_id": "01900000000070008000000000000001",
"name": "Total assets",
"type": "chart",
"options": {
"type": "counter",
"column_name": "row_count",
"decimals": 0
},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
}
}
dashboard
GET /v1/dashboard — Get a Dashboard
GET /v1/dashboard — Get a Dashboard
GETPath:
/v1/dashboardParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–32 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
options | object | Configuration object |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
widgets | object[] | Widgets in detail, create, and update responses; omitted from lists |
is_starred | boolean | Whether the calling user has starred the resource; returned in details, or lists with with_star=true or sorting by star_count |
star_count | integer | Number of stars; returned in details, or lists with with_star=true or sorting by star_count |
Show options — Fields
Show options — Fields
| Field | Type | Description |
|---|---|---|
layout | object / null | Widget positions by screen size |
Show layout — Fields
Show layout — Fields
| Field | Type | Description |
|---|---|---|
lg | object / null | Desktop layout with 6 columns; keys are Widget IDs, and x + w must not exceed 6 |
sm | object / null | Mobile layout with 1 column; keys are Widget IDs, and x must be 0 |
Show lg — Value fields
Show lg — Value fields
| Field | Type | Description |
|---|---|---|
x | integer | Zero-based grid column |
y | integer | Zero-based grid row |
w | integer | Width in grid columns |
h | integer | Height in grid rows |
min_w | integer / null | Minimum width in grid columns; legacy layout field |
min_h | integer / null | Minimum height in grid rows; legacy layout field |
max_w | integer / null | Maximum width in grid columns; legacy layout field |
max_h | integer / null | Maximum height in grid rows; legacy layout field |
Show sm — Value fields
Show sm — Value fields
| Field | Type | Description |
|---|---|---|
x | integer | Zero-based grid column |
y | integer | Zero-based grid row |
w | integer | Width in grid columns |
h | integer | Height in grid rows |
min_w | integer / null | Minimum width in grid columns; legacy layout field |
min_h | integer / null | Minimum height in grid rows; legacy layout field |
max_w | integer / null | Maximum width in grid columns; legacy layout field |
max_h | integer / null | Maximum height in grid rows; legacy layout field |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show widgets — Item fields
Show widgets — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
dashboard_id | string / null | Dashboard ID |
type | string | Type; Values: "text", "visualization", "parameter" |
visualization_id | string / null | Visualization ID |
text_content | string / null | Markdown text |
options | object | Display configuration; writes accept only {} or null. Use the Visualization for chart settings and the Dashboard layout for positioning |
entities | object[] | Related resource list |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
entities_map | object | Related content indexed by resource type and ID |
visualization | object / null | Referenced visualization; null if unreadable or deleted |
parameters | object[] / null | Parameter definitions |
code | string / null | Executable code; SQL for a Query |
space_entity | object / null | Details of the owning Space |
query_name | string / null | Referenced Query name; null if unavailable |
Show entities — Item fields
Show entities — Item fields
| Field | Type | Description |
|---|---|---|
type | string | Type; Values: "query", "dashboard", "notebook", "table", "field", "function", "contract", "chain", "schedule", "page", "issue" |
id | string | Unique object ID |
raw | string | Original resource-reference text in the content |
Show entities_map — By resource type
Show entities_map — By resource type
Show Resource fields by ID
Show Resource fields by ID
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show visualization — Fields
Show visualization — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | string / null | Parameter display ID stored with the definition |
order | integer / null | Omit for every parameter, or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl --get https://api.chaintable.com/v1/dashboard \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=01900000000070008000000000000003
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000003",
"space": "demo",
"name": "Asset overview",
"options": {},
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"widgets": [
{
"id": "01900000000070008000000000000004",
"dashboard_id": "01900000000070008000000000000003",
"type": "visualization",
"visualization_id": "01900000000070008000000000000005",
"text_content": null,
"options": {},
"entities": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"visualization": {
"id": "01900000000070008000000000000005",
"query_id": "01900000000070008000000000000001",
"name": "Asset count",
"type": "chart",
"options": {
"type": "counter",
"column_name": "row_count",
"row_number": 0,
"decimals": 0
},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
},
"parameters": [],
"code": "SELECT COUNT(*) AS row_count FROM demo.asset_notes",
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"query_name": "Asset count",
"entities_map": {}
}
],
"is_starred": false,
"star_count": 0
}
}
POST /v1/dashboard/create — Create a Dashboard
POST /v1/dashboard/create — Create a Dashboard
id, then add text or visualizations through the Widget endpoints.Method: POSTPath:
/v1/dashboard/createParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–32 characters |
name | string | Yes | Name; 1–64 characters |
options | object / null | No | Configuration object |
space | string | Yes | Space ID; 1–64 characters |
Show options — Fields
Show options — Fields
| Field | Type | Required | Description |
|---|---|---|---|
layout | object / null | No | Widget positions by screen size |
Show layout — Fields
Show layout — Fields
| Field | Type | Required | Description |
|---|---|---|---|
lg | object / null | No | Desktop layout with 6 columns; keys are Widget IDs, and x + w must not exceed 6 |
sm | object / null | No | Mobile layout with 1 column; keys are Widget IDs, and x must be 0 |
Show lg — Value fields
Show lg — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
x | integer | Yes | Zero-based grid column; ≥ 0 |
y | integer | Yes | Zero-based grid row; ≥ 0 |
w | integer | Yes | Width in grid columns; ≥ 1; ≤ 6 |
h | integer | Yes | Height in grid rows; ≥ 1 |
min_w | integer / null | No | Minimum width in grid columns; legacy layout field; ≥ 1 |
min_h | integer / null | No | Minimum height in grid rows; legacy layout field; ≥ 1 |
max_w | integer / null | No | Maximum width in grid columns; legacy layout field; ≥ 1 |
max_h | integer / null | No | Maximum height in grid rows; legacy layout field; ≥ 1 |
Show sm — Value fields
Show sm — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
x | integer | Yes | Zero-based grid column; ≥ 0 |
y | integer | Yes | Zero-based grid row; ≥ 0 |
w | integer | Yes | Width in grid columns; ≥ 1; ≤ 6 |
h | integer | Yes | Height in grid rows; ≥ 1 |
min_w | integer / null | No | Minimum width in grid columns; legacy layout field; ≥ 1 |
min_h | integer / null | No | Minimum height in grid rows; legacy layout field; ≥ 1 |
max_w | integer / null | No | Maximum width in grid columns; legacy layout field; ≥ 1 |
max_h | integer / null | No | Maximum height in grid rows; legacy layout field; ≥ 1 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
options | object | Configuration object |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
widgets | object[] | Widgets in detail, create, and update responses; omitted from lists |
is_starred | boolean | Whether the calling user has starred the resource; returned in details, or lists with with_star=true or sorting by star_count |
star_count | integer | Number of stars; returned in details, or lists with with_star=true or sorting by star_count |
Show options — Fields
Show options — Fields
| Field | Type | Description |
|---|---|---|
layout | object / null | Widget positions by screen size |
Show layout — Fields
Show layout — Fields
| Field | Type | Description |
|---|---|---|
lg | object / null | Desktop layout with 6 columns; keys are Widget IDs, and x + w must not exceed 6 |
sm | object / null | Mobile layout with 1 column; keys are Widget IDs, and x must be 0 |
Show lg — Value fields
Show lg — Value fields
| Field | Type | Description |
|---|---|---|
x | integer | Zero-based grid column |
y | integer | Zero-based grid row |
w | integer | Width in grid columns |
h | integer | Height in grid rows |
min_w | integer / null | Minimum width in grid columns; legacy layout field |
min_h | integer / null | Minimum height in grid rows; legacy layout field |
max_w | integer / null | Maximum width in grid columns; legacy layout field |
max_h | integer / null | Maximum height in grid rows; legacy layout field |
Show sm — Value fields
Show sm — Value fields
| Field | Type | Description |
|---|---|---|
x | integer | Zero-based grid column |
y | integer | Zero-based grid row |
w | integer | Width in grid columns |
h | integer | Height in grid rows |
min_w | integer / null | Minimum width in grid columns; legacy layout field |
min_h | integer / null | Minimum height in grid rows; legacy layout field |
max_w | integer / null | Maximum width in grid columns; legacy layout field |
max_h | integer / null | Maximum height in grid rows; legacy layout field |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show widgets — Item fields
Show widgets — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
dashboard_id | string / null | Dashboard ID |
type | string | Type; Values: "text", "visualization", "parameter" |
visualization_id | string / null | Visualization ID |
text_content | string / null | Markdown text |
options | object | Display configuration; writes accept only {} or null. Use the Visualization for chart settings and the Dashboard layout for positioning |
entities | object[] | Related resource list |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
entities_map | object | Related content indexed by resource type and ID |
visualization | object / null | Referenced visualization; null if unreadable or deleted |
parameters | object[] / null | Parameter definitions |
code | string / null | Executable code; SQL for a Query |
space_entity | object / null | Details of the owning Space |
query_name | string / null | Referenced Query name; null if unavailable |
Show entities — Item fields
Show entities — Item fields
| Field | Type | Description |
|---|---|---|
type | string | Type; Values: "query", "dashboard", "notebook", "table", "field", "function", "contract", "chain", "schedule", "page", "issue" |
id | string | Unique object ID |
raw | string | Original resource-reference text in the content |
Show entities_map — By resource type
Show entities_map — By resource type
Show Resource fields by ID
Show Resource fields by ID
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show visualization — Fields
Show visualization — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | string / null | Parameter display ID stored with the definition |
order | integer / null | Omit for every parameter, or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/dashboard/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000003",
"space": "demo",
"name": "Asset overview"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000003",
"space": "demo",
"name": "Asset overview",
"options": {},
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"widgets": [],
"is_starred": false,
"star_count": 0
}
}
POST /v1/dashboard/delete — Delete a Dashboard
POST /v1/dashboard/delete — Delete a Dashboard
POSTPath:
/v1/dashboard/deleteParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–32 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/dashboard/delete \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000003"
}'
{
"code": 0,
"message": "ok",
"data": null
}
GET /v1/dashboard/list — List Dashboards
GET /v1/dashboard/list — List Dashboards
GETPath:
/v1/dashboard/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 100; Default 10 |
order_by | string | No | Sort field; Values: "id", "name", "created_at", "updated_at", "star_count"; Default "updated_at" |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
space | string / null | No | Filter by Space; when omitted, list resources in visible Spaces; 1–64 characters |
name | string / null | No | Name substring filter |
with_star | boolean | No | Include star information; Default false |
with_schedule | boolean | No | Include schedule information; Default false |
| Field | Type | Description |
|---|---|---|
start | integer | Pagination offset, starting at 0 |
limit | integer | Maximum number of entries |
items | object[] | Entries on this page |
total_count | integer | Total number of matching entries |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
options | object | Configuration object |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
is_starred | boolean | Whether the calling user has starred the resource; returned in details, or lists with with_star=true or sorting by star_count |
star_count | integer | Number of stars; returned in details, or lists with with_star=true or sorting by star_count |
schedule | object / null | Schedule configuration snapshot returned only with with_schedule=true; null if none exists |
Show options — Fields
Show options — Fields
| Field | Type | Description |
|---|---|---|
layout | object / null | Widget positions by screen size |
Show layout — Fields
Show layout — Fields
| Field | Type | Description |
|---|---|---|
lg | object / null | Desktop layout with 6 columns; keys are Widget IDs, and x + w must not exceed 6 |
sm | object / null | Mobile layout with 1 column; keys are Widget IDs, and x must be 0 |
Show lg — Value fields
Show lg — Value fields
| Field | Type | Description |
|---|---|---|
x | integer | Zero-based grid column |
y | integer | Zero-based grid row |
w | integer | Width in grid columns |
h | integer | Height in grid rows |
min_w | integer / null | Minimum width in grid columns; legacy layout field |
min_h | integer / null | Minimum height in grid rows; legacy layout field |
max_w | integer / null | Maximum width in grid columns; legacy layout field |
max_h | integer / null | Maximum height in grid rows; legacy layout field |
Show sm — Value fields
Show sm — Value fields
| Field | Type | Description |
|---|---|---|
x | integer | Zero-based grid column |
y | integer | Zero-based grid row |
w | integer | Width in grid columns |
h | integer | Height in grid rows |
min_w | integer / null | Minimum width in grid columns; legacy layout field |
min_h | integer / null | Minimum height in grid rows; legacy layout field |
max_w | integer / null | Maximum width in grid columns; legacy layout field |
max_h | integer / null | Maximum height in grid rows; legacy layout field |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show schedule — Fields
Show schedule — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
curl --get https://api.chaintable.com/v1/dashboard/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode space=demo \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "01900000000070008000000000000003",
"space": "demo",
"name": "Asset overview",
"options": {},
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
],
"total_count": 1,
"start": 0,
"limit": 10
}
}
POST /v1/dashboard/update — Update a Dashboard
POST /v1/dashboard/update — Update a Dashboard
options replaces the stored layout. target_space must be an editable Space in the same account.Method: POSTPath:
/v1/dashboard/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–32 characters |
name | string | No | Name; 1–64 characters |
options | object / null | No | Configuration object |
target_space | string | No | Target Space ID; 1–64 characters |
Show options — Fields
Show options — Fields
| Field | Type | Required | Description |
|---|---|---|---|
layout | object / null | No | Widget positions by screen size |
Show layout — Fields
Show layout — Fields
| Field | Type | Required | Description |
|---|---|---|---|
lg | object / null | No | Desktop layout with 6 columns; keys are Widget IDs, and x + w must not exceed 6 |
sm | object / null | No | Mobile layout with 1 column; keys are Widget IDs, and x must be 0 |
Show lg — Value fields
Show lg — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
x | integer | Yes | Zero-based grid column; ≥ 0 |
y | integer | Yes | Zero-based grid row; ≥ 0 |
w | integer | Yes | Width in grid columns; ≥ 1; ≤ 6 |
h | integer | Yes | Height in grid rows; ≥ 1 |
min_w | integer / null | No | Minimum width in grid columns; legacy layout field; ≥ 1 |
min_h | integer / null | No | Minimum height in grid rows; legacy layout field; ≥ 1 |
max_w | integer / null | No | Maximum width in grid columns; legacy layout field; ≥ 1 |
max_h | integer / null | No | Maximum height in grid rows; legacy layout field; ≥ 1 |
Show sm — Value fields
Show sm — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
x | integer | Yes | Zero-based grid column; ≥ 0 |
y | integer | Yes | Zero-based grid row; ≥ 0 |
w | integer | Yes | Width in grid columns; ≥ 1; ≤ 6 |
h | integer | Yes | Height in grid rows; ≥ 1 |
min_w | integer / null | No | Minimum width in grid columns; legacy layout field; ≥ 1 |
min_h | integer / null | No | Minimum height in grid rows; legacy layout field; ≥ 1 |
max_w | integer / null | No | Maximum width in grid columns; legacy layout field; ≥ 1 |
max_h | integer / null | No | Maximum height in grid rows; legacy layout field; ≥ 1 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
options | object | Configuration object |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
widgets | object[] | Widgets in detail, create, and update responses; omitted from lists |
is_starred | boolean | Whether the calling user has starred the resource; returned in details, or lists with with_star=true or sorting by star_count |
star_count | integer | Number of stars; returned in details, or lists with with_star=true or sorting by star_count |
Show options — Fields
Show options — Fields
| Field | Type | Description |
|---|---|---|
layout | object / null | Widget positions by screen size |
Show layout — Fields
Show layout — Fields
| Field | Type | Description |
|---|---|---|
lg | object / null | Desktop layout with 6 columns; keys are Widget IDs, and x + w must not exceed 6 |
sm | object / null | Mobile layout with 1 column; keys are Widget IDs, and x must be 0 |
Show lg — Value fields
Show lg — Value fields
| Field | Type | Description |
|---|---|---|
x | integer | Zero-based grid column |
y | integer | Zero-based grid row |
w | integer | Width in grid columns |
h | integer | Height in grid rows |
min_w | integer / null | Minimum width in grid columns; legacy layout field |
min_h | integer / null | Minimum height in grid rows; legacy layout field |
max_w | integer / null | Maximum width in grid columns; legacy layout field |
max_h | integer / null | Maximum height in grid rows; legacy layout field |
Show sm — Value fields
Show sm — Value fields
| Field | Type | Description |
|---|---|---|
x | integer | Zero-based grid column |
y | integer | Zero-based grid row |
w | integer | Width in grid columns |
h | integer | Height in grid rows |
min_w | integer / null | Minimum width in grid columns; legacy layout field |
min_h | integer / null | Minimum height in grid rows; legacy layout field |
max_w | integer / null | Maximum width in grid columns; legacy layout field |
max_h | integer / null | Maximum height in grid rows; legacy layout field |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show widgets — Item fields
Show widgets — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
dashboard_id | string / null | Dashboard ID |
type | string | Type; Values: "text", "visualization", "parameter" |
visualization_id | string / null | Visualization ID |
text_content | string / null | Markdown text |
options | object | Display configuration; writes accept only {} or null. Use the Visualization for chart settings and the Dashboard layout for positioning |
entities | object[] | Related resource list |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
entities_map | object | Related content indexed by resource type and ID |
visualization | object / null | Referenced visualization; null if unreadable or deleted |
parameters | object[] / null | Parameter definitions |
code | string / null | Executable code; SQL for a Query |
space_entity | object / null | Details of the owning Space |
query_name | string / null | Referenced Query name; null if unavailable |
Show entities — Item fields
Show entities — Item fields
| Field | Type | Description |
|---|---|---|
type | string | Type; Values: "query", "dashboard", "notebook", "table", "field", "function", "contract", "chain", "schedule", "page", "issue" |
id | string | Unique object ID |
raw | string | Original resource-reference text in the content |
Show entities_map — By resource type
Show entities_map — By resource type
Show Resource fields by ID
Show Resource fields by ID
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show visualization — Fields
Show visualization — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | string / null | Parameter display ID stored with the definition |
order | integer / null | Omit for every parameter, or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/dashboard/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000003",
"options": {
"layout": {
"lg": {
"01900000000070008000000000000004": {
"x": 0,
"y": 0,
"w": 3,
"h": 8
}
},
"sm": {
"01900000000070008000000000000004": {
"x": 0,
"y": 0,
"w": 1,
"h": 8
}
}
}
}
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000003",
"space": "demo",
"name": "Asset overview",
"options": {
"layout": {
"lg": {
"01900000000070008000000000000004": {
"x": 0,
"y": 0,
"w": 3,
"h": 8
}
},
"sm": {
"01900000000070008000000000000004": {
"x": 0,
"y": 0,
"w": 1,
"h": 8
}
}
}
},
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"widgets": [],
"is_starred": false,
"star_count": 0
}
}
POST /v1/dashboard/widget/create — Add a Widget
POST /v1/dashboard/widget/create — Add a Widget
visualization_id is required for type=visualization and disallowed for other types. Chart settings belong to the Visualization; positioning belongs to the Dashboard layout.Method: POSTPath:
/v1/dashboard/widget/createParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–32 characters |
dashboard_id | string | Yes | Dashboard ID; 1–32 characters |
type | string | Yes | Type; Values: "text", "visualization", "parameter" |
text_content | string / null | No | Markdown text |
visualization_id | string / null | No | Visualization ID; 1–32 characters |
options | object / null | No | Display configuration; writes accept only {} or null. Use the Visualization for chart settings and the Dashboard layout for positioning |
entities | object[] | No | Related resource list |
Show entities — Item fields
Show entities — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Type; Values: "query", "dashboard", "notebook", "table", "field", "function", "contract", "chain", "schedule", "page", "issue" |
id | string | Yes | Unique object ID; 1–255 characters |
raw | string | Yes | Original resource-reference text in the content; 1–255 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
dashboard_id | string / null | Dashboard ID |
type | string | Type; Values: "text", "visualization", "parameter" |
visualization_id | string / null | Visualization ID |
text_content | string / null | Markdown text |
options | object | Display configuration; writes accept only {} or null. Use the Visualization for chart settings and the Dashboard layout for positioning |
entities | object[] | Related resource list |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
entities_map | object | Related content indexed by resource type and ID |
visualization | object / null | Referenced visualization; null if unreadable or deleted |
parameters | object[] / null | Parameter definitions |
code | string / null | Executable code; SQL for a Query |
space_entity | object / null | Details of the owning Space |
query_name | string / null | Referenced Query name; null if unavailable |
Show entities — Item fields
Show entities — Item fields
| Field | Type | Description |
|---|---|---|
type | string | Type; Values: "query", "dashboard", "notebook", "table", "field", "function", "contract", "chain", "schedule", "page", "issue" |
id | string | Unique object ID |
raw | string | Original resource-reference text in the content |
Show entities_map — By resource type
Show entities_map — By resource type
Show Resource fields by ID
Show Resource fields by ID
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show visualization — Fields
Show visualization — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | string / null | Parameter display ID stored with the definition |
order | integer / null | Omit for every parameter, or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/dashboard/widget/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000004",
"dashboard_id": "01900000000070008000000000000003",
"type": "visualization",
"visualization_id": "01900000000070008000000000000005"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000004",
"dashboard_id": "01900000000070008000000000000003",
"type": "visualization",
"visualization_id": "01900000000070008000000000000005",
"text_content": null,
"options": {},
"entities": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"entities_map": {},
"visualization": {
"id": "01900000000070008000000000000005",
"query_id": "01900000000070008000000000000001",
"name": "Asset count",
"type": "chart",
"options": {
"type": "counter",
"column_name": "row_count",
"row_number": 0,
"decimals": 0
},
"created_at": 1788220800.0,
"updated_at": 1788220800.0
},
"parameters": [],
"code": "SELECT COUNT(*) AS row_count FROM demo.asset_notes",
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"query_name": "Asset count"
}
}
POST /v1/dashboard/widget/delete — Delete a Widget
POST /v1/dashboard/widget/delete — Delete a Widget
POSTPath:
/v1/dashboard/widget/deleteParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–32 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/dashboard/widget/delete \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000004"
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/dashboard/widget/update — Update a Widget
POST /v1/dashboard/widget/update — Update a Widget
POSTPath:
/v1/dashboard/widget/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–32 characters |
text_content | string / null | No | Markdown text |
options | object / null | No | Display configuration; writes accept only {} or null. Use the Visualization for chart settings and the Dashboard layout for positioning |
entities | object[] / null | No | Related resource list |
Show entities — Item fields
Show entities — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Type; Values: "query", "dashboard", "notebook", "table", "field", "function", "contract", "chain", "schedule", "page", "issue" |
id | string | Yes | Unique object ID; 1–255 characters |
raw | string | Yes | Original resource-reference text in the content; 1–255 characters |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
dashboard_id | string / null | Dashboard ID |
type | string | Type; Values: "text", "visualization", "parameter" |
visualization_id | string / null | Visualization ID |
text_content | string / null | Markdown text |
options | object | Display configuration; writes accept only {} or null. Use the Visualization for chart settings and the Dashboard layout for positioning |
entities | object[] | Related resource list |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
entities_map | object | Related content indexed by resource type and ID |
visualization | object / null | Referenced visualization; null if unreadable or deleted |
parameters | object[] / null | Parameter definitions |
code | string / null | Executable code; SQL for a Query |
space_entity | object / null | Details of the owning Space |
query_name | string / null | Referenced Query name; null if unavailable |
Show entities — Item fields
Show entities — Item fields
| Field | Type | Description |
|---|---|---|
type | string | Type; Values: "query", "dashboard", "notebook", "table", "field", "function", "contract", "chain", "schedule", "page", "issue" |
id | string | Unique object ID |
raw | string | Original resource-reference text in the content |
Show entities_map — By resource type
Show entities_map — By resource type
Show Resource fields by ID
Show Resource fields by ID
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show visualization — Fields
Show visualization — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
query_id | string / null | Query ID |
name | string / null | Name |
type | string | Type; Values: "table", "chart", "counter", "pivot" |
options | object / null | Configuration selected by options.type; {} or null clears it. If display columns are omitted, the website selects them from the result. Nested keys use snake_case; unknown keys are rejected |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
Show options — Fields
Show options — Fields
- Table
- Bar / line / area / scatter
- Pie
- Counter
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "table" |
columns | object / null | Display settings keyed by result column name |
export_options | object / null | Result export settings |
Show columns — Value fields
Show columns — Value fields
| Field | Type | Description |
|---|---|---|
name | string / null | Name |
title | string / null | Display title |
align | string / null | Cell alignment; Values: "left", "center", "right" |
type | string / null | normal displays a regular cell; progress displays a progress bar; Values: "normal", "progress" |
format | string / null | Number or date format string |
hide | boolean / null | Whether to hide the column |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
url_template | string / null | Cell URL template; {value} is replaced by the cell value |
Show export_options — Fields
Show export_options — Fields
| Field | Type | Description |
|---|---|---|
enabled | boolean / null | Whether exporting is enabled |
formats | string[] / null | Allowed export formats |
filename | string / null | Export filename |
include_all_data | boolean / null | Whether to export all data |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Values: "bar", "line", "area", "scatter" |
x_column | string / null | Result column for the x-axis |
y_columns | string[] / null | Numeric result columns; one series per column, with no duplicates |
x_axis | object / null | X-axis settings |
y_axis | object / null | Left y-axis settings |
right_y_axis | object / null | Right y-axis settings |
legend | object / null | Legend settings |
series | object / null | Keys are y-column names, or group values when group_by is enabled |
enable_stacking | boolean / null | Whether to stack series |
show_data_labels | boolean / null | Whether to show data labels |
show_total_in_tooltip | boolean / null | Whether to show the total in tooltips |
group_by | string / null | Group series by this column’s values; uses only the first y_columns entry. An empty string disables grouping |
normalize_to_percentage | boolean / null | Normalize grouped values at each x position to 100% |
when_duplicate_x | string / null | For duplicate x values: first uses the first row, all keeps every row, sum adds the values; Values: "first", "all", "sum" |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show x_axis — Fields
Show x_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show right_y_axis — Fields
Show right_y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show series — Value fields
Show series — Value fields
| Field | Type | Description |
|---|---|---|
title | string / null | Legend and tooltip title; defaults to the series name |
type | string / null | Series chart type; inherits options.type when omitted; Values: "bar", "line", "area", "scatter" |
color | string / null | CSS color |
is_right | boolean / null | Use the right axis; requires y_axis.enable_right_axis |
connect_nulls | boolean / null | Whether lines connect across null values |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
silent | boolean / null | Whether to disable series interactions |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "pie" |
label_column | string / null | Pie chart category column |
value_column | string / null | Pie chart value column |
legend | object / null | Legend settings |
show_data_labels | boolean / null | Whether to show data labels |
y_axis | object / null | Only label_format is used to format values |
values_options | object / null | Map of category values to slice color settings |
series_title | string / null | Series name in tooltips |
show_legend | boolean / null | Legacy legend toggle; use legend.show |
Show legend — Fields
Show legend — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show; legends are shown when omitted |
position | string / null | Legend position; arranged automatically when omitted; Values: "top", "right", "bottom", "left" |
show_all | boolean / null | Whether the pie legend lists every category |
Show y_axis — Fields
Show y_axis — Fields
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
tick_format | string / null | Tick format string, such as YYYY-MM-DD |
label_format | string / null | Tooltip or data-label format string |
type | string / null | X-axis type can be inferred from the column; y-axes use linear or log; Values: "linear", "band", "time", "log" |
include_zero | boolean / null | Whether the y-axis includes zero; included when omitted |
min | number / null | Axis minimum; cannot exceed max |
max | number / null | Axis maximum |
sort_values | boolean / null | Whether to sort x-axis values; sorted when omitted |
reverse_values | boolean / null | Whether to reverse axis order |
enable_right_axis | boolean / null | Enable the right axis for series with is_right set |
auto_tick | boolean / null | Whether to determine ticks automatically |
nice | boolean / null | Whether to round axis bounds to convenient ticks |
asymmetric_equal_domain | boolean / null | Whether to expand identical bounds asymmetrically |
num_ticks | integer / null | Number of ticks |
width | number / null | Axis width |
reference_lines | object[] / null | Axis reference lines |
zones | object[] / null | Highlighted axis regions |
Show reference_lines — Item fields
Show reference_lines — Item fields
| Field | Type | Description |
|---|---|---|
value | number / string | Reference line position; time axes can use a date string |
stroke | string | Reference line color as a CSS color |
tick | object / null | Reference line tick settings |
Show tick — Fields
Show tick — Fields
| Field | Type | Description |
|---|---|---|
show | boolean / null | Whether to show the reference line tick |
Show zones — Item fields
Show zones — Item fields
| Field | Type | Description |
|---|---|---|
from | number / string / null | Start of the highlighted region |
to | number / string / null | End of the highlighted region |
color | string / null | CSS color |
fill_gradient | string[] / null | Gradient start and end colors; exactly two CSS colors |
Show values_options — Value fields
Show values_options — Value fields
| Field | Type | Description |
|---|---|---|
color | string | CSS color |
| Field | Type | Description |
|---|---|---|
title | string / null | Display title |
description | string / null | Description |
type | string | Type; Must be "counter" |
column_name | string / null | Numeric column displayed by the counter |
row_number | integer / null | Zero-based result row index; defaults to 0 |
prefix | string / null | Value prefix |
suffix | string / null | Value suffix |
decimals | integer / null | Decimal places; formatting follows the column type when omitted |
colored_positive | boolean / null | Whether to color positive values |
colored_negative | boolean / null | Whether to color negative values |
label | string / null | Display label or category |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string | Name |
type | string | Logical parameter type; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | string / null | Parameter display ID stored with the definition |
order | integer / null | Omit for every parameter, or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/dashboard/widget/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000015",
"text_content": "# Asset overview"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "01900000000070008000000000000015",
"dashboard_id": "01900000000070008000000000000003",
"type": "text",
"visualization_id": null,
"text_content": "# Asset overview",
"options": {},
"entities": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"entities_map": {}
}
}
schedule
The calling account must own the schedule’s Space, and the user must have write access to that Space. The target content must belong to the same account.GET /v1/schedule — Get a schedule
GET /v1/schedule — Get a schedule
id or by the complete space, content_type, and content_id combination; do not mix them. Content lookup returns the most recently updated matching schedule, or null.Method: GETPath:
/v1/scheduleParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string / null | No | Unique object ID; 1–255 characters |
space | string / null | No | Space ID; 1–64 characters |
content_type | string / null | No | Target content type; Values: "query", "dashboard", "notebook" |
content_id | string / null | No | Target content ID; 1–255 characters |
data is null if content lookup finds no schedule.| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
account_id | string | Account ID |
enabled | boolean / null | Whether the schedule is enabled |
next_run_at | number / null | Next run time in Unix seconds; null if none is planned |
runtime_status | string / null | Continuous schedule state; null for cron schedules; Values: "running", "stopping", "starting", "stopped" |
instance | object / null | Instance summary for a continuous schedule |
recent_runs | object[] | Recent schedule runs |
content | object / null | Target content summary; null if unavailable |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show instance — Fields
Show instance — Fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
status | string / null | Status |
display_status | string | Instance display status; Values: "running", "succeeded", "failed", "canceled", "starting" |
exit_code | integer / null | Exit code; null while running, 0 on success |
exit_message | string / null | Exit reason; null while running |
created_at | number / null | Creation time in Unix seconds |
exited_at | number / null | Exit time in Unix seconds; null while running |
Show recent_runs — Item fields
Show recent_runs — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
status | string | Status |
display_status | string | Instance display status |
exit_code | integer / null | Exit code; null while running, 0 on success |
planned_at | number / null | Planned execution time in Unix seconds |
started_at | number / null | Start time in Unix seconds; null before execution starts |
finished_at | number / null | Completion time in Unix seconds; null before completion |
message | string / null | Description or error message |
instance_id | string / null | Notebook execution instance ID |
Show content — Fields
Show content — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
language | string / null | Code language |
parameters | object[] | Parameter definitions |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Parameter name |
type | string | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Parameter display ID; generated by the service in responses |
order | integer / null | Parameter order; Function parameters must all omit it or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl --get https://api.chaintable.com/v1/schedule \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode id=0190000000007000800000000000000a
{
"code": 0,
"message": "ok",
"data": {
"id": "0190000000007000800000000000000a",
"space": "demo",
"content_type": "notebook",
"content_id": "01900000000070008000000000000002",
"name": "Hourly message",
"mode": "crontab",
"cron": "0 * * * *",
"arguments": [],
"max_cpu": 100,
"max_memory": 4294967296,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"account_id": "0190000000007000800000000000000b",
"enabled": true,
"next_run_at": 1788224400.0,
"runtime_status": null,
"instance": null,
"recent_runs": [],
"content": {
"id": "01900000000070008000000000000002",
"name": "print_message",
"space": "demo",
"language": "python",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
}
POST /v1/schedule/create — Create a schedule
POST /v1/schedule/create — Create a schedule
crontab requires a Cron expression; perpetual supports Notebooks only. Notebook schedules require a valid CPU and memory pair.Method: POSTPath:
/v1/schedule/createParameters| Field | Type | Required | Description |
|---|---|---|---|
content_type | string | Yes | Target content type; Values: "query", "dashboard", "notebook" |
content_id | string | Yes | Target content ID; 32–32 characters; Pattern: ^[0-9a-f]{32}$ |
name | string / null | No | Name; ≤ 128 characters |
mode | string | No | Schedule mode; Values: "crontab", "perpetual"; Default "crontab" |
cron | string / null | No | Cron expression; ≤ 128 characters |
arguments | object[] | No | Argument values for this execution |
max_cpu | integer / null | No | CPU allocation; 100 represents 1 vCPU; > 0 |
max_memory | integer / null | No | Memory allocation in bytes; > 0 |
space | string | Yes | Space ID; 1–64 characters |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
name | string / null | No | Name of the matching parameter |
order | integer / null | No | Omit for every argument, or use consecutive values from 0 to determine argument order; ≥ 0 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
account_id | string | Account ID |
enabled | boolean / null | Whether the schedule is enabled |
next_run_at | number / null | Next run time in Unix seconds; null if none is planned |
runtime_status | string / null | Continuous schedule state; null for cron schedules; Values: "running", "stopping", "starting", "stopped" |
instance | object / null | Instance summary for a continuous schedule |
recent_runs | object[] | Recent schedule runs |
content | object / null | Target content summary; null if unavailable |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show instance — Fields
Show instance — Fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
status | string / null | Status |
display_status | string | Instance display status; Values: "running", "succeeded", "failed", "canceled", "starting" |
exit_code | integer / null | Exit code; null while running, 0 on success |
exit_message | string / null | Exit reason; null while running |
created_at | number / null | Creation time in Unix seconds |
exited_at | number / null | Exit time in Unix seconds; null while running |
Show recent_runs — Item fields
Show recent_runs — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
status | string | Status |
display_status | string | Instance display status |
exit_code | integer / null | Exit code; null while running, 0 on success |
planned_at | number / null | Planned execution time in Unix seconds |
started_at | number / null | Start time in Unix seconds; null before execution starts |
finished_at | number / null | Completion time in Unix seconds; null before completion |
message | string / null | Description or error message |
instance_id | string / null | Notebook execution instance ID |
Show content — Fields
Show content — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
language | string / null | Code language |
parameters | object[] | Parameter definitions |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Parameter name |
type | string | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Parameter display ID; generated by the service in responses |
order | integer / null | Parameter order; Function parameters must all omit it or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/schedule/create \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"space": "demo",
"content_type": "notebook",
"content_id": "01900000000070008000000000000002",
"name": "Hourly message",
"mode": "crontab",
"cron": "0 * * * *",
"arguments": [],
"max_cpu": 100,
"max_memory": 4294967296
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "0190000000007000800000000000000a",
"space": "demo",
"content_type": "notebook",
"content_id": "01900000000070008000000000000002",
"name": "Hourly message",
"mode": "crontab",
"cron": "0 * * * *",
"arguments": [],
"max_cpu": 100,
"max_memory": 4294967296,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"account_id": "0190000000007000800000000000000b",
"enabled": true,
"next_run_at": 1788224400.0,
"runtime_status": null,
"instance": null,
"recent_runs": [],
"content": {
"id": "01900000000070008000000000000002",
"name": "print_message",
"space": "demo",
"language": "python",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
}
POST /v1/schedule/delete — Delete a schedule
POST /v1/schedule/delete — Delete a schedule
POSTPath:
/v1/schedule/deleteParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/schedule/delete \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "0190000000007000800000000000000a"
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/schedule/disable — Disable a schedule
POST /v1/schedule/disable — Disable a schedule
POSTPath:
/v1/schedule/disableParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/schedule/disable \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "0190000000007000800000000000000a"
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/schedule/enable — Enable a schedule
POST /v1/schedule/enable — Enable a schedule
POSTPath:
/v1/schedule/enableParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/schedule/enable \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "0190000000007000800000000000000a"
}'
{
"code": 0,
"message": "ok",
"data": null
}
GET /v1/schedule/list — List schedules
GET /v1/schedule/list — List schedules
GETPath:
/v1/schedule/listParameters| Field | Type | Required | Description |
|---|---|---|---|
start | integer | No | Pagination offset, starting at 0; ≥ 0; Default 0 |
limit | integer | No | Maximum number of entries; ≥ 1; ≤ 100; Default 20 |
order_by | string | No | Sort field; Values: "id", "name", "created_at", "updated_at"; Default "updated_at" |
direction | string | No | Sort direction; Values: "asc", "desc"; Default "desc" |
space | string | Yes | Filter by Space; when omitted, list resources in visible Spaces; 1–64 characters |
content_type | string / null | No | Target content type; Values: "query", "dashboard", "notebook" |
content_id | string / null | No | Target content ID; 1–255 characters |
mode | string / null | No | Schedule mode; Values: "crontab", "perpetual" |
keyword | string / null | No | Search keyword; ≤ 128 characters |
| Field | Type | Description |
|---|---|---|
start | integer | Pagination offset, starting at 0 |
limit | integer | Maximum number of entries |
items | object[] | Entries on this page |
total_count | integer | Total number of matching entries |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
account_id | string | Account ID |
enabled | boolean / null | Whether the schedule is enabled |
next_run_at | number / null | Next run time in Unix seconds; null if none is planned |
runtime_status | string / null | Continuous schedule state; null for cron schedules; Values: "running", "stopping", "starting", "stopped" |
instance | object / null | Instance summary for a continuous schedule |
recent_runs | object[] | Recent schedule runs |
content | object / null | Target content summary; null if unavailable |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show instance — Fields
Show instance — Fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
status | string / null | Status |
display_status | string | Instance display status; Values: "running", "succeeded", "failed", "canceled", "starting" |
exit_code | integer / null | Exit code; null while running, 0 on success |
exit_message | string / null | Exit reason; null while running |
created_at | number / null | Creation time in Unix seconds |
exited_at | number / null | Exit time in Unix seconds; null while running |
Show recent_runs — Item fields
Show recent_runs — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
status | string | Status |
display_status | string | Instance display status |
exit_code | integer / null | Exit code; null while running, 0 on success |
planned_at | number / null | Planned execution time in Unix seconds |
started_at | number / null | Start time in Unix seconds; null before execution starts |
finished_at | number / null | Completion time in Unix seconds; null before completion |
message | string / null | Description or error message |
instance_id | string / null | Notebook execution instance ID |
Show content — Fields
Show content — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
language | string / null | Code language |
parameters | object[] | Parameter definitions |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Parameter name |
type | string | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Parameter display ID; generated by the service in responses |
order | integer / null | Parameter order; Function parameters must all omit it or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl --get https://api.chaintable.com/v1/schedule/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
--data-urlencode space=demo \
--data-urlencode limit=10
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "0190000000007000800000000000000a",
"space": "demo",
"content_type": "notebook",
"content_id": "01900000000070008000000000000002",
"name": "Hourly message",
"mode": "crontab",
"cron": "0 * * * *",
"arguments": [],
"max_cpu": 100,
"max_memory": 4294967296,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"account_id": "0190000000007000800000000000000b",
"enabled": true,
"next_run_at": 1788224400.0,
"runtime_status": null,
"instance": null,
"recent_runs": [],
"content": {
"id": "01900000000070008000000000000002",
"name": "print_message",
"space": "demo",
"language": "python",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
],
"total_count": 1,
"start": 0,
"limit": 10
}
}
POST /v1/schedule/restart — Restart a continuous schedule
POST /v1/schedule/restart — Restart a continuous schedule
perpetual; other modes return 409.Method: POSTPath:
/v1/schedule/restartParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
| Field | Type | Description |
|---|---|---|
data | null | Operation completed with no response data |
curl https://api.chaintable.com/v1/schedule/restart \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "01900000000070008000000000000019"
}'
{
"code": 0,
"message": "ok",
"data": null
}
POST /v1/schedule/update — Update a schedule
POST /v1/schedule/update — Update a schedule
POSTPath:
/v1/schedule/updateParameters| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique object ID; 1–255 characters |
name | string / null | No | Name; ≤ 128 characters |
cron | string / null | No | Cron expression; ≤ 128 characters |
arguments | object[] | No | Argument values for this execution |
max_cpu | integer | No | CPU allocation; 100 represents 1 vCPU; > 0 |
max_memory | integer | No | Memory allocation in bytes; > 0 |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
value | JSON | Yes | Argument value |
name | string / null | No | Name of the matching parameter |
order | integer / null | No | Omit for every argument, or use consecutive values from 0 to determine argument order; ≥ 0 |
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
content_type | string / null | Target content type |
content_id | string / null | Target content ID |
cron | string / null | Cron expression |
arguments | object[] | Argument values for this execution |
name | string / null | Name |
mode | string / null | Schedule mode |
max_cpu | integer / null | CPU allocation; 100 represents 1 vCPU |
max_memory | integer / null | Memory allocation in bytes |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
space_entity | object / null | Details of the owning Space |
account_id | string | Account ID |
enabled | boolean / null | Whether the schedule is enabled |
next_run_at | number / null | Next run time in Unix seconds; null if none is planned |
runtime_status | string / null | Continuous schedule state; null for cron schedules; Values: "running", "stopping", "starting", "stopped" |
instance | object / null | Instance summary for a continuous schedule |
recent_runs | object[] | Recent schedule runs |
content | object / null | Target content summary; null if unavailable |
Show arguments — Item fields
Show arguments — Item fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
name | string / null | Name of the matching parameter |
order | integer / null | Omit for every argument, or use consecutive values from 0 to determine argument order |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
Show instance — Fields
Show instance — Fields
| Field | Type | Description |
|---|---|---|
id | string / null | Unique object ID |
status | string / null | Status |
display_status | string | Instance display status; Values: "running", "succeeded", "failed", "canceled", "starting" |
exit_code | integer / null | Exit code; null while running, 0 on success |
exit_message | string / null | Exit reason; null while running |
created_at | number / null | Creation time in Unix seconds |
exited_at | number / null | Exit time in Unix seconds; null while running |
Show recent_runs — Item fields
Show recent_runs — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
status | string | Status |
display_status | string | Instance display status |
exit_code | integer / null | Exit code; null while running, 0 on success |
planned_at | number / null | Planned execution time in Unix seconds |
started_at | number / null | Start time in Unix seconds; null before execution starts |
finished_at | number / null | Completion time in Unix seconds; null before completion |
message | string / null | Description or error message |
instance_id | string / null | Notebook execution instance ID |
Show content — Fields
Show content — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
space | string | Space ID |
name | string / null | Name |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
language | string / null | Code language |
parameters | object[] | Parameter definitions |
space_entity | object / null | Details of the owning Space |
Show parameters — Item fields
Show parameters — Item fields
| Field | Type | Description |
|---|---|---|
name | string / null | Parameter name |
type | string | Logical parameter type, such as INT, STRING, or ADDRESS; see Data types |
options | JSON[] / null | Allowed choices for the parameter |
default | object / null | Default parameter value |
id | JSON / null | Parameter display ID; generated by the service in responses |
order | integer / null | Parameter order; Function parameters must all omit it or use consecutive values from 0 |
Show default — Fields
Show default — Fields
| Field | Type | Description |
|---|---|---|
value | JSON | Argument value |
Show space_entity — Fields
Show space_entity — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
description | string / null | Description |
account_id | string | Account ID |
status | string | Status |
visibility | string | Visibility: public, org, or private |
dep_count | integer | Dependency count |
content_count | integer | Number of content entries |
created_at | number | Creation time in Unix seconds |
updated_at | number | Last update time in Unix seconds |
account | object / null | Account details |
Show account — Fields
Show account — Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique object ID |
type | string | Account type: personal or org |
slug | string / null | Account slug used for display and URLs |
display_name | string / null | Account display name |
avatar_url | string / null | Avatar URL |
avatar_thumbnail_url | string / null | Avatar thumbnail URL |
curl https://api.chaintable.com/v1/schedule/update \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID" \
-H 'Content-Type: application/json' \
--data '{
"id": "0190000000007000800000000000000a",
"cron": "*/30 * * * *"
}'
{
"code": 0,
"message": "ok",
"data": {
"id": "0190000000007000800000000000000a",
"space": "demo",
"content_type": "notebook",
"content_id": "01900000000070008000000000000002",
"name": "Hourly message",
"mode": "crontab",
"cron": "*/30 * * * *",
"arguments": [],
"max_cpu": 100,
"max_memory": 4294967296,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
},
"account_id": "0190000000007000800000000000000b",
"enabled": true,
"next_run_at": 1788222600.0,
"runtime_status": null,
"instance": null,
"recent_runs": [],
"content": {
"id": "01900000000070008000000000000002",
"name": "print_message",
"space": "demo",
"language": "python",
"parameters": [],
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"space_entity": {
"id": "demo",
"description": "Example resources",
"account_id": "0190000000007000800000000000000b",
"status": "active",
"visibility": "public",
"dep_count": 0,
"content_count": 6,
"created_at": 1788220800.0,
"updated_at": 1788220800.0,
"account": {
"id": "0190000000007000800000000000000b",
"type": "org",
"slug": "example-team",
"display_name": "Example team",
"avatar_url": null,
"avatar_thumbnail_url": null
}
}
}
}
}
chain
GET /v1/chain/list — List supported chains
GET /v1/chain/list — List supported chains
items array is not paginated.Method: GETPath:
/v1/chain/listParametersNo request parameters.Returns| Field | Type | Description |
|---|---|---|
items | object[] | Entries on this page |
Show items — Item fields
Show items — Item fields
| Field | Type | Description |
|---|---|---|
id | string | Platform chain identifier, such as eth |
name | string | Name |
avatar_url | string | Avatar URL |
chain_id | integer | EIP-155 chain number, such as 1 for Ethereum |
status | string | Chain state: supported, developing, or deprecated |
curl https://api.chaintable.com/v1/chain/list \
-H "Authorization: Bearer $CHAINTABLE_PERSONAL_ACCESS_TOKEN" \
-H "X-Account-ID: $CHAINTABLE_ACCOUNT_ID"
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "eth",
"name": "Ethereum",
"avatar_url": "https://example.com/eth.png",
"chain_id": 1,
"status": "supported"
}
]
}
}
leafage
Read EVM data or simulate contract calls through Chaintable. The methods below share one JSON-RPC endpoint. HTTP method:POSTPath:
/v1/leafage/{chain_id}
Request format
| Field | Type | Required | Description |
|---|---|---|---|
chain_id | integer | Yes | Path parameter: EIP-155 chain number, such as 1 for Ethereum |
| Field | Type | Required | Description |
|---|---|---|---|
jsonrpc | string | Yes | JSON-RPC version; Must be "2.0" |
id | integer / string / null | No | JSON-RPC request ID used to match the response |
method | string | Yes | Leafage method name |
params | JSON[] | No | Positional method arguments |
params in the order listed for each method. ? marks optional trailing arguments; use null as a placeholder when supplying a later argument.
Response format
| Field | Type | Description |
|---|---|---|
jsonrpc | string | JSON-RPC version; Must be "2.0" |
id | JSON | JSON-RPC ID corresponding to the request |
result | JSON | Upstream result; mutually exclusive with error |
error | object | Upstream error; mutually exclusive with result |
Show error — Fields
Show error — Fields
| Field | Type | Description |
|---|---|---|
code | integer | Upstream JSON-RPC error code |
message | string | Description or error message |
data | JSON | Optional data attached to the upstream error |
blockIsValid — Check block validity
blockIsValid — Check block validity
blockIsValidParametersparams: [block_id]| Field | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Block hash |
| Field | Type | Description |
|---|---|---|
result | boolean | Whether the block is valid |
curl https://api.chaintable.com/v1/leafage/1 \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "blockIsValid",
"params": [
"0xf5e1d15a3e380006bd271e73c8eeed75fafc3ae6942b16f63c21361079bba709"
]
}'
{
"code": 0,
"message": "ok",
"data": {
"jsonrpc": "2.0",
"id": 1,
"result": true
}
}
getLatestBlock — Get the latest block
getLatestBlock — Get the latest block
getLatestBlockParametersNo parameters. Pass [] as params.Returns| Field | Type | Description |
|---|---|---|
result | object | Latest block details |
Show result — Fields
Show result — Fields
| Field | Type | Description |
|---|---|---|
id | string | Block hash |
height | integer | Block height |
timestamp | integer | Block timestamp in Unix seconds |
parent_id | string | Parent block hash |
base_fee_per_gas | integer | Block base fee per gas |
miner | string | Block producer address |
gas_limit | integer | Gas limit |
gas_used | integer | Gas used |
curl https://api.chaintable.com/v1/leafage/1 \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getLatestBlock",
"params": []
}'
{
"code": 0,
"message": "ok",
"data": {
"jsonrpc": "2.0",
"id": 1,
"result": {
"base_fee_per_gas": 102802309,
"gas_limit": 60000000,
"gas_used": 7510076,
"height": 26154104,
"id": "0xb66a4b6766bd638be6968689ce4e94d2685f4ef9b6d3374d2e1796365c55bdd0",
"miner": "0x388c818ca8b9251b393131c08a736a67ccb19297",
"parent_id": "0x3a3efad4b46701971a6df1f5d9255e8d0da0c908c7879158e1e81a8c1abf268f",
"timestamp": 1791539891
}
}
}
getBlockById — Get a block by hash
getBlockById — Get a block by hash
getBlockByIdParametersparams: [block_id]| Field | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Block hash |
| Field | Type | Description |
|---|---|---|
result | object | Details of the specified block |
Show result — Fields
Show result — Fields
| Field | Type | Description |
|---|---|---|
id | string | Block hash |
height | integer | Block height |
timestamp | integer | Block timestamp in Unix seconds |
parent_id | string | Parent block hash |
base_fee_per_gas | integer | Block base fee per gas |
miner | string | Block producer address |
gas_limit | integer | Gas limit |
gas_used | integer | Gas used |
curl https://api.chaintable.com/v1/leafage/1 \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlockById",
"params": [
"0xf5e1d15a3e380006bd271e73c8eeed75fafc3ae6942b16f63c21361079bba709"
]
}'
{
"code": 0,
"message": "ok",
"data": {
"jsonrpc": "2.0",
"id": 1,
"result": {
"base_fee_per_gas": 18191470273,
"gas_limit": 30000000,
"gas_used": 13952884,
"height": 21000000,
"id": "0xf5e1d15a3e380006bd271e73c8eeed75fafc3ae6942b16f63c21361079bba709",
"miner": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5",
"parent_id": "0x215f1fa046ff46999f1a91973d7cc39c6d4e7aa64d3de3a40d31591f543c3386",
"timestamp": 1729345547
}
}
}
getBlockByHeight — Get a block by height
getBlockByHeight — Get a block by height
getBlockByHeightParametersparams: [block_height]| Field | Type | Required | Description |
|---|---|---|---|
block_height | integer | Yes | Block height as an integer |
| Field | Type | Description |
|---|---|---|
result | object | Details of the block at the specified height |
Show result — Fields
Show result — Fields
| Field | Type | Description |
|---|---|---|
id | string | Block hash |
height | integer | Block height |
timestamp | integer | Block timestamp in Unix seconds |
parent_id | string | Parent block hash |
base_fee_per_gas | integer | Block base fee per gas |
miner | string | Block producer address |
gas_limit | integer | Gas limit |
gas_used | integer | Gas used |
curl https://api.chaintable.com/v1/leafage/1 \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlockByHeight",
"params": [
21000000
]
}'
{
"code": 0,
"message": "ok",
"data": {
"jsonrpc": "2.0",
"id": 1,
"result": {
"base_fee_per_gas": 18191470273,
"gas_limit": 30000000,
"gas_used": 13952884,
"height": 21000000,
"id": "0xf5e1d15a3e380006bd271e73c8eeed75fafc3ae6942b16f63c21361079bba709",
"miner": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5",
"parent_id": "0x215f1fa046ff46999f1a91973d7cc39c6d4e7aa64d3de3a40d31591f543c3386",
"timestamp": 1729345547
}
}
}
getAddressBalance — Get an address balance
getAddressBalance — Get an address balance
getAddressBalanceParametersparams: [address, block_context?]| Field | Type | Required | Description |
|---|---|---|---|
address | string | Yes | EVM address to query |
block_context | object | No | State to read; defaults to the latest state |
Show block_context — Fields
Show block_context — Fields
| Field | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Block hash, hexadecimal height, or latest |
type | string | Yes | Equals reads the specified block; Contains checks that the block is valid and canonical, then reads the latest state, otherwise returning an error; Values: "Equals", "Contains" |
| Field | Type | Description |
|---|---|---|
result | string | Native token balance as a hexadecimal U256 string in the smallest unit |
curl https://api.chaintable.com/v1/leafage/1 \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getAddressBalance",
"params": [
"0x3333333333333333333333333333333333333333",
{
"block_id": "latest",
"type": "Equals"
}
]
}'
{
"code": 0,
"message": "ok",
"data": {
"jsonrpc": "2.0",
"id": 1,
"result": "0xde0b6b3a7640000"
}
}
getAddressNonce — Get an address nonce
getAddressNonce — Get an address nonce
getAddressNonceParametersparams: [address, block_context?]| Field | Type | Required | Description |
|---|---|---|---|
address | string | Yes | EVM address to query |
block_context | object | No | State to read; defaults to the latest state |
Show block_context — Fields
Show block_context — Fields
| Field | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Block hash, hexadecimal height, or latest |
type | string | Yes | Equals reads the specified block; Contains checks that the block is valid and canonical, then reads the latest state, otherwise returning an error; Values: "Equals", "Contains" |
| Field | Type | Description |
|---|---|---|
result | string | Address nonce as a hexadecimal U256 string |
curl https://api.chaintable.com/v1/leafage/1 \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getAddressNonce",
"params": [
"0x3333333333333333333333333333333333333333",
{
"block_id": "latest",
"type": "Equals"
}
]
}'
{
"code": 0,
"message": "ok",
"data": {
"jsonrpc": "2.0",
"id": 1,
"result": "0x2a"
}
}
getAddressCode — Get contract code
getAddressCode — Get contract code
getAddressCodeParametersparams: [address, block_context?]| Field | Type | Required | Description |
|---|---|---|---|
address | string | Yes | EVM address to query |
block_context | object | No | State to read; defaults to the latest state |
Show block_context — Fields
Show block_context — Fields
| Field | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Block hash, hexadecimal height, or latest |
type | string | Yes | Equals reads the specified block; Contains checks that the block is valid and canonical, then reads the latest state, otherwise returning an error; Values: "Equals", "Contains" |
| Field | Type | Description |
|---|---|---|
result | string | Contract bytecode as a hexadecimal string; 0x when no code exists |
curl https://api.chaintable.com/v1/leafage/1 \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getAddressCode",
"params": [
"0x3333333333333333333333333333333333333333",
{
"block_id": "latest",
"type": "Equals"
}
]
}'
{
"code": 0,
"message": "ok",
"data": {
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
}
getStorageAt — Get a storage slot
getStorageAt — Get a storage slot
getStorageAtParametersparams: [address, position, block_context?]| Field | Type | Required | Description |
|---|---|---|---|
address | string | Yes | EVM address to query |
position | string | Yes | Storage slot position as a hexadecimal value |
block_context | object | No | State to read; defaults to the latest state |
Show block_context — Fields
Show block_context — Fields
| Field | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Block hash, hexadecimal height, or latest |
type | string | Yes | Equals reads the specified block; Contains checks that the block is valid and canonical, then reads the latest state, otherwise returning an error; Values: "Equals", "Contains" |
| Field | Type | Description |
|---|---|---|
result | string | Storage slot value as a hexadecimal string |
curl https://api.chaintable.com/v1/leafage/1 \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getStorageAt",
"params": [
"0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"0x1",
{
"block_id": "latest",
"type": "Equals"
}
]
}'
{
"code": 0,
"message": "ok",
"data": {
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
}
contractMultiCall — Call contracts in a batch
contractMultiCall — Call contracts in a batch
contractMultiCallParametersparams: [calls, block_context?, block_overrides?, state_overrides?, fast_fail?, use_parallel?, disable_cache?]| Field | Type | Required | Description |
|---|---|---|---|
calls | object[] | Yes | Contract calls; one simulated call per entry |
block_context | object | No | State to read; defaults to the latest state |
block_overrides | object | No | Overrides for the simulated block environment |
state_overrides | object | No | Account state overrides keyed by EVM address |
fast_fail | boolean | No | Stop when any call fails |
use_parallel | boolean | No | Whether to execute calls in parallel |
disable_cache | boolean | No | Whether to bypass the cache |
Show calls — Item fields
Show calls — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
from | string / null | No | Simulated caller’s EVM address |
to | string / null | No | Target EVM address |
gas | string / null | No | Gas limit as a hexadecimal quantity |
gasPrice | string / null | No | Gas price as a hexadecimal quantity |
maxFeePerGas | string / null | No | Maximum fee per gas as a hexadecimal quantity |
maxPriorityFeePerGas | string / null | No | Maximum priority fee per gas as a hexadecimal quantity |
value | string / null | No | Native token value sent with the call, as a hexadecimal quantity in the smallest unit |
nonce | string / null | No | Nonce as a hexadecimal quantity |
data | string / null | No | Compatibility alias for input; prefer input |
input | string / null | No | Hexadecimal call data |
chainId | string / null | No | EIP-155 chain ID as a hexadecimal quantity |
maxFeePerBlobGas | string / null | No | Maximum fee per blob gas as a hexadecimal quantity |
accessList | object[] / null | No | Declared addresses and storage slots |
blobVersionedHashes | string[] | No | Array of blob versioned hashes |
blobs | string[] | No | Blob data as an array of hexadecimal byte strings |
commitments | string[] | No | Blob KZG commitments as hexadecimal byte strings |
proofs | string[] | No | Blob KZG proofs as hexadecimal byte strings |
Show accessList — Item fields
Show accessList — Item fields
| Field | Type | Required | Description |
|---|---|---|---|
address | string | Yes | EVM address |
storageKeys | string[] | Yes | Storage slots, each a 32-byte hexadecimal value |
Show block_context — Fields
Show block_context — Fields
| Field | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Block hash, hexadecimal height, or latest |
type | string | Yes | Equals reads the specified block; Contains checks that the block is valid and canonical, then reads the latest state, otherwise returning an error; Values: "Equals", "Contains" |
Show block_overrides — Fields
Show block_overrides — Fields
| Field | Type | Required | Description |
|---|---|---|---|
number | string / null | No | Overridden block height as a hexadecimal quantity |
difficulty | string / null | No | Overridden difficulty as a hexadecimal quantity; ignored for post-merge calls |
time | string / null | No | Overridden block time as a hexadecimal Unix-seconds quantity |
gasLimit | string / null | No | Overridden block gas limit as a hexadecimal quantity |
feeRecipient | string / null | No | Overridden fee recipient address |
prevRandao | string / null | No | Overridden randomness as a 32-byte hexadecimal value |
baseFeePerGas | string / null | No | Overridden base fee as a hexadecimal quantity |
blobBaseFee | string / null | No | Overridden blob base fee as a hexadecimal quantity |
Show state_overrides — Value fields
Show state_overrides — Value fields
| Field | Type | Required | Description |
|---|---|---|---|
balance | string / null | No | Overridden native token balance as a hexadecimal quantity in the smallest unit |
nonce | string / null | No | Nonce as a hexadecimal quantity |
code | string / null | No | Overridden contract bytecode as hexadecimal bytes |
movePrecompileToAddress | string / null | No | Address to which the precompile is moved |
state | object | No | Replace storage entirely; keys and values are 32-byte hexadecimal values |
stateDiff | object | No | Override only specified slots; keys and values are 32-byte hexadecimal values |
| Field | Type | Description |
|---|---|---|
result | object | Batch call results and execution details |
Show result — Fields
Show result — Fields
| Field | Type | Description |
|---|---|---|
results | object[] | Results in call order |
stats | object | Execution details for this batch |
Show results — Item fields
Show results — Item fields
| Field | Type | Description |
|---|---|---|
code | integer | Per-call status: 0 for success, a negative value for an upstream call failure |
err | string | Call error message; empty on success |
from_cache | boolean | Whether the result came from cache |
result | string | ABI-encoded return data as hexadecimal bytes |
gas_used | integer | Gas used |
time_cost | number | Per-call duration reported by the upstream |
Show stats — Fields
Show stats — Fields
| Field | Type | Description |
|---|---|---|
block_num | integer | Block height used for execution |
block_hash | string | Block hash used for execution |
block_time | integer | Timestamp of the block used, in Unix seconds |
success | boolean | Overall batch success status |
cache_enabled | boolean | Whether caching was enabled |
stats.success indicates the overall batch status. Within results, each item’s code is 0 on success or a negative value on upstream call failure.Requestcurl https://api.chaintable.com/v1/leafage/1 \
-H "AccessKey: $CHAINTABLE_ACCESS_KEY" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "contractMultiCall",
"params": [
[
{
"to": "0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"input": "0x18160ddd"
}
],
{
"block_id": "latest",
"type": "Equals"
}
]
}'
{
"code": 0,
"message": "ok",
"data": {
"jsonrpc": "2.0",
"id": 1,
"result": {
"results": [
{
"code": 0,
"err": "",
"from_cache": false,
"result": "0x00000000000000000000000000000000000000000000000000000000000f4240",
"gas_used": 2100,
"time_cost": 0.003
}
],
"stats": {
"block_num": 21000000,
"block_hash": "0x1111111111111111111111111111111111111111111111111111111111111111",
"block_time": 1788220800,
"success": true,
"cache_enabled": true
}
}
}
}
code. They appear in error.code or an individual batch call’s code.
| Upstream code | Meaning |
|---|---|
-32700, -32600, -32601, -32602 | Invalid JSON, invalid request object, unsupported method, invalid parameters |
-32603 | Internal node error |
-39000–-39004 | Contract revert, out of gas, insufficient balance, nonce error, other EVM execution failure |
-39005 | State data read failure |
-39006, -39007 | Block not found, invalid block ID |
-41000 | Queried block height exceeds the limit |
-41001, -41004 | Too many requests, gateway rate limit |
-41002, -41003 | Gateway timeout, method not allowed |