Method: OpenSearch::API::Cat::Actions#snapshots
- Defined in:
- lib/opensearch/api/actions/cat/snapshots.rb
#snapshots(arguments = {}) ⇒ Object
Returns all snapshots in a specific repository.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/opensearch/api/actions/cat/snapshots.rb', line 45 def snapshots(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _repository = arguments.delete(:repository) method = OpenSearch::API::HTTP_GET path = if _repository "_cat/snapshots/#{Utils.__listify(_repository)}" else "_cat/snapshots" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |