Skip to content

Commit b0240be

Browse files
ReiyadownsNaarcha-AWSnatebower
authored andcommitted
Add 'Clone Snapshot' API Documentation (opensearch-project#8371)
* Add documentation for Clone Snapshot API Signed-off-by: Reiya Downs <[email protected]> * Light edits Signed-off-by: Reiya Downs <[email protected]> * Fixed title Signed-off-by: Reiya Downs <[email protected]> * Remove unnecessary clone-repository file Signed-off-by: Reiya Downs <[email protected]> * Update page with automation markers Signed-off-by: Naarcha-AWS <[email protected]> * Remove response body. Will loop back around once all missing request descriptions have been added to core. Signed-off-by: Naarcha-AWS <[email protected]> * Apply suggestions from code review Signed-off-by: Naarcha-AWS <[email protected]> * Update clone-snapshot.md Signed-off-by: Naarcha-AWS <[email protected]> * Apply suggestions from code review Signed-off-by: Naarcha-AWS <[email protected]> * Apply suggestions from code review Signed-off-by: Naarcha-AWS <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]> --------- Signed-off-by: Reiya Downs <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]> Co-authored-by: Naarcha-AWS <[email protected]> Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Eric Pugh <[email protected]>
1 parent 14c96cc commit b0240be

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
layout: default
3+
title: Clone snapshot
4+
parent: Snapshot APIs
5+
nav_order: 10
6+
---
7+
8+
# Clone snapshot
9+
Introduced 1.0
10+
{: .label .label-purple }
11+
12+
Creates a clone of all or part of a snapshot in the same repository as the original.
13+
14+
15+
<!-- spec_insert_start
16+
api: snapshot.clone
17+
component: endpoints
18+
-->
19+
## Endpoints
20+
```json
21+
PUT /_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}
22+
```
23+
<!-- spec_insert_end -->
24+
25+
<!-- spec_insert_start
26+
api: snapshot.clone
27+
component: path_parameters
28+
-->
29+
## Path parameters
30+
31+
The following table lists the available path parameters.
32+
33+
| Parameter | Required | Data type | Description |
34+
| :--- | :--- | :--- | :--- |
35+
| `repository` | **Required** | String | The name of repository that will contain the snapshot clone. |
36+
| `snapshot` | **Required** | String | The name of the original snapshot. |
37+
| `target_snapshot` | **Required** | String | The name of the cloned snapshot. |
38+
39+
<!-- spec_insert_end -->
40+
41+
42+
<!-- spec_insert_start
43+
api: snapshot.clone
44+
component: query_parameters
45+
include_deprecated: false
46+
-->
47+
## Query parameters
48+
49+
The following table lists the available query parameters. All query parameters are optional.
50+
51+
| Parameter | Data type | Description |
52+
| :--- | :--- | :--- |
53+
| `cluster_manager_timeout` | String | The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters]({{site.url}}{{site.baseurl}}/api-reference/common-parameters/#time-units). |
54+
55+
<!-- spec_insert_end -->
56+
57+
58+
## Example request
59+
60+
The following request clones indexes `index_a` and `index_b` from `my_snapshot`, a snapshot located in the snapshot repository `my-opensearch-repo`, into a new snapshot in the same repository called `my_new_snapshot`:
61+
62+
```json
63+
PUT /_snapshot/my-opensearch-repo/my_snapshot/_clone/my_new_snapshot
64+
{
65+
“indices” : “index_a,index_b”
66+
}
67+
```
68+
{% include copy-curl.html %}
69+
70+
71+
## Example response
72+
73+
The successful creation of a snapshot clone returns the following response:
74+
75+
```json
76+
{
77+
"acknowledged" : true
78+
}
79+
```
80+

0 commit comments

Comments
 (0)