Query database list

Returns a list of readable databases under the specified Catalog.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/database/list

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 catalog list to obtain the target catalog ID. Prepare the personal access token, target workspace ID, and Catalog ID that can access the target workspace.

Request body

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/database/list" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "id": '"$CATALOG_ID"'
  }'

Field

Type

Required

Description

id

integer

Yes

Catalog ID。

include_stats

boolean

No

Whether to load statistics. Omitted or null Defaults to true.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "list": [
      {
        "id": 2,
        "name": "orders",
        "description": "订单库",
        "volume_count": 1,
        "table_count": 3,
        "created_at": "2026-08-18T10:00:00Z",
        "updated_at": "2026-08-18T10:00:00Z",
        "created_by": "user-001",
        "updated_by": "user-001",
        "reserved": false,
        "allowed_actions": [
          "database.read"
        ]
      }
    ]
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.list

array of object

Database list. An empty array when there is no readable database.

data.list[].id

integer

Database ID.

data.list[].name

string

Database name.

data.list[].description

string

Database description.

data.list[].display_name

string

Database display name. Returned if there is a value.

data.list[].display_description

string

Database display instructions. Returned if there is a value.

data.list[].volume_count

integer

Number of subordinate volumes.

data.list[].table_count

integer

Number of subordinate tables.

data.list[].created_at

string

Creation time.

data.list[].updated_at

string

Update time.

data.list[].created_by

string

Creator ID.

data.list[].updated_by

string

Updater ID.

data.list[].reserved

boolean

Whether to retain the database.

data.list[].is_pub

boolean

Whether it is a published database.

data.list[].is_sub

boolean

Whether the database is subscribed.

data.list[].allowed_actions

array of string

Operations allowed by the current identity.

Error response

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

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on