Query database table leaf nodes

Paged query specifies the tables directly contained in the database.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/database/table-leaves

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the database list to obtain the database ID. Prepare the personal access token, target workspace ID, and database ID that can access the target workspace.

Request body

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/database/table-leaves" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "database_id": '"$DATABASE_ID"',
    "page_size": 20
  }'

Field

Type

Required

Description

database_id

integer

Yes

Database ID, must be a positive integer.

page_size

integer

No

Number of items per page. Use 50 when it is less than or equal to 0, and use 100 when it is greater than 100.

page_token

string

No

Offset as a decimal string. After removing leading and trailing whitespace, it is parsed into a non-negative integer. The first call can be omitted, and the returned next_page_token will be used later.

search

string

No

Matches names that contain the search text after removing leading and trailing whitespace. Not case sensitive.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "items": [
      {
        "table_id": 101,
        "table_name": "orders",
        "database_id": 10,
        "created_at": "2026-08-01T09:00:00Z",
        "updated_at": "2026-08-01T09:00:00Z"
      }
    ],
    "total": 1
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.items

array of object

Current page table list.

data.total

integer

The total number of matching tables.

data.next_page_token

string

Optional. Next page pagination mark. This field may be omitted when there is no next page.

data.items[].table_id

integer

Table ID.

data.items[].table_name

string

Table name.

data.items[].database_id

integer

The database ID to which it belongs.

data.items[].created_at

string

Creation time.

data.items[].updated_at

string

Update time.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on