Querying Details About All EVS Disks
Function
This API is used to query details about all EVS disks.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/volumes/detail
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
The project ID. For details, see Obtaining a Project ID. |
|
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. |
|
name |
No |
String |
The disk name. You can enter up to 85 characters. |
|
limit |
No |
Integer |
The maximum number of query results that can be returned. The value ranges from 1 to 1000, and the default value is 1000. The returned value cannot exceed this limit. If you have more than 50 disks in total, use this parameter and set it to 50 to improve the query efficiency. Examples are provided as follows: Querying 1–50 disks: GET /v2/xxx/volumes/detail?limit=50 Querying 51–100 disks: GET /v2/xxx/volumes/detail?offset=50&limit=50 |
|
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. |
|
sort_dir |
No |
String |
The result sorting order. The default value is desc. desc: the descending order asc: the ascending order |
|
offset |
No |
Integer |
The query offset. All disks after this offset will be queried. The value must be an integer greater than 0 but less than the number of disks. |
|
status |
No |
String |
The disk status. For details, see EVS Disk Status. |
|
metadata |
No |
String |
The disk metadata. This parameter is transferred in JSON format, for example, GET /v2/{project_id}/volumes/detail?metadata={"hw:passthrough": "true"}. |
|
availability_zone |
No |
String |
The AZ information. |
|
snapshot_policy_id |
No |
String |
The ID of the snapshot policy applied to the disk. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
The user token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
volumes |
Array of VolumeDetail objects |
Definition The list of returned disks. Range N/A |
|
volumes_links |
Array of Link objects |
Definition The query position marker in the disk list. If only some disks are returned in this query, the URL of the last disk queried is returned. You can use this URL to continue to query the remaining disks in the next query. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition The disk ID. Range N/A |
|
links |
Array of Link objects |
Definition The disk URI. Range N/A |
|
name |
String |
Definition The disk name. Range N/A |
|
status |
String |
Definition The disk status. For details, see EVS Disk Status. Range N/A |
|
attachments |
Array of VolumeAttachment objects |
Definition Whether the disk is attached. Range N/A |
|
availability_zone |
String |
Definition The AZ to which the disk belongs. Range N/A |
|
disaster_recovery_azs |
Array of strings |
Definition The AZs to which the DR disk belongs. Range N/A |
|
source_volid |
String |
Definition The source disk ID. This parameter has a value if the disk is created from a source disk. This field is currently not supported. Range N/A |
|
snapshot_id |
String |
Definition The snapshot ID. This parameter has a value if the disk is created from a snapshot. Range N/A |
|
description |
String |
Definition The disk description. Range N/A |
|
bootable |
String |
Definition Whether the disk is bootable. Range
|
|
encrypted |
Boolean |
Definition This field is currently not supported. Range N/A |
|
created_at |
String |
Definition The time when the disk was created. Range Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
|
volume_type |
String |
Definition The disk type. Range The value can be SATA, SAS, GPSSD, SSD, ESSD, GPSSD2, or ESSD2.
|
|
replication_status |
String |
Definition The reserved field. Range N/A |
|
consistencygroup_id |
String |
Definition The reserved field. Range N/A |
|
metadata |
VolumeMetadata object |
Definition The disk metadata. If metadata does not contain the hw:passthrough field, the disk device type is VBD. If metadata does not contain the __system__encrypted field, the disk is unencrypted. Range N/A |
|
size |
Integer |
Definition The disk capacity, in GiB. Range N/A |
|
user_id |
String |
Definition The reserved field. Range N/A |
|
updated_at |
String |
Definition The time when the disk was updated. Range Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
|
shareable |
Boolean |
Definition Whether the disk is shareable. Note: This field has been deprecated. Use multiattach. Range N/A |
|
multiattach |
Boolean |
Definition Whether the disk is shareable. Range
|
|
os-vol-tenant-attr:tenant_id |
String |
Definition The ID of the project to which the disk belongs. Range N/A |
|
volume_image_metadata |
Object |
Definition The metadata of the disk image. Range For details about the volume_image_metadata field, see Querying Image Details (Native OpenStack API V2, Deprecated). |
|
os-vol-host-attr:host |
String |
Definition The reserved field. Range N/A |
|
os-volume-replication:extended_status |
String |
Definition The reserved field. Range N/A |
|
os-vol-mig-status-attr:migstat |
String |
Definition The reserved field. Range N/A |
|
os-vol-mig-status-attr:name_id |
String |
Definition The reserved field. Range N/A |
|
iops |
iops object |
Definition The disk IOPS information. This parameter is returned only for a general purpose SSD V2 or an extreme SSD V2 disk. Range N/A |
|
throughput |
throughput object |
Definition The disk throughput information. This parameter is returned only for a general purpose SSD V2 disk. Range N/A |
|
snapshot_policy_id |
String |
Definition The ID of the snapshot policy applied to the disk. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
attached_at |
String |
Definition The time when the disk was attached. Range Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
|
attachment_id |
String |
Definition The attachment ID. Range N/A |
|
device |
String |
Definition The device name. Range N/A |
|
host_name |
String |
Definition The name of the physical host housing the cloud server to which the disk is attached. Range N/A |
|
id |
String |
Definition The ID of the attached resource. Range N/A |
|
server_id |
String |
Definition The ID of the server to which the disk is attached. Range N/A |
|
volume_id |
String |
Definition The disk ID. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
__system__cmkid |
String |
Definition The encryption CMK ID in metadata. This parameter is used together with __system__encrypted for encryption. The length of cmkid is fixed at 36 bytes. Range Use an HTTPS request to obtain the key ID. For details, see Querying the Key List. |
|
__system__encrypted |
String |
Definition The encryption field in metadata. If this parameter does not appear, the disk is unencrypted. Range
|
|
hw:passthrough |
String |
Definition The parameter that describes the disk device type in metadata. If this parameter does not appear, the disk device type is VBD. Range
|
|
Parameter |
Type |
Description |
|---|---|---|
|
frozened |
Boolean |
Definition The frozen tag. Range N/A |
|
id |
String |
Definition The identifier of the disk IOPS. Range N/A |
|
total_val |
Integer |
Definition The IOPS size. Range N/A |
|
volume_id |
String |
Definition The disk ID. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
frozened |
Boolean |
Definition The frozen tag. Range N/A |
|
id |
String |
Definition The throughput identifier. Range N/A |
|
total_val |
Integer |
Definition The throughput size. Range N/A |
|
volume_id |
String |
Definition The disk ID. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
href |
String |
Definition The corresponding shortcut link. Range N/A |
|
rel |
String |
Definition The shortcut link marker name. Range N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Definition The error information returned if an error occurs. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition The error code returned if an error occurs. Range For details about the error code, see Error Codes. |
|
message |
String |
Definition The error message returned if an error occurs. Range N/A |
Example Requests
GET https://{endpoint}/v2/{project_id}/volumes/detail
Example Responses
Status code: 200
OK
{
"volumes" : [ {
"attachments" : [ ],
"availability_zone" : "az-dc-1",
"bootable" : "false",
"created_at" : "2016-05-25T02:42:10.856332",
"encrypted" : false,
"id" : "b104b8db-170d-441b-897a-3c8ba9c5a214",
"links" : [ {
"href" : "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/b104b8db-170d-441b-897a-3c8ba9c5a214",
"rel" : "self"
}, {
"href" : "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/b104b8db-170d-441b-897a-3c8ba9c5a214",
"rel" : "bookmark"
} ],
"metadata" : { },
"name" : "zjb_u25_test",
"os-vol-host-attr:host" : "pod01.xxx#SATA",
"volume_image_metadata" : { },
"os-vol-tenant-attr:tenant_id" : "dd14c6ac581f40059e27f5320b60bf2f",
"replication_status" : "disabled",
"multiattach" : false,
"size" : 1,
"status" : "available",
"updated_at" : "2016-05-25T02:42:22.341984",
"user_id" : "b0524e8342084ef5b74f158f78fc3049",
"volume_type" : "SATA",
"consistencygroup_id" : null,
"os-vol-mig-status-attr:migstat" : null,
"os-vol-mig-status-attr:name_id" : null,
"snapshot_id" : null,
"source_volid" : null
} ],
"volumes_links" : [ {
"href" : "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/detail?limit=1&marker=b104b8db-170d-441b-897a-3c8ba9c5a214",
"rel" : "next"
} ]
}
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot