Query the full path of the volume¶
Get the hierarchical path consisting of the target volume and its superior volumes. This path does not include catalog and database hierarchies.
POST $CLOUDSIGMA_API_BASE/catalog/volume/full_path
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 object in the database to obtain the target volume ID. Prepare the personal access token, target workspace ID, and volume ID that can access the target workspace.
Request body¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/volume/full_path" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": '"$VOLUME_ID"'
}'
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Volume ID. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"path": "sales/catalog_a/db_a/sales_files"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
string |
Volume level name path. Names may be localized. The maximum traceback level is 100, and will be truncated when exceeded. Please use the volume ID for positioning and permission determination. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "id 无效"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |