Query database details¶
Query database details by ID.
POST $CLOUDSIGMA_API_BASE/catalog/database/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. First query the database list to obtain the target database ID. Prepare the personal access token, target workspace ID, and database ID that can access the target workspace.
Request body¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/database/info" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": '"$DATABASE_ID"'
}'
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Database ID. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"database": {
"id": 2,
"name": "orders",
"display_name": "orders",
"description": "订单库",
"display_description": "订单库"
}
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
integer |
Database ID. |
|
string |
Database original name. |
|
string |
Database description. |
|
string |
Database display name. Returned if there is a value. |
|
string |
Database display instructions. Returned if there is a value. |
Error response¶
{
"code": "ErrObjectNotFound",
"msg": "数据库不存在"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |