View database list

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

HTTP
POST $CLOUDSIGMA_API_BASE/meta/db/info

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

Request parameters

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

This call has no request body, path parameters, or query parameters.

Successful response

JSON
{
  "code": 200,
  "data": {
    "result": [
      {
        "db_name": "sales",
        "is_internal": false,
        "is_subscription": false,
        "has_published": false,
        "tables": {
          "tables": null,
          "total": 0
        },
        "views": {
          "tables": null,
          "total": 0
        }
      }
    ],
    "total": 1
  }
}

Field

Type

Description

code

integer

200 when the request is processed successfully.

data

object

response data.

data.result

array of object

List of databases readable by the current identity.

data.result[].db_name

string

Database name.

data.result[].display_name

string

This field is not populated for the current list and is omitted from the response.

data.result[].is_internal

boolean

Whether it is an internal database.

data.result[].is_subscription

boolean

Currently returns false placeholder, not used to determine subscription.

data.result[].has_published

boolean

Currently returns false placeholder and is not used to determine release.

data.result[].tables

object

Table list container or list. This call does not load details.

data.result[].tables.tables

array of object

Table list container or list. This call does not load details.

data.result[].tables.tables[].name

string

Name.

data.result[].tables.tables[].owner

string

owner. This call does not populate.

data.result[].tables.tables[].created

string

Creation time. This call does not populate.

data.result[].tables.tables[].rows

integer

Number of rows. This call uses the 0 placeholder.

data.result[].tables.tables[].size

integer

size. This call uses the 0 placeholder.

data.result[].tables.total

integer

The total number of records that meet the criteria.

data.result[].views

object

View list container. This call does not load details.

data.result[].views.tables

array of object

Table list container or list. This call does not load details.

data.result[].views.tables[].name

string

Name.

data.result[].views.tables[].owner

string

owner. This call does not populate.

data.result[].views.tables[].created

string

Creation time. This call does not populate.

data.result[].views.tables[].rows

integer

Number of rows. This call uses the 0 placeholder.

data.result[].views.tables[].size

integer

size. This call uses the 0 placeholder.

data.result[].views.total

integer

The total number of records that meet the criteria.

data.total

integer

The number of databases returned.

Error response

JSON
{
  "code": 503,
  "message": "服务暂不可用"
}

Field

Type

Description

code

integer

Error status code.

message

string

error message.

Last updated on