Elastic data stream API

The data stream APIs enable you to create and manage data streams and data stream lifecycles. A data stream lets you store append-only time series data across multiple indices while giving you a single named resource for requests. Data streams are well-suited for logs, events, metrics, and other continuously generated data.

GitHub OpenAPI

Operations 21

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /_data_stream/{name} Get a named data stream · Get data streams #
Ask an LLM
“What backing indices and template does a particular data stream use?”
“Can I get verbose details like maximum timestamp for one data stream?”
Tell an agent
Show data stream {name}.
Get verbose details for data streams matching {name}.
PUT /_data_stream/{name} Create a data stream · Create a data stream #
Ask an LLM
“How do I create a data stream in Elasticsearch?”
“Do I need a matching index template before creating a data stream?”
Tell an agent
Create data stream {name}.
Make a new data stream called {name} from its matching template.
DELETE /_data_stream/{name} Delete a data stream · Delete data streams #
Ask an LLM
“Does deleting a data stream also remove its backing indices?”
“Can I delete several data streams with a wildcard?”
Tell an agent destructive · confirm first
Delete data stream {name}.
Remove data streams matching {name} and all their backing indices.
GET /_data_stream/_stats Get stats for all data streams · Get data stream stats #
Ask an LLM
“How much storage are all my data streams using?”
“What's the max timestamp across my data streams?”
Tell an agent
Show stats for all data streams.
Get store size and backing index counts for every data stream.
GET /_data_stream/{name}/_stats Get stats for a data stream · Get data stream stats #
Ask an LLM
“How large is one particular data stream on disk?”
“How many backing indices does a given data stream have?”
Tell an agent
Show stats for data stream {name}.
Get storage size of {name}.
GET /_data_stream/{name}/_lifecycle Get a data stream's lifecycle · Get data stream lifecycles #
Ask an LLM
“What retention is configured on a data stream's lifecycle?”
“Can I see default lifecycle values for a data stream?”
Tell an agent
Show the lifecycle for data stream {name}.
Get retention and downsampling lifecycle config of {name} including defaults.
PUT /_data_stream/{name}/_lifecycle Set a data stream's retention lifecycle · Update data stream lifecycles #
Ask an LLM
“How do I set how long data in a data stream is kept?”
“Can I configure downsampling rounds in a data stream lifecycle?”
Tell an agent
Set data retention on {name} to {data_retention}.
Apply downsampling {downsampling} to the lifecycle of {name}.
GET /_data_stream/{name}/_options Get data stream options · Get data stream options #
Ask an LLM
“Is the failure store enabled on a data stream?”
“What options are configured for a data stream?”
Tell an agent
Show options for data stream {name}.
Check the failure store option on {name}.
PUT /_data_stream/{name}/_options Configure a data stream's failure store · Update data stream options #
Ask an LLM
“How do I enable the failure store on a data stream?”
“Can I update options on several data streams at once?”
Tell an agent
Set the failure store of {name} to {failure_store}.
Enable failure store options on data stream {name}.
DELETE /_data_stream/{name}/_options Remove data stream options · Delete data stream options #
Ask an LLM
“How do I remove the options configuration from a data stream?”
“Does removing options turn off a data stream's failure store?”
Tell an agent destructive · confirm first
Delete the options on data stream {name}.
Clear all data stream options from {name}.
POST /{index}/_downsample/{target_index} Downsample a time series index · Downsample an index #
Ask an LLM
“How do I shrink a time series index by rolling up metrics?”
“What fixed interval can I downsample a TSDS index to?”
Tell an agent
Downsample {index} into {target_index} at interval {fixed_interval}.
Roll up {index} to {target_index} with sampling method {sampling_method} every {fixed_interval}.
GET /{index}/_lifecycle/explain Explain an index's lifecycle status · Get the status for a data stream lifecycle #
Ask an LLM
“Why hasn't my backing index rolled over yet?”
“When was an index created and rolled over under its data stream lifecycle?”
Tell an agent
Explain the lifecycle status of {index}.
Show lifecycle errors and rollover time for {index}.
GET /_lifecycle/stats Get data stream lifecycle stats · Get data stream lifecycle stats #
Ask an LLM
“How many data streams are managed by lifecycle and are any failing?”
“How long did the last lifecycle run take?”
Tell an agent
Show data stream lifecycle stats.
Report lifecycle run timing and managed stream counts.
GET /_data_stream List all data streams · Get data streams #
Ask an LLM
“Which data streams exist in my cluster?”
“Can I include hidden data streams in the list?”
Tell an agent
List my data streams.
List all data streams including hidden ones.
GET /_data_stream/{name}/_mappings Get data stream mappings · Get data stream mappings #
Ask an LLM
“What mappings apply to a data stream, including overrides?”
“Which field mappings has a data stream overridden from its template?”
Tell an agent
Show the mappings of data stream {name}.
Get effective field mappings for {name}.
PUT /_data_stream/{name}/_mappings Override a data stream's mappings · Update data stream mappings #
Ask an LLM
“Can I add field mappings to one data stream without changing its template?”
“Do mapping overrides apply to existing backing indices or only new ones?”
Tell an agent
Add mapping properties {properties} to data stream {name}.
Dry-run mapping override {properties} on {name}.
GET /_data_stream/{name}/_settings Get data stream settings · Get data stream settings #
Ask an LLM
“What index settings does a data stream currently apply?”
“Which settings were overridden on a data stream?”
Tell an agent
Show settings of data stream {name}.
Get the effective index settings for {name}.
PUT /_data_stream/{name}/_settings Override a data stream's settings · Update data stream settings #
Ask an LLM
“Can I change replica count for one data stream without editing its template?”
“Which settings can I override on a data stream in 8.19?”
Tell an agent
Set number of replicas to {number_of_replicas} on data stream {name}.
Change the refresh interval of {name} to {refresh_interval}.
POST /_data_stream/_migrate/{name} Convert an alias to a data stream · Convert an index alias to a data stream #
Ask an LLM
“How do I turn an existing index alias into a data stream?”
“What template does migrating an alias to a data stream require?”
Tell an agent
Migrate alias {name} to a data stream.
Convert index alias {name} into a data stream.
POST /_data_stream/_modify Add or remove backing indices · Update data streams #
Ask an LLM
“Can I add an existing index to a data stream as a backing index?”
“How do I perform several data stream modifications atomically?”
Tell an agent
Apply these data stream actions atomically: {actions}.
Modify data stream backing indices with {actions}.
POST /_data_stream/_promote/{name} Promote a replicated data stream · Promote a data stream #
Ask an LLM
“How do I make a CCR-replicated data stream writable after failover?”
“What happens when I promote a followed data stream?”
Tell an agent
Promote data stream {name}.
Turn replicated data stream {name} into a regular writable one.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elastic:elastic-data-stream-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elastic-data-stream-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Elasticsearch data stream API
  description: 'Elasticsearch provides REST APIs that are used by the UI components and can be called directly to configure and access Elasticsearch features.

    ## Documentation source and versions

    This documentation is derived from the main branch of the elasticsearch-specification repository. It is provided under license Attribution-NonCommercial-NoDerivatives 4.0 International.

    This documentation contains work-in-progress information for future Elastic Stack releases.'
  license:
    name: Apache 2.0
    url: https://github.com/elastic/elasticsearch-specification/blob/main/LICENSE
  version: ''
security:
- apiKeyAuth: []
- basicAuth: []
- bearerAuth: []
tags:


# --- truncated at 32 KB (662 KB total) ---
# Full source: https://artifacts.apis.io/elastic/openapi/elastic-data-stream-api-openapi.yml