Querying Details About EVS Snapshots
Function
This API is used to query details about the EVS snapshots. Enterprise project authorization is supported.
URI
- Parameter description
Parameter
Mandatory
Description
project_id
Yes
Specifies the project ID.
For details about how to obtain the project ID, see Obtaining a Project ID.
- Request filter parameters
Parameter
Type
Mandatory
Description
offset
Integer
No
Specifies the offset.
NOTE:This parameter is used when snapshots are queried by page and is used together with the limit parameter. For example, there are a total of 30 snapshots. If you set offset to 11 and limit to 10, the queried snapshot starts from the twelfth snapshot, and at most 10 snapshots can be queried at a time.
limit
Integer
No
Specifies 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.
name
String
No
Specifies the snapshot name. The value can contain a maximum of 255 bytes.
status
String
No
Specifies the snapshot status. For details, see EVS Snapshot Status.
volume_id
String
No
Specifies the ID of the snapshot's source disk.
availability_zone
String
No
Specifies the AZ of the snapshot's source disk.
id
String
No
Specifies the snapshot ID for filtering.
dedicated_storage_name
String
No
Specifies the DSS resource name.
dedicated_storage_id
String
No
Specifies the DSS resource ID.
service_type
String
No
Specifies the service type.
The value can be EVS, DSS, or DESS.
If EVS is specified for service_type, dedicated_storage_name and dedicated_storage_id must be left blank.
enterprise_project_id
String
No
Specifies the enterprise project ID for filtering.
If input parameter all_granted_eps exists, disks in all enterprise projects that are within the permission scope will be queried.
NOTE:For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide.
Request
- Example request
GET https://{endpoint}/v2/{project_id}/cloudsnapshots/detail?status=available
Response
- Parameter description
Parameter
Type
Description
count
Integer
Specifies the total number of snapshots. The value is not affected by parameters limit and offset.
snapshots
Array of Objects
Specifies the snapshot information. For details, see Parameters in the snapshots field.
snapshots_links
Array of Objects
Specifies the query position marker in the snapshot list. This parameter is returned only when parameter limit is specified in the request, and this parameter indicates that only some snapshots are returned in this query. For details, see Description of the snapshots_links parameter.
error
Object
Specifies the error message returned when an error occurs. For details, see Parameters in the error field.
- Parameters in the snapshots field
Parameter
Type
Description
id
String
Specifies the snapshot ID.
status
String
Specifies the snapshot status. For details, see EVS Snapshot Status.
name
String
Specifies the snapshot name.
description
String
Specifies the snapshot description.
created_at
String
Specifies the time when the snapshot was created.
Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX
updated_at
String
Specifies the time when the snapshot was updated.
Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX
metadata
Object
Specifies the snapshot metadata.
If metadata contains the __system__enableActive field, the snapshot is automatically created during the backup of a server.
volume_id
String
Specifies the ID of the snapshot's source disk.
size
Integer
Specifies the snapshot size, in GB.
os-extended-snapshot-attributes:project_id
String
Specifies the tenant ID. The tenant ID is actually the project ID.
os-extended-snapshot-attributes:progress
String
Reserved field
dedicated_storage_name
String
Specifies the DSS resource name.
This field appears when dedicated storage is used.
dedicated_storage_id
String
Specifies the DSS resource ID.
This field appears when dedicated storage is used.
service_type
String
Specifies the service type.
- Parameter in the snapshots_links field
Parameter
Type
Description
href
String
Specifies the corresponding shortcut link.
rel
String
Specifies the shortcut link marker name.
- Parameters in the error field
Parameter
Type
Description
message
String
Specifies the error message returned when an error occurs.
code
String
Specifies the error code returned when an error occurs.
For details about the error code, see Error Codes.
- Example response
{ "count": 3, "snapshots_links": [ { "href": "https://172.28.9.185:8776/v2/20a68d6b7a124ae2b6b8a22046ee5966/snapshots/detail?limit=1&marker=fc05d5d7-7e99-42fb-b6f2-9ddd1b990e67", "rel": "next" } ], "snapshots": [ { "status": "available", "description": null, "updated_at": "2018-06-06T10:58:47.349051", "volume_id": "f687bd70-37b3-4f00-a900-0ba1cfaa5196", "id": "fc05d5d7-7e99-42fb-b6f2-9ddd1b990e67", "size": 1, "os-extended-snapshot-attributes:progress": "100%", "name": "test03", "os-extended-snapshot-attributes:project_id": "20a68d6b7a124ae2b6b8a22046ee5966", "service_type": "EVS", "created_at": "2018-05-30T03:14:44.457975", "metadata": { } } ] }or
{ "error": { "message": "XXXX", "code": "XXX" } }In the preceding example, error indicates a general error, for example, badRequest or itemNotFound. An example is provided as follows:
{ "badRequest": { "message": "XXXX", "code": "XXX" } }
Error Codes
For details, see Error Codes.
Last Article: Rolling Back a Snapshot to an EVS Disk
Next Article: Rolling Back a Snapshot to an EVS Disk (Deprecated)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.