Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: zhengxiu <zhengxiu@huawei.com> Co-committed-by: zhengxiu <zhengxiu@huawei.com>
20 KiB
Restoring a Snapshot
Function
This API is used to manually restore a snapshot.
Calling Method
For details, see Calling APIs.
URI
POST /v1.0/{project_id}/clusters/{cluster_id}/index_snapshot/{snapshot_id}/restore
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name. Constraints: N/A Value range: Project ID of the account. Default value: N/A |
cluster_id |
Yes |
String |
Definition: ID of the cluster whose snapshot you want to restore. For details about how to obtain the cluster ID, see Obtaining the Cluster ID. Constraints: N/A Value range: Cluster ID. Default value: N/A |
snapshot_id |
Yes |
String |
Definition: Snapshot ID. Constraints: N/A Value range: N/A Default value: N/A |
Request Parameters
Response Parameters
Status code: 201
Resource created.
None
Example Requests
Restore a snapshot.
POST https://{Endpoint}/v1.0/{project_id}/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/index_snapshot/653c086f-ebe7-4383-b902-c031b354f1dd/restore
{
"target_cluster" : "ea244205-d641-45d9-9dcb-ab2236bcd07e",
"indices" : "myindex1,myindex2",
"rename_pattern" : "index",
"rename_replacement" : "restored_index_$1"
}
Example Responses
None
Status Codes
Status Code |
Description |
|---|---|
201 |
Resource created. |
400 |
Invalid request. Modify the request before retry. |
403 |
Request rejected. The server has received the request and understood it, but refused to respond to it. The client should not repeat the request without modifications. |
Error Codes
See Error Codes.