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.
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¶
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¶
{
"code": 200,
"data": {
"result": [
{
"db_name": "sales",
"display_name": "销售数据"
}
],
"total": 1
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
array |
List of databases that can be read by the current access credentials. |
|
string |
Database name. |
|
string |
Display name; can be omitted if not set. |
|
string |
Database owner; currently returned may be an empty string. |
|
boolean |
Whether it is a built-in database in the system. |
|
boolean |
Whether it is a subscription database. |
|
boolean |
Whether to contain published data. |
|
object |
Table metadata object. |
|
object |
View metadata object. |
|
integer |
Number of databases in |
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¶
{
"code": 503,
"message": "服务暂不可用"
}
| Field | Type | Description |
|---|---|---|
code | integer or string | Error code or status. |
message | string | Error message. |
Follow-up operations¶
Save the identification of the target item, and then query table information.