Query database table leaf nodes¶
Paged query specifies the tables directly contained in the database.
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¶
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 |
|---|---|---|---|
|
integer |
Yes |
Database ID, must be a positive integer. |
|
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. |
|
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. |
|
string |
No |
Matches names that contain the search text after removing leading and trailing whitespace. Not case sensitive. |
Successful response¶
{
"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 |
|---|---|---|
|
string |
|
|
string |
|
|
array of object |
Current page table list. |
|
integer |
The total number of matching tables. |
|
string |
Optional. Next page pagination mark. This field may be omitted when there is no next page. |
|
integer |
Table ID. |
|
string |
Table name. |
|
integer |
The database ID to which it belongs. |
|
string |
Creation time. |
|
string |
Update time. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |