Updated on 2023-06-20 GMT+08:00

Manually Creating a Snapshot

Function

This API is used to manually create a snapshot.

URI

POST /v1.0/{project_id}/clusters/{cluster_id}/index_snapshot

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

cluster_id

Yes

String

ID of the cluster for which you want to create a snapshot.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Snapshot name. Enter 4 to 64 characters. Lowercase letters, digits, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

description

No

String

Snapshot description. The value can contain up to 256 characters and cannot contain the following characters: !<>=&"'

indices

No

String

Name of an index to be backed up. Multiple indexes are separated by commas (,). By default, all indexes are backed up. You can use \ * to match multiple indexes. For example, if you specify 2018-06*, then the data of the indexes with the prefix 2018-06 will be backed up.The value can contain 0 to 1,024 characters. Uppercase letters, spaces, and the following special characters are not allowed: "\<|>/?

Response Parameters

Status code: 201

Table 3 Response body parameters

Parameter

Type

Description

backup

backupRsp object

Snapshot information.

Table 4 backupRsp

Parameter

Type

Description

id

String

Snapshot ID

name

String

Snapshot name

Example Requests

{
  "name" : "snapshot_001",
  "indices" : "myindex1myindex2"
}

Example Responses

Status code: 201

Resource created.

{
  "backup" : {
    "id" : "9dc4f5c9-33c0-45c7-9378-ae35ae350682",
    "name" : "snapshot_101"
  }
}

Status Codes

Status Code

Description

201

Resource created.

400

Invalid request.

Modify the request before retry.

403

Request rejected.The server has received and understood the request, but refused to respond to it. The client should modify the request before retry.

406

The server could not fulfill the request according to the content characteristics of the request.

500

The server has received the request but could not understand it.

501

The server does not support the function required to fulfill the request.

Error Codes

See Error Codes.