Skip to content

Commit

Permalink
Add 'Cleanup Snapshot' API Documentation (#8373)
Browse files Browse the repository at this point in the history
* Add documentation for Clone Snapshot API

Signed-off-by: Reiya Downs <[email protected]>

* Add documentation for Cleanup Snapshot Repository API

Signed-off-by: Reiya Downs <[email protected]>

* Fixed minor errors, light editing

Signed-off-by: Reiya Downs <[email protected]>

* Remove erroneous clone-repository file

Signed-off-by: Reiya Downs <[email protected]>

* Update cleanup-snapshot-repository.md

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]>

* Apply suggestions from code review

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]>
(cherry picked from commit f4a5744)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 3, 2024
1 parent e7ea182 commit adf63ae
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions _api-reference/snapshots/cleanup-snapshot-repository.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
layout: default
title: Cleanup Snapshot Repository
parent: Snapshot APIs
nav_order: 11
---

# Cleanup Snapshot Repository

Check failure on line 8 in _api-reference/snapshots/cleanup-snapshot-repository.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _api-reference/snapshots/cleanup-snapshot-repository.md#L8

[OpenSearch.HeadingCapitalization] 'Cleanup Snapshot Repository' is a heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.HeadingCapitalization] 'Cleanup Snapshot Repository' is a heading and should be in sentence case.", "location": {"path": "_api-reference/snapshots/cleanup-snapshot-repository.md", "range": {"start": {"line": 8, "column": 3}}}, "severity": "ERROR"}
Introduced 1.0
{: .label .label-purple }

The Cleanup Snapshot Repository API clears a snapshot repository of data no longer referenced by any existing snapshot.

## Path and HTTP methods

```json
POST /_snapshot/<repository>/_cleanup
```
{% include copy.html %}


## Path parameters

| Parameter | Data type | Description |
| :--- | :--- | :--- |
| `repository` | String | The name of the snapshot repository. |

## Query parameters

The following table lists the available query parameters. All query parameters are optional.

| Parameter | Data type | Description |
| :--- | :--- | :--- |
| `cluster_manager_timeout` | Time | The amount of time to wait for a response from the cluster manager node. Formerly called `master_timeout`. Optional. Default is 30 seconds. |
| `timeout` | Time | The amount of time to wait for the operation to complete. Optional.|

## Example request

The following request removes all stale data from the repository `my_backup`:

```json
POST /_snapshot/my_backup/_cleanup
```
{% include copy-curl.html %}


## Example response

```json
{
"results":{
"deleted_bytes":40,
"deleted_blobs":8
}
}
```

## Response body fields

| Field | Data type | Description |
| :--- | :--- | :--- |
| `deleted_bytes` | Integer | The number of bytes made available in the snapshot after data deletion. |
| `deleted_blobs` | Integer | The number of binary large objects (BLOBs) cleared from the repository by the request. |

0 comments on commit adf63ae

Please sign in to comment.