Query volume details

Query root volume details by ID.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/volume/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 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

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/volume/info" \
  -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

id

string

Yes

Volume ID.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "volume": {
      "id": 789,
      "name": "sales_files",
      "display_name": "销售文件",
      "description": "销售文件",
      "display_description": "销售文件"
    }
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.volume.id

integer

Volume ID.

data.volume.name

string

Volume name.

data.volume.display_name

string

Volume display name. May be omitted if not provided.

data.volume.description

string

Volume description. May be omitted if not provided.

data.volume.display_description

string

Volume display description. May be omitted if not provided.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "id 无效"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on