View database list

List the databases you have access to. Use a name in the response to view the tables and views in that database.

HTTP
POST $CLOUDSIGMA_API_BASE/meta/db/info

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

The returned results only include databases accessible by the current identity.

The example below uses $CLOUDSIGMA_API_KEY as X-API-Key and $WORKSPACE_ID as X-Workspace-ID.

Request

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/meta/db/info" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Request body

This interface does not require a request body.

Successful response

JSON
{
  "code": 200,
  "data": {
    "result": [
      {
        "db_name": "sales",
        "display_name": "销售数据"
      }
    ],
    "total": 1
  }
}

The response fields are as follows.

Field

Type

Description

code

integer

200 on success.

data.result

array

List of databases that can be read by the current access credentials.

data.result[].db_name

string

Database name.

data.result[].display_name

string

Display name; can be omitted if not set.

data.result[].db_owner

string

Database owner; currently returned may be an empty string.

data.result[].is_internal

boolean

Whether it is a built-in database in the system.

data.result[].is_subscription

boolean

Whether it is a subscription database.

data.result[].has_published

boolean

Whether to contain published data.

data.result[].tables

object

Table metadata object.

data.result[].views

object

View metadata object.

data.total

integer

Number of databases in result.

In field paths, [] denotes each item in an array. For example, items[].name is the name field of each item in the items array.

After getting the database name from data.result[].db_name, use Query table in database to continue viewing the object.

Error response

JSON
{
  "code": 503,
  "message": "服务暂不可用"
}
FieldTypeDescription
codeinteger or stringError code or status.
messagestringError message.

Follow-up operations

Save the identification of the target item, and then query table information.

Last updated on