DescribeSnapshots
1. API Description
This API is used to query the details of snapshots.
2. Input Parameters
The following request parameter list only provides API request parameters.
snapshotIds
No
Array of String
Filter by the list of snapshot IDs.
zoneId
No
String
Availability zone ID to which the snapshot belongs.
diskIds
No
Array of String
Filter by the list of disk IDs to which the snapshot belongs.
snapshotName
No
String
Filter by the snapshot name.
This field supports fuzzy search.
pageSize
No
Integer
Number of items in the current page result.
Default: 20.
pageNum
No
Integer
Number of pages returned.
resourceGroupId
No
String
Filter by resource group ID.
3. Output Parameters
requestId
String
The unique request ID,
which is returned for each request. RequestId is required for locating a problem.
totalCount
Integer
The total number of snapshots that meet the filtering conditions.
4. Code Example
Query the list of snapshots.
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeSnapshots
<Common Request Params>
Request:
{
"snapshotIds": ["snapshotId1","snapshotId2"],
"zoneId": "asia-east-1a",
"status": "AVAILABLE",
"snapshotName": "snapshot-state",
"pageSize": 20,
"pageNum": 1
}
Response:
{
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
"response": {
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
"totalCount": 1,
"dataSet": [
{
"snapshotId": "<snapshotId>",
"snapshotName": "snapshotName",
"zoneId": "asia-east-1a",
"status": "AVAILABLE",
"diskId": "<diskId>",
"createTime": "2025-07-02T09:51:00Z",
"resourceGroupId": "0a253bb0-eb7d-4328-84ec-fc8d1487b31a",
"resourceGroupName": "Default Resource Group",
}
]
}
}
5. Developer Resources
Zenlayer Cloud API 2.0 SDKs to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
HTTP Status Code
Error Code
Description
Last updated