younifyd
Menu

Delete

Delete

DELETE/{index}/_doc/{id}

Use it in a workflow

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

Request

Path parameters

idstringrequired

The unique identifier for the document.

indexstringrequired

Name of the target index.

Query parameters

if_primary_terminteger (int64)

Only perform the operation if the document has this primary term.

if_seq_nointeger (int64)

Only perform the operation if the document has this sequence number.

refreshoneOf

If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.

routingoneOf

A custom value used to route operations to a specific shard.

timeoutstring

Period to wait for active shards.

versioninteger (int64)

Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.

version_typeoneOf

The specific version type: `external`, `external_gte`.

wait_for_active_shardsoneOf

The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).

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 {{delete.response.data.<field>}}.

_typestring

The type of document or resource.

_idstring

The unique identifier for a resource.

_indexstring
_primary_terminteger (int64)

The primary term of the document.

resultoneOf
_seq_nointeger (int64)

The sequence number of the document.

_shardsobject
failedintegerrequired
successfulintegerrequired
totalintegerrequired
failuresarray<object>4 fields
skippedinteger
_versioninteger (int64)
forced_refreshboolean
json
{
  "_id": "string",
  "_index": "string",
  "_primary_term": 0,
  "result": null,
  "_seq_no": 0,
  "_shards": {
    "failed": 0,
    "successful": 0,
    "total": 0,
    "failures": [
      {
        "shard": 0,
        "reason": {
          "type": "string",
          "reason": "string",
          "stack_trace": "string",
          "caused_by": {},
          "root_cause": [
            {}
          ],
          "suppressed": [
            {}
          ],
          "header": {}
        },
        "index": "string",
        "node": "string"
      }
    ],
    "skipped": 0
  },
  "_version": 0,
  "_type": "string",
  "forced_refresh": false
}

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

Was this page helpful?