Help Center/ Elastic Volume Service/ API Reference/ API/ Disk Management/ Querying EVS Disks (Deprecated)
Updated on 2024-02-27 GMT+08:00

Querying EVS Disks (Deprecated)

Function

This API is used to query all EVS disks. This API has been deprecated. Use another API.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/cloudvolumes

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

The project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

marker

No

String

The ID of the last record on the previous page. The returned value is the value of the item after this one. The ID of the last record on the previous page. The returned value is the value of the item after this one.

name

No

String

The disk name.

status

No

String

The disk status.

limit

No

Integer

The maximum number of query results that can be returned. The default value is 1000.

Default: 1000

availability_zone

No

String

The AZ information.

sort_key

No

String

The keyword based on which the returned results are sorted. The value can be id, status, size, or created_at, and the default value is created_at.

Default: created_at

Enumeration values:

  • id

  • status

  • size

  • created_at

sort_dir

No

String

The result sorting order. The value can be desc (descending order) or asc (ascending order), and the default value is desc.

Default: desc

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

A token obtained from IAM is valid for 24 hours. When using a token for authentication, cache it to avoid frequently calling the API.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

volumes

Array of DiskSummary objects

The list of returned disks.

Table 5 DiskSummary

Parameter

Type

Description

id

String

The disk ID.

links

Array of Link objects

The disk URI.

name

String

The disk name. You can enter up to 85 characters.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error

Error object

The error message returned if an error occurs. For details, seeParameters in the error field.

Table 8 Error

Parameter

Type

Description

code

String

The error code returned if an error occurs. For the error codes and their meanings, see Error Codes.

message

String

The error message returned if an error occurs.

Example Requests

None

Example Responses

Status code: 200

OK

{
  "volumes" : [ {
    "id" : "e6cf4401-15f6-44bd-ae2b-cff4dc9523e6",
    "links" : [ {
      "href" : "https://volume.az0.dc1.domainname.com/v2/cd631140887d4b6e9c786b67a6dd4c02/volumes/e6cf4401-15f6-44bd-ae2b-cff4dc9523e6",
      "rel" : "self"
    }, {
      "href" : "https://volume.az0.dc1.domainname.com/cd631140887d4b6e9c786b67a6dd4c02/volumes/e6cf4401-15f6-44bd-ae2b-cff4dc9523e6",
      "rel" : "bookmark"
    } ],
    "name" : "hallo5"
  }, {
    "id" : "4c5e8203-f70e-4717-90cd-4a8f636888d1",
    "links" : [ {
      "href" : "https://volume.az0.dc1.domainname.com/v2/cd631140887d4b6e9c786b67a6dd4c02/volumes/4c5e8203-f70e-4717-90cd-4a8f636888d1",
      "rel" : "self"
    }, {
      "href" : "https://volume.az0.dc1.domainname.com/cd631140887d4b6e9c786b67a6dd4c02/volumes/4c5e8203-f70e-4717-90cd-4a8f636888d1",
      "rel" : "bookmark"
    } ],
    "name" : "hallo4"
  } ]
}

Status code: 400

Bad Request

{
  "error" : {
    "message" : "XXXX",
    "code" : "XXX"
  }
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

Error Codes

See Error Codes.