Querying the List of Snapshots
Function
This API is used to query all snapshots of a cluster.
URI
GET /v1.0/{project_id}/clusters/{cluster_id}/index_snapshots
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details, see Obtaining the Project ID and Account ID. |
|
cluster_id |
Yes |
String |
ID of the cluster, to which the snapshot to be queried belongs. |
Request
None
Response
|
Parameter |
Type |
Description |
|---|---|---|
|
backups |
Array of backup objects |
Snapshot list. For details, see Querying the List of Snapshots. |
|
Parameter |
Type |
Description |
|---|---|---|
|
created |
String |
Time when a snapshot is created. |
|
datastore |
Object |
Type of the data search engine. For details, see Table 4. |
|
description |
String |
Description of the snapshot. |
|
id |
String |
ID of the snapshot. |
|
clusterId |
String |
Cluster ID. |
|
clusterName |
String |
Cluster name. |
|
name |
String |
Snapshot name. |
|
status |
String |
Snapshot status. |
|
updated |
String |
Whether the snapshot status is updated. |
|
backupType |
String |
Value 0 indicates that automatic snapshot creation is enabled. Value 1 indicates that you need to manually create the snapshot. |
|
backupMethod |
String |
Snapshot creation mode. |
|
backupExpectedStartTime |
String |
Time when the snapshot starts to be executed. |
|
backupKeepDay |
Integer |
Snapshot retention period. |
|
backupPeriod |
String |
Time when a snapshot is executed every day. |
|
indices |
String |
Indices that need to be backed up. |
|
totalShards |
Integer |
Total number of shards of the indices to be backed up. |
|
failedShards |
Integer |
Number of shards that fail to be backed up. |
|
version |
String |
Version of the snapshot. |
|
restoreStatus |
String |
Snapshot restoration status. |
|
startTime |
String |
Timestamp when the snapshot starts to be executed. |
|
endTime |
String |
Timestamp when the snapshot execution ends. |
|
bucketName |
String |
Bucket for storing snapshot data. |
Examples
Example request
GET /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters/ea244205-d641-45d9-9dcb-ab2236bcd07e/index_snapshots
Example response
{
"backups": [
{
"created": "2018-03-07T07:34:47",
"datastore": {
"type": "elasticsearch",
"version": "5.5.1"
},
"description": "",
"id": "e29d99c1-3d19-4ea4-ae8d-f252df76cbe9",
"clusterId": "37cb1075-c38e-4cd8-81df-442d52df3786",
"clusterName": "Es-xfx",
"name": "snapshot-002",
"status": "COMPLETED",
"updated": "2018-03-07T07:40:12",
"backupType": "1",
"backupMethod": "manual",
"backupExpectedStartTime": null,
"backupKeepDay": null,
"backupPeriod": null,
"indices": ".kibana,website2",
"totalShards": 6,
"failedShards": 0,
"version": "5.5.1",
"restoreStatus": "success",
"startTime": 1520408087099,
"endTime": 1520408412219,
"bucketName": "obs-b8ed"
},
{
"created": "2018-03-06T15:42:37",
"datastore": {
"type": "elasticsearch",
"version": "5.5.1"
},
"description": "",
"id": "29a2254e-947f-4463-b65a-5f0b17515fae",
"clusterId": "37cb1075-c38e-4cd8-81df-442d52df3786",
"clusterName": "Es-xfx",
"name": "snapshot-001",
"status": "COMPLETED",
"updated": "2018-03-06T15:48:04",
"backupType": "1",
"backupMethod": "manual",
"backupExpectedStartTime": null,
"backupKeepDay": null,
"backupPeriod": null,
"indices": ".kibana",
"totalShards": 1,
"failedShards": 0,
"version": "5.5.1",
"restoreStatus": "none",
"startTime": 1520350957275,
"endTime": 1520351284357,
"bucketName": "obs-b8ed"
}
]
}
Status Code
Table 5 describes the status code.
Last Article: Manually Creating a Snapshot
Next Article: Restoring a Snapshot
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.