[[indices-create-data-stream]] === Create data stream API ++++ Create data stream ++++ Creates a new <>. Data streams require a matching <>. See <>. //// [source,console] ---- PUT /_index_template/template { "index_patterns": ["my-data-stream*"], "template": { "mappings": { "properties": { "@timestamp": { "type": "date" } } } }, "data_stream": { "timestamp_field": "@timestamp" } } ---- //// [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/` [[indices-create-data-stream-api-path-params]] ==== {api-path-parms-title} ``:: + -- (Required, string) Name of the data stream to create. Data stream names must meet the following criteria: - Lowercase only - Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space character), `,`, `#`, `:` - Cannot start with `-`, `_`, `+`, `.` - Cannot be `.` or `..` - Cannot be longer than 255 bytes (note it is bytes, so multi-byte characters will count towards the 255 limit faster) --