younifyd
Menu

Create (POST)

Create

POST/_snapshot/{repository}/{snapshot}

Use it in a workflow

  1. Add a step and choose the OpenSearch connector.
  2. Pick the Create (POST) action (under snapshot).
  3. Fill in the fields below, then reference the result from later steps as {{createPost.response.data}}.

Request

Path parameters

repositorystringrequired

The name of the repository where the snapshot will be stored.

snapshotstringrequired

The name of the snapshot. Must be unique in the repository.

Query parameters

cluster_manager_timeoutstring

The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).

master_timeoutstring

Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.

wait_for_completionboolean

When `true`, the request returns a response when the snapshot is complete. When `false`, the request returns a response when the snapshot initializes.

Default false

prettyboolean

Whether to pretty-format the returned JSON response.

Default false

humanboolean

Whether to return human-readable values for statistics.

Default false

error_traceboolean

Whether to include the stack trace of returned errors.

Default false

sourcestring

The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

filter_pathoneOf

A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.

Response

Returns 200 with an object. Read it in later steps with {{createPost.response.data.<field>}}.

acceptedboolean

Returns `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false`.

snapshotobject
data_streamsarray<string>

The list of data streams included in the snapshot.

durationstring

A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts `0` without a unit and `-1` to indicate an unspecified value.

duration_in_millisinteger (int64)

The time unit for milliseconds.

end_timeoneOf

A date and time, either as a string whose format depends on the context (defaulting to ISO_8601) or the number of milliseconds since the epoch. OpenSearch accepts both as an input but will generally output a string. representation.

end_time_in_millisinteger (int64)

The time unit for milliseconds.

failuresarray<object>5 fields

The list of shard failures that occurred during the snapshot.

include_global_stateboolean

Whether the snapshot includes the cluster state.

indicesarray<string>

The list of indexes included in the snapshot.

metadataobject

The custom metadata attached to a resource.

pinned_timestampinteger (int64)

The time unit for milliseconds.

reasonstring

The reason for the snapshot creation.

remote_store_index_shallow_copyboolean

Whether the snapshot uses remote store index shallow copy.

snapshotstring

The name of a resource or configuration element.

shardsobject5 fields
start_timeoneOf

A date and time, either as a string whose format depends on the context (defaulting to ISO_8601) or the number of milliseconds since the epoch. OpenSearch accepts both as an input but will generally output a string. representation.

start_time_in_millisinteger (int64)

The time unit for milliseconds.

statestring

The current state of the snapshot.

uuidstring

The universally unique identifier.

versionstring
version_idinteger (int64)
json
{
  "accepted": false,
  "snapshot": {
    "data_streams": [
      "string"
    ],
    "duration": "string",
    "duration_in_millis": 0,
    "end_time": null,
    "end_time_in_millis": 0,
    "failures": [
      {
        "index": "string",
        "node_id": "string",
        "reason": "string",
        "shard_id": "string",
        "status": "string"
      }
    ],
    "include_global_state": false,
    "indices": [
      "string"
    ],
    "metadata": {},
    "pinned_timestamp": 0,
    "reason": "string",
    "remote_store_index_shallow_copy": false
  }
}

Need more? See the OpenSearch guide for connection setup and behaviour shared by every action.

Was this page helpful?