From bb7dc316e4ae1d03ec5d9d54be3c4a49f0645698 Mon Sep 17 00:00:00 2001 From: Rabi Panda Date: Tue, 9 Feb 2021 18:49:30 -0800 Subject: [PATCH] Bring back the REST specs for data streams. (#78) Add back the REST specs for data streams which were moved to x-pack as part of the commit fe12217c Signed-off-by: Peter Nied --- .../api/indices.create_data_stream.json | 30 +++++++++++++++++ .../api/indices.data_streams_stats.json | 31 +++++++++++++++++ .../api/indices.delete_data_stream.json | 26 +++++++++++++++ .../api/indices.get_data_stream.json | 33 +++++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 rest-api-spec/src/main/resources/rest-api-spec/api/indices.create_data_stream.json create mode 100644 rest-api-spec/src/main/resources/rest-api-spec/api/indices.data_streams_stats.json create mode 100644 rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_data_stream.json create mode 100644 rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream.json diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.create_data_stream.json b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.create_data_stream.json new file mode 100644 index 00000000000..a96d5d32d5e --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.create_data_stream.json @@ -0,0 +1,30 @@ +{ + "indices.create_data_stream":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "description":"Creates or updates a data stream" + }, + "stability":"experimental", + "url":{ + "paths":[ + { + "path":"/_data_stream/{name}", + "methods":[ + "PUT" + ], + "parts":{ + "name":{ + "type":"string", + "description":"The name of the data stream" + } + } + } + ] + }, + "params":{ + }, + "body":{ + "description":"The data stream definition" + } + } +} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.data_streams_stats.json b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.data_streams_stats.json new file mode 100644 index 00000000000..67f90c48eb7 --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.data_streams_stats.json @@ -0,0 +1,31 @@ +{ + "indices.data_streams_stats":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "description":"Provides statistics on operations happening in a data stream." + }, + "stability":"experimental", + "url":{ + "paths":[ + { + "path":"/_data_stream/_stats", + "methods":[ + "GET" + ] + }, + { + "path":"/_data_stream/{name}/_stats", + "methods":[ + "GET" + ], + "parts":{ + "name":{ + "type":"list", + "description":"A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams" + } + } + } + ] + } + } +} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_data_stream.json b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_data_stream.json new file mode 100644 index 00000000000..f824fb5207d --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_data_stream.json @@ -0,0 +1,26 @@ +{ + "indices.delete_data_stream":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "description":"Deletes a data stream." + }, + "stability":"experimental", + "url":{ + "paths":[ + { + "path":"/_data_stream/{name}", + "methods":[ + "DELETE" + ], + "parts":{ + "name":{ + "type":"list", + "description":"A comma-separated list of data streams to delete; use `*` to delete all data streams" + } + } + } + ] + }, + "params":{} + } +} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream.json b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream.json new file mode 100644 index 00000000000..ce19186bea6 --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream.json @@ -0,0 +1,33 @@ +{ + "indices.get_data_stream":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "description":"Returns data streams." + }, + "stability":"experimental", + "url":{ + "paths":[ + { + "path":"/_data_stream", + "methods":[ + "GET" + ] + }, + { + "path":"/_data_stream/{name}", + "methods":[ + "GET" + ], + "parts":{ + "name":{ + "type":"list", + "description":"A comma-separated list of data streams to get; use `*` to get all data streams" + } + } + } + ] + }, + "params":{ + } + } +}