Link Search Menu Expand Document Documentation Menu

Pause Ingestion API

Introduced 3.0

Pauses ingestion for one or more indexes. When paused, OpenSearch stops consuming data from the streaming source for all shards in the specified indexes. To restart ingestion, use the Resume Ingestion API.

Endpoints

POST /{index}/ingestion/_pause

Path parameters

The following table lists the available path parameters.

Parameter Data type Required/Optional Description
index String Required The index to pause. Can be a comma-separated list of multiple index names.

Query parameters

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

Parameter Data type Description
cluster_manager_timeout Time units The amount of time to wait for a connection to the cluster manager node. Default is 30s.
timeout Time units The amount of time to wait for a response from the cluster. Default is 30s.

Example request

POST /my-index/ingestion/_pause
response = client.ingestion.pause(
  index = "my-index"
)

Example response

{
  "acknowledged": true,
  "shards_acknowledged": true
}

Response body fields

The following table lists all response body fields.

Field Data type Description
acknowledged Boolean Whether the pause request was acknowledged.
shards_acknowledged Boolean Whether the pause request was acknowledged by the individual shards.
failures Array of objects A list of shard-level failures. See Failures.
error String The request-level error message, if any.

Failures

Each object in the failures array contains the following fields.

Field Data type Description
shard Integer The shard number.
error String The shard-level error message.
350 characters left

Have a question? .

Want to contribute? or .