Path parameters

  • repositorystring Required

    The name of the snapshot repository to clean up.

Query parameters

  • The period to wait for a connection to the master node. If the master node is not available before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to -1

    Values are -1 or 0.

  • timeoutstring

    The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. To indicate that the request should never timeout, set it to -1.

    Values are -1 or 0.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • resultsobject Required
      Hide results attributes Show results attributes object
      • deleted_blobsnumber Required

        The number of binary large objects (blobs) removed from the snapshot repository during cleanup operations. A non-zero value indicates that unreferenced blobs were found and subsequently cleaned up.

      • deleted_bytesnumber Required

        The number of bytes freed by cleanup operations.

POST /_snapshot/{repository}/_cleanup
POST /_snapshot/my_repository/_cleanup
curl \
 --request POST 'http://api.example.com/_snapshot/{repository}/_cleanup' \
 --header "Authorization: $API_KEY"
Response examples (200)
A successful response from `POST /_snapshot/my_repository/_cleanup`.
{
  "results": {
    "deleted_bytes": 20,
    "deleted_blobs": 5
  }
}