diff --git a/api/api/indices.get_data_streams.js b/api/api/indices.get_data_stream.js similarity index 85% rename from api/api/indices.get_data_streams.js rename to api/api/indices.get_data_stream.js index 9bf2b59a6..002024fc9 100644 --- a/api/api/indices.get_data_streams.js +++ b/api/api/indices.get_data_stream.js @@ -7,7 +7,7 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildIndicesGetDataStreams (opts) { +function buildIndicesGetDataStream (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts @@ -25,11 +25,11 @@ function buildIndicesGetDataStreams (opts) { } /** - * Perform a indices.get_data_streams request + * Perform a indices.get_data_stream request * Returns data streams. * https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html */ - return function indicesGetDataStreams (params, options, callback) { + return function indicesGetDataStream (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -60,10 +60,10 @@ function buildIndicesGetDataStreams (opts) { if ((name) != null) { if (method == null) method = 'GET' - path = '/' + '_data_streams' + '/' + encodeURIComponent(name) + path = '/' + '_data_stream' + '/' + encodeURIComponent(name) } else { if (method == null) method = 'GET' - path = '/' + '_data_streams' + path = '/' + '_data_stream' } // build request object @@ -79,4 +79,4 @@ function buildIndicesGetDataStreams (opts) { } } -module.exports = buildIndicesGetDataStreams +module.exports = buildIndicesGetDataStream diff --git a/api/index.js b/api/index.js index bca6a7563..1e4a24403 100644 --- a/api/index.js +++ b/api/index.js @@ -221,8 +221,8 @@ function ESAPI (opts) { get: lazyLoad('indices.get', opts), get_alias: lazyLoad('indices.get_alias', opts), getAlias: lazyLoad('indices.get_alias', opts), - get_data_streams: lazyLoad('indices.get_data_streams', opts), - getDataStreams: lazyLoad('indices.get_data_streams', opts), + get_data_stream: lazyLoad('indices.get_data_stream', opts), + getDataStream: lazyLoad('indices.get_data_stream', opts), get_field_mapping: lazyLoad('indices.get_field_mapping', opts), getFieldMapping: lazyLoad('indices.get_field_mapping', opts), get_index_template: lazyLoad('indices.get_index_template', opts), diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 5d8da3a88..dc7a43194 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -749,7 +749,7 @@ export interface IndicesGetAlias extends Generic { local?: boolean; } -export interface IndicesGetDataStreams extends Generic { +export interface IndicesGetDataStream extends Generic { name?: string; } diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index ed7404855..cfad7c9fc 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -1103,7 +1103,7 @@ client.cluster.deleteComponentTemplate({ master_timeout: string }) ---- -link:{ref}/indices-component-template.html[Documentation] + +link:{ref}/indices-component-templates.html[Documentation] + [cols=2*] |=== |`name` @@ -1144,7 +1144,7 @@ client.cluster.existsComponentTemplate({ local: boolean }) ---- -link:{ref}/indices-component-template.html[Documentation] + +link:{ref}/indices-component-templates.html[Documentation] + [cols=2*] |=== |`name` @@ -1168,7 +1168,7 @@ client.cluster.getComponentTemplate({ local: boolean }) ---- -link:{ref}/indices-component-template.html[Documentation] + +link:{ref}/indices-component-templates.html[Documentation] + [cols=2*] |=== |`name` @@ -1329,7 +1329,7 @@ client.cluster.putComponentTemplate({ body: object }) ---- -link:{ref}/indices-component-template.html[Documentation] + +link:{ref}/indices-component-templates.html[Documentation] + [cols=2*] |=== |`name` @@ -3081,11 +3081,11 @@ _Default:_ `all` |=== -=== indices.getDataStreams +=== indices.getDataStream *Stability:* experimental [source,ts] ---- -client.indices.getDataStreams({ +client.indices.getDataStream({ name: string }) ---- diff --git a/index.d.ts b/index.d.ts index 02af65fd6..e6f71a8c8 100644 --- a/index.d.ts +++ b/index.d.ts @@ -869,14 +869,14 @@ declare class Client extends EventEmitter { getAlias, TContext = unknown>(callback: callbackFn): TransportRequestCallback getAlias, TContext = unknown>(params: RequestParams.IndicesGetAlias, callback: callbackFn): TransportRequestCallback getAlias, TContext = unknown>(params: RequestParams.IndicesGetAlias, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - get_data_streams, TContext = unknown>(params?: RequestParams.IndicesGetDataStreams, options?: TransportRequestOptions): TransportRequestPromise> - get_data_streams, TContext = unknown>(callback: callbackFn): TransportRequestCallback - get_data_streams, TContext = unknown>(params: RequestParams.IndicesGetDataStreams, callback: callbackFn): TransportRequestCallback - get_data_streams, TContext = unknown>(params: RequestParams.IndicesGetDataStreams, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - getDataStreams, TContext = unknown>(params?: RequestParams.IndicesGetDataStreams, options?: TransportRequestOptions): TransportRequestPromise> - getDataStreams, TContext = unknown>(callback: callbackFn): TransportRequestCallback - getDataStreams, TContext = unknown>(params: RequestParams.IndicesGetDataStreams, callback: callbackFn): TransportRequestCallback - getDataStreams, TContext = unknown>(params: RequestParams.IndicesGetDataStreams, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + get_data_stream, TContext = unknown>(params?: RequestParams.IndicesGetDataStream, options?: TransportRequestOptions): TransportRequestPromise> + get_data_stream, TContext = unknown>(callback: callbackFn): TransportRequestCallback + get_data_stream, TContext = unknown>(params: RequestParams.IndicesGetDataStream, callback: callbackFn): TransportRequestCallback + get_data_stream, TContext = unknown>(params: RequestParams.IndicesGetDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + getDataStream, TContext = unknown>(params?: RequestParams.IndicesGetDataStream, options?: TransportRequestOptions): TransportRequestPromise> + getDataStream, TContext = unknown>(callback: callbackFn): TransportRequestCallback + getDataStream, TContext = unknown>(params: RequestParams.IndicesGetDataStream, callback: callbackFn): TransportRequestCallback + getDataStream, TContext = unknown>(params: RequestParams.IndicesGetDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback get_field_mapping, TContext = unknown>(params?: RequestParams.IndicesGetFieldMapping, options?: TransportRequestOptions): TransportRequestPromise> get_field_mapping, TContext = unknown>(callback: callbackFn): TransportRequestCallback get_field_mapping, TContext = unknown>(params: RequestParams.IndicesGetFieldMapping, callback: callbackFn): TransportRequestCallback