12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- [role="xpack"]
- [[indices-create-data-stream]]
- === Create data stream API
- ++++
- <titleabbrev>Create data stream</titleabbrev>
- ++++
- Creates a new <<data-streams,data stream>>.
- Data streams require a matching <<index-templates,index template>>.
- See <<set-up-a-data-stream>>.
- ////
- [source,console]
- ----
- PUT /_index_template/template
- {
- "index_patterns": ["my-data-stream*"],
- "data_stream": { }
- }
- ----
- ////
- [source,console]
- ----
- PUT /_data_stream/my-data-stream
- ----
- // TEST[continued]
- ////
- [source,console]
- -----------------------------------
- DELETE /_data_stream/my-data-stream
- DELETE /_index_template/template
- -----------------------------------
- // TEST[continued]
- ////
- [[indices-create-data-stream-request]]
- ==== {api-request-title}
- `PUT /_data_stream/<data-stream>`
- [[indices-create-data-stream-api-path-params]]
- ==== {api-path-parms-title}
- `<data-stream>`::
- +
- --
- (Required, string) Name of the data stream to create.
- // tag::data-stream-name[]
- 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.
- // end::data-stream-name[]
- --
|