Browse catalogs, databases, volumes and tables

Returns hierarchical navigation data of catalogs, databases, volumes, and tables accessible in the current workspace.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/tree

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. Prepare a personal access token and target workspace ID that can access the target workspace.

Request body

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/tree" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "include_table_leaves": true
  }'

Field

Type

Required

Description

include_table_leaves

boolean

No

Whether to include table leaf nodes in the tree. If omitted or null, the default is true.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "tree": [
      {
        "id": "1",
        "type": "catalog",
        "name": "sales",
        "display_name": "sales",
        "description": "销售数据",
        "reserved": false,
        "node_list": [
          {
            "id": "2",
            "type": "database",
            "name": "orders",
            "description": "",
            "reserved": false,
            "node_list": []
          }
        ],
        "allowed_actions": ["catalog.read"]
      }
    ]
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.tree

array of object

List of root nodes. An empty array when there are no readable resources.

data.tree[].id

string

Node ID.

data.tree[].type

string

Node type: catalog, database, volume or table.

data.tree[].name

string

Node name.

data.tree[].display_name

string

Node display name. Returned if there is a value.

data.tree[].description

string

Node description.

data.tree[].display_description

string

Node display description. Returned if there is a value.

data.tree[].reserved

boolean

Whether it is a reserved node.

data.tree[].is_pub

boolean

Whether it is a publishing node. Return when applicable.

data.tree[].is_sub

boolean

Whether it is a subscribing node. Return when applicable.

data.tree[].node_list

array of object

Child nodes have the same fields as the parent node.

data.tree[].allowed_actions

array of string

The operations that the current identity can perform on this node.

data.tree[].trigger_binding

object

Binding information of volumes and workflow triggers. Returned if there is a value.

data.tree[].trigger_binding.bound

boolean

Whether trigger binding exists.

data.tree[].trigger_binding.trigger_id

string

Trigger ID.

data.tree[].trigger_binding.workflow_id

string

Associate workflow ID.

data.tree[].trigger_binding.workflow_name

string

Associated workflow name.

data.tree[].trigger_binding.workflow_version_id

string

Associated workflow version ID.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "Bad Request"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on