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.
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¶
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¶
{
"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 |
|---|---|---|
|
integer |
|
|
object |
response data. |
|
array of object |
List of databases readable by the current identity. |
|
string |
Database name. |
|
string |
This field is not populated for the current list and is omitted from the response. |
|
boolean |
Whether it is an internal database. |
|
boolean |
Currently returns false placeholder, not used to determine subscription. |
|
boolean |
Currently returns false placeholder and is not used to determine release. |
|
object |
Table list container or list. This call does not load details. |
|
array of object |
Table list container or list. This call does not load details. |
|
string |
Name. |
|
string |
owner. This call does not populate. |
|
string |
Creation time. This call does not populate. |
|
integer |
Number of rows. This call uses the 0 placeholder. |
|
integer |
size. This call uses the 0 placeholder. |
|
integer |
The total number of records that meet the criteria. |
|
object |
View list container. This call does not load details. |
|
array of object |
Table list container or list. This call does not load details. |
|
string |
Name. |
|
string |
owner. This call does not populate. |
|
string |
Creation time. This call does not populate. |
|
integer |
Number of rows. This call uses the 0 placeholder. |
|
integer |
size. This call uses the 0 placeholder. |
|
integer |
The total number of records that meet the criteria. |
|
integer |
The number of databases returned. |
Error response¶
{
"code": 503,
"message": "服务暂不可用"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
Error status code. |
|
string |
error message. |