Description
You can call this operation to query snapshots of a specified cluster.
Call description
Prerequisite
You have the read and write permissions on the specified cluster.
Request path
GET /api/v2/ob/clusters/{id}/performance/workload/snapshots
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1 | The ID of the cluster for which you want to query snapshots. |
| snapshotId | Long | No | 123 | The ID of the start snapshot. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | - |
| ├─ contents | Array | - |
| ├─ snapshotId | Long | The snapshot ID. |
| ├─ snapshotTime | String | The time when the snapshot was generated. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Examples
Sample request
GET /api/v2/ob/clusters/1/performance/workload/snapshots
Sample response
{
"data": {
"contents": [{
"snapshotId": 1399,
"snapshotTime": "2022-10-01T00:01:00.214Z"
}, {
"snapshotId": 3801,
"snapshotTime": "2023-01-12T10:01:00.72Z"
}, {
"snapshotId": 3802,
"snapshotTime": "2023-01-12T11:01:00.696Z"
}]
},
"duration": 35,
"server": "xxx.xxx.xxx.xxx",
"status": 200,
"successful": true,
"timestamp": "2023-01-12T19:24:59.494+08:00",
"traceId": "5a8a92acb9f84ea2"
}