Create data stream API
Creates a new data stream.
PUT /_data_stream/my-data-stream
Request
PUT /_data_stream/<data-stream>
Prerequisites
- If the Elasticsearch security features are enabled, you must have the
create_indexormanageindex privilege for the data stream. - A matching index template with data stream enabled. See Set up a data stream.
Path parameters
-
<data-stream> -
(Required, string) Name of the data stream to create. Data stream names must meet the following criteria:
- Lowercase only
- Cannot include
\,/,*,?,",<,>,|,,,#,:, or a space character - Cannot start with
-,_,+, or.ds- - Cannot be
.or.. - Cannot be longer than 255 bytes. Multi-byte characters count towards this limit faster.
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-create-data-stream.html