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 a Project ID and Name. |
cluster_id | Yes | String | ID of the cluster, to which the snapshot to be queried belongs. |
Request¶
None
Response¶
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 | Indicates 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 | integer | Timestamp when the snapshot starts to be executed. |
endTime | integer | Timestamp when the snapshot execution ends. |
bucketName | String | Bucket for storing snapshot data. |
Parameter | Type | Description |
---|---|---|
type | String | Supported type: elasticsearch |
version | String | Engine version number. |
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": "*.*.*"
},
"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": "6.2.3",
"restoreStatus": "success",
"startTime": 1520408087099,
"endTime": 1520408412219,
"bucketName": "obs-b8ed"
},
{
"created": "2018-03-06T15:42:37",
"datastore": {
"type": "elasticsearch",
"version": "6.2.3"
},
"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": "6.2.3",
"restoreStatus": "none",
"startTime": 1520350957275,
"endTime": 1520351284357,
"bucketName": "obs-b8ed"
}
]
}
Status Code¶
Table 5 describes the status code.
Status Code | Message | Description |
---|---|---|
200 | OK | The request is processed successfully. |
406 | Not Acceptable | The server cannot fulfill the request according to the content characteristics of the request. |