OpenSearch/docs/reference/indices/create-data-stream.asciidoc
James Rodewig e5baacbe2e
[DOCS] Simplify index template snippets for data streams (#59533) (#59553)
Removes the `@timestamp` field mapping from several data stream index
template snippets.

With #59317, the `@timestamp` field defaults to a `date` field data type
for data streams.
2020-07-14 17:28:43 -04:00

63 lines
1.3 KiB
Plaintext

[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 <<indices-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.
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)
--