From dd8491d7238f0043680056f22cd6acfc772e4a52 Mon Sep 17 00:00:00 2001 From: Tomas Della Vedova Date: Thu, 25 Jul 2019 11:08:18 +0200 Subject: [PATCH] Better reference code examples (#920) * Updated documentation genertation script to build small code snippets * Updated docs reference * Removed slm doc * Add commas and remove empty objects --- docs/reference.asciidoc | 3207 ++++++++++++++++++++++++--------- scripts/utils/generateDocs.js | 26 +- 2 files changed, 2386 insertions(+), 847 deletions(-) diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index eb9b7c2a7..b7e226cc6 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -4,7 +4,9 @@ //////// This documentation is generated by running: -node scripts/run.js --tag v7.0.0-beta +node scripts/run.js --tag tagName +or +node scripts/run.js --branch branchName //////// @@ -32,9 +34,22 @@ link:{ref}/common-options.html[Reference] |=== === bulk -[source,js] +[source,ts] ---- -client.bulk([params] [, options] [, callback]) +client.bulk({ + index: string, + type: string, + wait_for_active_shards: string, + refresh: 'true' | 'false' | 'wait_for', + routing: string, + timeout: string, + type: string, + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + pipeline: string, + body: object +}) ---- link:{ref}/docs-bulk.html[Reference] [cols=2*] @@ -49,7 +64,7 @@ link:{ref}/docs-bulk.html[Reference] |`string` - Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) |`refresh` -|`'true', 'false', 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. |`routing` |`string` - Specific routing value @@ -61,13 +76,13 @@ link:{ref}/docs-bulk.html[Reference] |`string` - Default document type for items which don't provide one |`_source` -|`string, string[]` - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request +|`string \| string[]` - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request +|`string \| string[]` - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request |`_source_includes` or `_sourceIncludes` -|`string, string[]` - Default list of fields to extract and return from the _source field, can be overridden on each sub-request +|`string \| string[]` - Default list of fields to extract and return from the _source field, can be overridden on each sub-request |`pipeline` |`string` - The pipeline id to preprocess incoming documents with @@ -78,15 +93,24 @@ link:{ref}/docs-bulk.html[Reference] |=== === cat.aliases -[source,js] +[source,ts] ---- -client.cat.aliases([params] [, options] [, callback]) +client.cat.aliases({ + name: string | string[], + format: string, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-alias.html[Reference] [cols=2*] |=== |`name` -|`string, string[]` - A comma-separated list of alias names to return +|`string \| string[]` - A comma-separated list of alias names to return |`format` |`string` - a short version of the Accept header, e.g. json, yaml @@ -98,13 +122,13 @@ link:{ref}/cat-alias.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -112,21 +136,31 @@ link:{ref}/cat-alias.html[Reference] |=== === cat.allocation -[source,js] +[source,ts] ---- -client.cat.allocation([params] [, options] [, callback]) +client.cat.allocation({ + node_id: string | string[], + format: string, + bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-allocation.html[Reference] [cols=2*] |=== |`node_id` or `nodeId` -|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information +|`string \| string[]` - A comma-separated list of node IDs or names to limit the returned information |`format` |`string` - a short version of the Accept header, e.g. json, yaml |`bytes` -|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values +|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values |`local` |`boolean` - Return local information, do not retrieve the state from master node (default: false) @@ -135,13 +169,13 @@ link:{ref}/cat-allocation.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -149,15 +183,24 @@ link:{ref}/cat-allocation.html[Reference] |=== === cat.count -[source,js] +[source,ts] ---- -client.cat.count([params] [, options] [, callback]) +client.cat.count({ + index: string | string[], + format: string, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-count.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to limit the returned information +|`string \| string[]` - A comma-separated list of index names to limit the returned information |`format` |`string` - a short version of the Accept header, e.g. json, yaml @@ -169,13 +212,13 @@ link:{ref}/cat-count.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -183,21 +226,32 @@ link:{ref}/cat-count.html[Reference] |=== === cat.fielddata -[source,js] +[source,ts] ---- -client.cat.fielddata([params] [, options] [, callback]) +client.cat.fielddata({ + fields: string | string[], + format: string, + bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean, + fields: string | string[] +}) ---- link:{ref}/cat-fielddata.html[Reference] [cols=2*] |=== |`fields` -|`string, string[]` - A comma-separated list of fields to return the fielddata size +|`string \| string[]` - A comma-separated list of fields to return the fielddata size |`format` |`string` - a short version of the Accept header, e.g. json, yaml |`bytes` -|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values +|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values |`local` |`boolean` - Return local information, do not retrieve the state from master node (default: false) @@ -206,26 +260,35 @@ link:{ref}/cat-fielddata.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers |`fields` -|`string, string[]` - A comma-separated list of fields to return in the output +|`string \| string[]` - A comma-separated list of fields to return in the output |=== === cat.health -[source,js] +[source,ts] ---- -client.cat.health([params] [, options] [, callback]) +client.cat.health({ + format: string, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + ts: boolean, + v: boolean +}) ---- link:{ref}/cat-health.html[Reference] [cols=2*] @@ -240,13 +303,13 @@ link:{ref}/cat-health.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`ts` |`boolean` - Set to false to disable timestamping + @@ -258,9 +321,12 @@ _Default:_ `true` |=== === cat.help -[source,js] +[source,ts] ---- -client.cat.help([params] [, options] [, callback]) +client.cat.help({ + help: boolean, + s: string | string[] +}) ---- link:{ref}/cat.html[Reference] [cols=2*] @@ -269,26 +335,39 @@ link:{ref}/cat.html[Reference] |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |=== === cat.indices -[source,js] +[source,ts] ---- -client.cat.indices([params] [, options] [, callback]) +client.cat.indices({ + index: string | string[], + format: string, + bytes: 'b' | 'k' | 'm' | 'g', + local: boolean, + master_timeout: string, + h: string | string[], + health: 'green' | 'yellow' | 'red', + help: boolean, + pri: boolean, + s: string | string[], + v: boolean, + include_unloaded_segments: boolean +}) ---- link:{ref}/cat-indices.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to limit the returned information +|`string \| string[]` - A comma-separated list of index names to limit the returned information |`format` |`string` - a short version of the Accept header, e.g. json, yaml |`bytes` -|`'b', 'k', 'm', 'g'` - The unit in which to display byte values +|`'b' \| 'k' \| 'm' \| 'g'` - The unit in which to display byte values |`local` |`boolean` - Return local information, do not retrieve the state from master node (default: false) @@ -297,10 +376,10 @@ link:{ref}/cat-indices.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`health` -|`'green', 'yellow', 'red'` - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status +|`'green' \| 'yellow' \| 'red'` - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status |`help` |`boolean` - Return help information @@ -309,7 +388,7 @@ link:{ref}/cat-indices.html[Reference] |`boolean` - Set to true to return stats only for primary shards |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -320,9 +399,17 @@ link:{ref}/cat-indices.html[Reference] |=== === cat.master -[source,js] +[source,ts] ---- -client.cat.master([params] [, options] [, callback]) +client.cat.master({ + format: string, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-master.html[Reference] [cols=2*] @@ -337,13 +424,13 @@ link:{ref}/cat-master.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -351,9 +438,17 @@ link:{ref}/cat-master.html[Reference] |=== === cat.nodeattrs -[source,js] +[source,ts] ---- -client.cat.nodeattrs([params] [, options] [, callback]) +client.cat.nodeattrs({ + format: string, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-nodeattrs.html[Reference] [cols=2*] @@ -368,13 +463,13 @@ link:{ref}/cat-nodeattrs.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -382,9 +477,18 @@ link:{ref}/cat-nodeattrs.html[Reference] |=== === cat.nodes -[source,js] +[source,ts] ---- -client.cat.nodes([params] [, options] [, callback]) +client.cat.nodes({ + format: string, + full_id: boolean, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-nodes.html[Reference] [cols=2*] @@ -402,13 +506,13 @@ link:{ref}/cat-nodes.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -416,9 +520,17 @@ link:{ref}/cat-nodes.html[Reference] |=== === cat.pendingTasks -[source,js] +[source,ts] ---- -client.cat.pendingTasks([params] [, options] [, callback]) +client.cat.pendingTasks({ + format: string, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-pending-tasks.html[Reference] [cols=2*] @@ -433,13 +545,13 @@ link:{ref}/cat-pending-tasks.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -447,9 +559,17 @@ link:{ref}/cat-pending-tasks.html[Reference] |=== === cat.plugins -[source,js] +[source,ts] ---- -client.cat.plugins([params] [, options] [, callback]) +client.cat.plugins({ + format: string, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-plugins.html[Reference] [cols=2*] @@ -464,13 +584,13 @@ link:{ref}/cat-plugins.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -478,33 +598,42 @@ link:{ref}/cat-plugins.html[Reference] |=== === cat.recovery -[source,js] +[source,ts] ---- -client.cat.recovery([params] [, options] [, callback]) +client.cat.recovery({ + index: string | string[], + format: string, + bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-recovery.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to limit the returned information +|`string \| string[]` - A comma-separated list of index names to limit the returned information |`format` |`string` - a short version of the Accept header, e.g. json, yaml |`bytes` -|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values +|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values |`master_timeout` or `masterTimeout` |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -512,9 +641,17 @@ link:{ref}/cat-recovery.html[Reference] |=== === cat.repositories -[source,js] +[source,ts] ---- -client.cat.repositories([params] [, options] [, callback]) +client.cat.repositories({ + format: string, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-repositories.html[Reference] [cols=2*] @@ -529,13 +666,13 @@ link:{ref}/cat-repositories.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -543,30 +680,38 @@ link:{ref}/cat-repositories.html[Reference] |=== === cat.segments -[source,js] +[source,ts] ---- -client.cat.segments([params] [, options] [, callback]) +client.cat.segments({ + index: string | string[], + format: string, + bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-segments.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to limit the returned information +|`string \| string[]` - A comma-separated list of index names to limit the returned information |`format` |`string` - a short version of the Accept header, e.g. json, yaml |`bytes` -|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values +|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -574,21 +719,31 @@ link:{ref}/cat-segments.html[Reference] |=== === cat.shards -[source,js] +[source,ts] ---- -client.cat.shards([params] [, options] [, callback]) +client.cat.shards({ + index: string | string[], + format: string, + bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-shards.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to limit the returned information +|`string \| string[]` - A comma-separated list of index names to limit the returned information |`format` |`string` - a short version of the Accept header, e.g. json, yaml |`bytes` -|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values +|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values |`local` |`boolean` - Return local information, do not retrieve the state from master node (default: false) @@ -597,13 +752,13 @@ link:{ref}/cat-shards.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -611,15 +766,24 @@ link:{ref}/cat-shards.html[Reference] |=== === cat.snapshots -[source,js] +[source,ts] ---- -client.cat.snapshots([params] [, options] [, callback]) +client.cat.snapshots({ + repository: string | string[], + format: string, + ignore_unavailable: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-snapshots.html[Reference] [cols=2*] |=== |`repository` -|`string, string[]` - Name of repository from which to fetch the snapshot information +|`string \| string[]` - Name of repository from which to fetch the snapshot information |`format` |`string` - a short version of the Accept header, e.g. json, yaml @@ -631,13 +795,13 @@ link:{ref}/cat-snapshots.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -645,9 +809,19 @@ link:{ref}/cat-snapshots.html[Reference] |=== === cat.tasks -[source,js] +[source,ts] ---- -client.cat.tasks([params] [, options] [, callback]) +client.cat.tasks({ + format: string, + node_id: string | string[], + actions: string | string[], + detailed: boolean, + parent_task: number, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/tasks.html[Reference] [cols=2*] @@ -656,10 +830,10 @@ link:{ref}/tasks.html[Reference] |`string` - a short version of the Accept header, e.g. json, yaml |`node_id` or `nodeId` -|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +|`string \| string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes |`actions` -|`string, string[]` - A comma-separated list of actions that should be returned. Leave empty to return all. +|`string \| string[]` - A comma-separated list of actions that should be returned. Leave empty to return all. |`detailed` |`boolean` - Return detailed task information (default: false) @@ -668,13 +842,13 @@ link:{ref}/tasks.html[Reference] |`number` - Return tasks with specified parent task id. Set to -1 to return all. |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -682,9 +856,18 @@ link:{ref}/tasks.html[Reference] |=== === cat.templates -[source,js] +[source,ts] ---- -client.cat.templates([params] [, options] [, callback]) +client.cat.templates({ + name: string, + format: string, + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-templates.html[Reference] [cols=2*] @@ -702,13 +885,13 @@ link:{ref}/cat-templates.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -716,21 +899,31 @@ link:{ref}/cat-templates.html[Reference] |=== === cat.threadPool -[source,js] +[source,ts] ---- -client.cat.threadPool([params] [, options] [, callback]) +client.cat.threadPool({ + thread_pool_patterns: string | string[], + format: string, + size: '' | 'k' | 'm' | 'g' | 't' | 'p', + local: boolean, + master_timeout: string, + h: string | string[], + help: boolean, + s: string | string[], + v: boolean +}) ---- link:{ref}/cat-thread-pool.html[Reference] [cols=2*] |=== |`thread_pool_patterns` or `threadPoolPatterns` -|`string, string[]` - A comma-separated list of regular-expressions to filter the thread pools in the output +|`string \| string[]` - A comma-separated list of regular-expressions to filter the thread pools in the output |`format` |`string` - a short version of the Accept header, e.g. json, yaml |`size` -|`'', 'k', 'm', 'g', 't', 'p'` - The multiplier in which to display values +|`'' \| 'k' \| 'm' \| 'g' \| 't' \| 'p'` - The multiplier in which to display values |`local` |`boolean` - Return local information, do not retrieve the state from master node (default: false) @@ -739,13 +932,13 @@ link:{ref}/cat-thread-pool.html[Reference] |`string` - Explicit operation timeout for connection to master node |`h` -|`string, string[]` - Comma-separated list of column names to display +|`string \| string[]` - Comma-separated list of column names to display |`help` |`boolean` - Return help information |`s` -|`string, string[]` - Comma-separated list of column names or column aliases to sort by +|`string \| string[]` - Comma-separated list of column names or column aliases to sort by |`v` |`boolean` - Verbose mode. Display column headers @@ -753,15 +946,18 @@ link:{ref}/cat-thread-pool.html[Reference] |=== === clearScroll -[source,js] +[source,ts] ---- -client.clearScroll([params] [, options] [, callback]) +client.clearScroll({ + scroll_id: string | string[], + body: object +}) ---- -link:{ref}/search-request-scroll.html[Reference] +link:{ref}/search-request-body.html#request-body-search-scroll[Reference] [cols=2*] |=== |`scroll_id` or `scrollId` -|`string, string[]` - A comma-separated list of scroll IDs to clear +|`string \| string[]` - A comma-separated list of scroll IDs to clear |`body` |`object` - A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter @@ -769,9 +965,13 @@ link:{ref}/search-request-scroll.html[Reference] |=== === cluster.allocationExplain -[source,js] +[source,ts] ---- -client.cluster.allocationExplain([params] [, options] [, callback]) +client.cluster.allocationExplain({ + include_yes_decisions: boolean, + include_disk_info: boolean, + body: object +}) ---- link:{ref}/cluster-allocation-explain.html[Reference] [cols=2*] @@ -788,9 +988,14 @@ link:{ref}/cluster-allocation-explain.html[Reference] |=== === cluster.getSettings -[source,js] +[source,ts] ---- -client.cluster.getSettings([params] [, options] [, callback]) +client.cluster.getSettings({ + flat_settings: boolean, + master_timeout: string, + timeout: string, + include_defaults: boolean +}) ---- link:{ref}/cluster-update-settings.html[Reference] [cols=2*] @@ -810,22 +1015,35 @@ link:{ref}/cluster-update-settings.html[Reference] |=== === cluster.health -[source,js] +[source,ts] ---- -client.cluster.health([params] [, options] [, callback]) +client.cluster.health({ + index: string | string[], + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + level: 'cluster' | 'indices' | 'shards', + local: boolean, + master_timeout: string, + timeout: string, + wait_for_active_shards: string, + wait_for_nodes: string, + wait_for_events: 'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid', + wait_for_no_relocating_shards: boolean, + wait_for_no_initializing_shards: boolean, + wait_for_status: 'green' | 'yellow' | 'red' +}) ---- link:{ref}/cluster-health.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - Limit the information returned to a specific index +|`string \| string[]` - Limit the information returned to a specific index |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `all` |`level` -|`'cluster', 'indices', 'shards'` - Specify the level of detail for returned information + +|`'cluster' \| 'indices' \| 'shards'` - Specify the level of detail for returned information + _Default:_ `cluster` |`local` @@ -844,7 +1062,7 @@ _Default:_ `cluster` |`string` - Wait until the specified number of nodes is available |`wait_for_events` or `waitForEvents` -|`'immediate', 'urgent', 'high', 'normal', 'low', 'languid'` - Wait until all currently queued events with the given priority are processed +|`'immediate' \| 'urgent' \| 'high' \| 'normal' \| 'low' \| 'languid'` - Wait until all currently queued events with the given priority are processed |`wait_for_no_relocating_shards` or `waitForNoRelocatingShards` |`boolean` - Whether to wait until there are no relocating shards in the cluster @@ -853,14 +1071,17 @@ _Default:_ `cluster` |`boolean` - Whether to wait until there are no initializing shards in the cluster |`wait_for_status` or `waitForStatus` -|`'green', 'yellow', 'red'` - Wait until cluster is in a specific state +|`'green' \| 'yellow' \| 'red'` - Wait until cluster is in a specific state |=== === cluster.pendingTasks -[source,js] +[source,ts] ---- -client.cluster.pendingTasks([params] [, options] [, callback]) +client.cluster.pendingTasks({ + local: boolean, + master_timeout: string +}) ---- link:{ref}/cluster-pending.html[Reference] [cols=2*] @@ -874,9 +1095,14 @@ link:{ref}/cluster-pending.html[Reference] |=== === cluster.putSettings -[source,js] +[source,ts] ---- -client.cluster.putSettings([params] [, options] [, callback]) +client.cluster.putSettings({ + flat_settings: boolean, + master_timeout: string, + timeout: string, + body: object +}) ---- link:{ref}/cluster-update-settings.html[Reference] [cols=2*] @@ -896,17 +1122,25 @@ link:{ref}/cluster-update-settings.html[Reference] |=== === cluster.remoteInfo -[source,js] +[source,ts] ---- -client.cluster.remoteInfo([params] [, options] [, callback]) +client.cluster.remoteInfo() ---- link:{ref}/cluster-remote-info.html[Reference] === cluster.reroute -[source,js] +[source,ts] ---- -client.cluster.reroute([params] [, options] [, callback]) +client.cluster.reroute({ + dry_run: boolean, + explain: boolean, + retry_failed: boolean, + metric: string | string[], + master_timeout: string, + timeout: string, + body: object +}) ---- link:{ref}/cluster-reroute.html[Reference] [cols=2*] @@ -921,7 +1155,7 @@ link:{ref}/cluster-reroute.html[Reference] |`boolean` - Retries allocation of shards that are blocked due to too many subsequent allocation failures |`metric` -|`string, string[]` - Limit the information returned to the specified metrics. Defaults to all but metadata +|`string \| string[]` - Limit the information returned to the specified metrics. Defaults to all but metadata |`master_timeout` or `masterTimeout` |`string` - Explicit operation timeout for connection to master node @@ -935,18 +1169,29 @@ link:{ref}/cluster-reroute.html[Reference] |=== === cluster.state -[source,js] +[source,ts] ---- -client.cluster.state([params] [, options] [, callback]) +client.cluster.state({ + index: string | string[], + metric: string | string[], + local: boolean, + master_timeout: string, + flat_settings: boolean, + wait_for_metadata_version: number, + wait_for_timeout: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all' +}) ---- link:{ref}/cluster-state.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`metric` -|`string, string[]` - Limit the information returned to the specified metrics +|`string \| string[]` - Limit the information returned to the specified metrics |`local` |`boolean` - Return local information, do not retrieve the state from master node (default: false) @@ -970,21 +1215,25 @@ link:{ref}/cluster-state.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |=== === cluster.stats -[source,js] +[source,ts] ---- -client.cluster.stats([params] [, options] [, callback]) +client.cluster.stats({ + node_id: string | string[], + flat_settings: boolean, + timeout: string +}) ---- link:{ref}/cluster-stats.html[Reference] [cols=2*] |=== |`node_id` or `nodeId` -|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +|`string \| string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes |`flat_settings` or `flatSettings` |`boolean` - Return settings in flat format (default: false) @@ -995,18 +1244,36 @@ link:{ref}/cluster-stats.html[Reference] |=== === count -[source,js] +[source,ts] ---- -client.count([params] [, options] [, callback]) +client.count({ + index: string | string[], + type: string | string[], + ignore_unavailable: boolean, + ignore_throttled: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + min_score: number, + preference: string, + routing: string | string[], + q: string, + analyzer: string, + analyze_wildcard: boolean, + default_operator: 'AND' | 'OR', + df: string, + lenient: boolean, + terminate_after: number, + body: object +}) ---- link:{ref}/search-count.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of indices to restrict the results +|`string \| string[]` - A comma-separated list of indices to restrict the results |`type` -|`string, string[]` - A comma-separated list of types to restrict the results +|`string \| string[]` - A comma-separated list of types to restrict the results |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -1018,7 +1285,7 @@ link:{ref}/search-count.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`min_score` or `minScore` @@ -1028,7 +1295,7 @@ _Default:_ `open` |`string` - Specify the node or shard the operation should be performed on (default: random) |`routing` -|`string, string[]` - A comma-separated list of specific routing values +|`string \| string[]` - A comma-separated list of specific routing values |`q` |`string` - Query in the Lucene query string syntax @@ -1040,7 +1307,7 @@ _Default:_ `open` |`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false) |`default_operator` or `defaultOperator` -|`'AND', 'OR'` - The default operator for query string query (AND or OR) + +|`'AND' \| 'OR'` - The default operator for query string query (AND or OR) + _Default:_ `OR` |`df` @@ -1058,9 +1325,21 @@ _Default:_ `OR` |=== === create -[source,js] +[source,ts] ---- -client.create([params] [, options] [, callback]) +client.create({ + id: string, + index: string, + type: string, + wait_for_active_shards: string, + refresh: 'true' | 'false' | 'wait_for', + routing: string, + timeout: string, + version: number, + version_type: 'internal' | 'external' | 'external_gte' | 'force', + pipeline: string, + body: object +}) ---- link:{ref}/docs-index_.html[Reference] [cols=2*] @@ -1078,7 +1357,7 @@ link:{ref}/docs-index_.html[Reference] |`string` - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) |`refresh` -|`'true', 'false', 'wait_for'` - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. |`routing` |`string` - Specific routing value @@ -1090,7 +1369,7 @@ link:{ref}/docs-index_.html[Reference] |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal', 'external', 'external_gte', 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type |`pipeline` |`string` - The pipeline id to preprocess incoming documents with @@ -1101,9 +1380,21 @@ link:{ref}/docs-index_.html[Reference] |=== === delete -[source,js] +[source,ts] ---- -client.delete([params] [, options] [, callback]) +client.delete({ + id: string, + index: string, + type: string, + wait_for_active_shards: string, + refresh: 'true' | 'false' | 'wait_for', + routing: string, + timeout: string, + if_seq_no: number, + if_primary_term: number, + version: number, + version_type: 'internal' | 'external' | 'external_gte' | 'force' +}) ---- link:{ref}/docs-delete.html[Reference] [cols=2*] @@ -1121,7 +1412,7 @@ link:{ref}/docs-delete.html[Reference] |`string` - Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) |`refresh` -|`'true', 'false', 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. |`routing` |`string` - Specific routing value @@ -1139,20 +1430,55 @@ link:{ref}/docs-delete.html[Reference] |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal', 'external', 'external_gte', 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type |=== === deleteByQuery -[source,js] +[source,ts] ---- -client.deleteByQuery([params] [, options] [, callback]) +client.deleteByQuery({ + index: string | string[], + analyzer: string, + analyze_wildcard: boolean, + default_operator: 'AND' | 'OR', + df: string, + from: number, + ignore_unavailable: boolean, + allow_no_indices: boolean, + conflicts: 'abort' | 'proceed', + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + lenient: boolean, + preference: string, + q: string, + routing: string | string[], + scroll: string, + search_type: 'query_then_fetch' | 'dfs_query_then_fetch', + search_timeout: string, + max_docs: number, + sort: string | string[], + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + terminate_after: number, + stats: string | string[], + version: boolean, + request_cache: boolean, + refresh: boolean, + timeout: string, + wait_for_active_shards: string, + scroll_size: number, + wait_for_completion: boolean, + requests_per_second: number, + slices: number, + body: object +}) ---- link:{ref}/docs-delete-by-query.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices |`analyzer` |`string` - The analyzer to use for the query string @@ -1161,7 +1487,7 @@ link:{ref}/docs-delete-by-query.html[Reference] |`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false) |`default_operator` or `defaultOperator` -|`'AND', 'OR'` - The default operator for query string query (AND or OR) + +|`'AND' \| 'OR'` - The default operator for query string query (AND or OR) + _Default:_ `OR` |`df` @@ -1177,11 +1503,11 @@ _Default:_ `OR` |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`conflicts` -|`'abort', 'proceed'` - What to do when the delete by query hits version conflicts? + +|`'abort' \| 'proceed'` - What to do when the delete by query hits version conflicts? + _Default:_ `abort` |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`lenient` @@ -1194,13 +1520,13 @@ _Default:_ `open` |`string` - Query in the Lucene query string syntax |`routing` -|`string, string[]` - A comma-separated list of specific routing values +|`string \| string[]` - A comma-separated list of specific routing values |`scroll` |`string` - Specify how long a consistent view of the index should be maintained for scrolled search |`search_type` or `searchType` -|`'query_then_fetch', 'dfs_query_then_fetch'` - Search operation type +|`'query_then_fetch' \| 'dfs_query_then_fetch'` - Search operation type |`search_timeout` or `searchTimeout` |`string` - Explicit timeout for each search request. Defaults to no timeout. @@ -1209,22 +1535,22 @@ _Default:_ `open` |`number` - Maximum number of documents to process (default: all documents) |`sort` -|`string, string[]` - A comma-separated list of : pairs +|`string \| string[]` - A comma-separated list of : pairs |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`terminate_after` or `terminateAfter` |`number` - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. |`stats` -|`string, string[]` - Specific 'tag' of the request for logging and statistical purposes +|`string \| string[]` - Specific 'tag' of the request for logging and statistical purposes |`version` |`boolean` - Specify whether to return document version as part of a hit @@ -1262,9 +1588,12 @@ _Default:_ `1` |=== === deleteByQueryRethrottle -[source,js] +[source,ts] ---- -client.deleteByQueryRethrottle([params] [, options] [, callback]) +client.deleteByQueryRethrottle({ + task_id: string, + requests_per_second: number +}) ---- link:{ref}/docs-delete-by-query.html[Reference] [cols=2*] @@ -1278,9 +1607,13 @@ link:{ref}/docs-delete-by-query.html[Reference] |=== === deleteScript -[source,js] +[source,ts] ---- -client.deleteScript([params] [, options] [, callback]) +client.deleteScript({ + id: string, + timeout: string, + master_timeout: string +}) ---- link:{ref}/modules-scripting.html[Reference] [cols=2*] @@ -1297,9 +1630,23 @@ link:{ref}/modules-scripting.html[Reference] |=== === exists -[source,js] +[source,ts] ---- -client.exists([params] [, options] [, callback]) +client.exists({ + id: string, + index: string, + type: string, + stored_fields: string | string[], + preference: string, + realtime: boolean, + refresh: boolean, + routing: string, + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + version: number, + version_type: 'internal' | 'external' | 'external_gte' | 'force' +}) ---- link:{ref}/docs-get.html[Reference] [cols=2*] @@ -1314,7 +1661,7 @@ link:{ref}/docs-get.html[Reference] |`string` - The type of the document (use `_all` to fetch the first document matching the ID across all types) |`stored_fields` or `storedFields` -|`string, string[]` - A comma-separated list of stored fields to return in the response +|`string \| string[]` - A comma-separated list of stored fields to return in the response |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) @@ -1329,26 +1676,39 @@ link:{ref}/docs-get.html[Reference] |`string` - Specific routing value |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`version` |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal', 'external', 'external_gte', 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type |=== === existsSource -[source,js] +[source,ts] ---- -client.existsSource([params] [, options] [, callback]) +client.existsSource({ + id: string, + index: string, + type: string, + preference: string, + realtime: boolean, + refresh: boolean, + routing: string, + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + version: number, + version_type: 'internal' | 'external' | 'external_gte' | 'force' +}) ---- link:{ref}/docs-get.html[Reference] [cols=2*] @@ -1375,26 +1735,43 @@ link:{ref}/docs-get.html[Reference] |`string` - Specific routing value |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`version` |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal', 'external', 'external_gte', 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type |=== === explain -[source,js] +[source,ts] ---- -client.explain([params] [, options] [, callback]) +client.explain({ + id: string, + index: string, + type: string, + analyze_wildcard: boolean, + analyzer: string, + default_operator: 'AND' | 'OR', + df: string, + stored_fields: string | string[], + lenient: boolean, + preference: string, + q: string, + routing: string, + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + body: object +}) ---- link:{ref}/search-explain.html[Reference] [cols=2*] @@ -1415,14 +1792,14 @@ link:{ref}/search-explain.html[Reference] |`string` - The analyzer for the query string query |`default_operator` or `defaultOperator` -|`'AND', 'OR'` - The default operator for query string query (AND or OR) + +|`'AND' \| 'OR'` - The default operator for query string query (AND or OR) + _Default:_ `OR` |`df` |`string` - The default field for query string query (default: _all) |`stored_fields` or `storedFields` -|`string, string[]` - A comma-separated list of stored fields to return in the response +|`string \| string[]` - A comma-separated list of stored fields to return in the response |`lenient` |`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored @@ -1437,13 +1814,13 @@ _Default:_ `OR` |`string` - Specific routing value |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`body` |`object` - The query definition using the Query DSL @@ -1451,18 +1828,25 @@ _Default:_ `OR` |=== === fieldCaps -[source,js] +[source,ts] ---- -client.fieldCaps([params] [, options] [, callback]) +client.fieldCaps({ + index: string | string[], + fields: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + include_unmapped: boolean +}) ---- link:{ref}/search-field-caps.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`fields` -|`string, string[]` - A comma-separated list of field names +|`string \| string[]` - A comma-separated list of field names |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -1471,7 +1855,7 @@ link:{ref}/search-field-caps.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`include_unmapped` or `includeUnmapped` @@ -1480,9 +1864,23 @@ _Default:_ `open` |=== === get -[source,js] +[source,ts] ---- -client.get([params] [, options] [, callback]) +client.get({ + id: string, + index: string, + type: string, + stored_fields: string | string[], + preference: string, + realtime: boolean, + refresh: boolean, + routing: string, + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + version: number, + version_type: 'internal' | 'external' | 'external_gte' | 'force' +}) ---- link:{ref}/docs-get.html[Reference] [cols=2*] @@ -1497,7 +1895,7 @@ link:{ref}/docs-get.html[Reference] |`string` - The type of the document (use `_all` to fetch the first document matching the ID across all types) |`stored_fields` or `storedFields` -|`string, string[]` - A comma-separated list of stored fields to return in the response +|`string \| string[]` - A comma-separated list of stored fields to return in the response |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) @@ -1512,26 +1910,29 @@ link:{ref}/docs-get.html[Reference] |`string` - Specific routing value |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`version` |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal', 'external', 'external_gte', 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type |=== === getScript -[source,js] +[source,ts] ---- -client.getScript([params] [, options] [, callback]) +client.getScript({ + id: string, + master_timeout: string +}) ---- link:{ref}/modules-scripting.html[Reference] [cols=2*] @@ -1545,9 +1946,22 @@ link:{ref}/modules-scripting.html[Reference] |=== === getSource -[source,js] +[source,ts] ---- -client.getSource([params] [, options] [, callback]) +client.getSource({ + id: string, + index: string, + type: string, + preference: string, + realtime: boolean, + refresh: boolean, + routing: string, + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + version: number, + version_type: 'internal' | 'external' | 'external_gte' | 'force' +}) ---- link:{ref}/docs-get.html[Reference] [cols=2*] @@ -1574,26 +1988,41 @@ link:{ref}/docs-get.html[Reference] |`string` - Specific routing value |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`version` |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal', 'external', 'external_gte', 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type |=== === index -[source,js] +[source,ts] ---- -client.index([params] [, options] [, callback]) +client.index({ + id: string, + index: string, + type: string, + wait_for_active_shards: string, + op_type: 'index' | 'create', + refresh: 'true' | 'false' | 'wait_for', + routing: string, + timeout: string, + version: number, + version_type: 'internal' | 'external' | 'external_gte' | 'force', + if_seq_no: number, + if_primary_term: number, + pipeline: string, + body: object +}) ---- link:{ref}/docs-index_.html[Reference] [cols=2*] @@ -1611,11 +2040,11 @@ link:{ref}/docs-index_.html[Reference] |`string` - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) |`op_type` or `opType` -|`'index', 'create'` - Explicit operation type + +|`'index' \| 'create'` - Explicit operation type + _Default:_ `index` |`refresh` -|`'true', 'false', 'wait_for'` - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. |`routing` |`string` - Specific routing value @@ -1627,7 +2056,7 @@ _Default:_ `index` |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal', 'external', 'external_gte', 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type |`if_seq_no` or `ifSeqNo` |`number` - only perform the index operation if the last operation that has changed the document has the specified sequence number @@ -1644,9 +2073,13 @@ _Default:_ `index` |=== === indices.analyze -[source,js] +[source,ts] ---- -client.indices.analyze([params] [, options] [, callback]) +client.indices.analyze({ + index: string, + index: string, + body: object +}) ---- link:{ref}/indices-analyze.html[Reference] [cols=2*] @@ -1663,21 +2096,31 @@ link:{ref}/indices-analyze.html[Reference] |=== === indices.clearCache -[source,js] +[source,ts] ---- -client.indices.clearCache([params] [, options] [, callback]) +client.indices.clearCache({ + index: string | string[], + fielddata: boolean, + fields: string | string[], + query: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + index: string | string[], + request: boolean +}) ---- link:{ref}/indices-clearcache.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index name to limit the operation +|`string \| string[]` - A comma-separated list of index name to limit the operation |`fielddata` |`boolean` - Clear field data |`fields` -|`string, string[]` - A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) +|`string \| string[]` - A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) |`query` |`boolean` - Clear query caches @@ -1689,11 +2132,11 @@ link:{ref}/indices-clearcache.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`index` -|`string, string[]` - A comma-separated list of index name to limit the operation +|`string \| string[]` - A comma-separated list of index name to limit the operation |`request` |`boolean` - Clear request cache @@ -1701,15 +2144,23 @@ _Default:_ `open` |=== === indices.close -[source,js] +[source,ts] ---- -client.indices.close([params] [, options] [, callback]) +client.indices.close({ + index: string | string[], + timeout: string, + master_timeout: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + wait_for_active_shards: string +}) ---- link:{ref}/indices-open-close.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma separated list of indices to close +|`string \| string[]` - A comma separated list of indices to close |`timeout` |`string` - Explicit operation timeout @@ -1724,7 +2175,7 @@ link:{ref}/indices-open-close.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`wait_for_active_shards` or `waitForActiveShards` @@ -1733,9 +2184,16 @@ _Default:_ `open` |=== === indices.create -[source,js] +[source,ts] ---- -client.indices.create([params] [, options] [, callback]) +client.indices.create({ + index: string, + include_type_name: boolean, + wait_for_active_shards: string, + timeout: string, + master_timeout: string, + body: object +}) ---- link:{ref}/indices-create-index.html[Reference] [cols=2*] @@ -1761,15 +2219,22 @@ link:{ref}/indices-create-index.html[Reference] |=== === indices.delete -[source,js] +[source,ts] ---- -client.indices.delete([params] [, options] [, callback]) +client.indices.delete({ + index: string | string[], + timeout: string, + master_timeout: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all' +}) ---- link:{ref}/indices-delete-index.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices +|`string \| string[]` - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices |`timeout` |`string` - Explicit operation timeout @@ -1784,24 +2249,29 @@ link:{ref}/indices-delete-index.html[Reference] |`boolean` - Ignore if a wildcard expression resolves to no concrete indices (default: false) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) + _Default:_ `open` |=== === indices.deleteAlias -[source,js] +[source,ts] ---- -client.indices.deleteAlias([params] [, options] [, callback]) +client.indices.deleteAlias({ + index: string | string[], + name: string | string[], + timeout: string, + master_timeout: string +}) ---- link:{ref}/indices-aliases.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names (supports wildcards); use `_all` for all indices +|`string \| string[]` - A comma-separated list of index names (supports wildcards); use `_all` for all indices |`name` -|`string, string[]` - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. +|`string \| string[]` - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. |`timeout` |`string` - Explicit timestamp for the document @@ -1812,9 +2282,13 @@ link:{ref}/indices-aliases.html[Reference] |=== === indices.deleteTemplate -[source,js] +[source,ts] ---- -client.indices.deleteTemplate([params] [, options] [, callback]) +client.indices.deleteTemplate({ + name: string, + timeout: string, + master_timeout: string +}) ---- link:{ref}/indices-templates.html[Reference] [cols=2*] @@ -1831,15 +2305,23 @@ link:{ref}/indices-templates.html[Reference] |=== === indices.exists -[source,js] +[source,ts] ---- -client.indices.exists([params] [, options] [, callback]) +client.indices.exists({ + index: string | string[], + local: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + flat_settings: boolean, + include_defaults: boolean +}) ---- link:{ref}/indices-exists.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names +|`string \| string[]` - A comma-separated list of index names |`local` |`boolean` - Return local information, do not retrieve the state from master node (default: false) @@ -1851,7 +2333,7 @@ link:{ref}/indices-exists.html[Reference] |`boolean` - Ignore if a wildcard expression resolves to no concrete indices (default: false) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) + _Default:_ `open` |`flat_settings` or `flatSettings` @@ -1863,18 +2345,25 @@ _Default:_ `open` |=== === indices.existsAlias -[source,js] +[source,ts] ---- -client.indices.existsAlias([params] [, options] [, callback]) +client.indices.existsAlias({ + index: string | string[], + name: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + local: boolean +}) ---- link:{ref}/indices-aliases.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to filter aliases +|`string \| string[]` - A comma-separated list of index names to filter aliases |`name` -|`string, string[]` - A comma-separated list of alias names to return +|`string \| string[]` - A comma-separated list of alias names to return |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -1883,7 +2372,7 @@ link:{ref}/indices-aliases.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `all` |`local` @@ -1892,15 +2381,20 @@ _Default:_ `all` |=== === indices.existsTemplate -[source,js] +[source,ts] ---- -client.indices.existsTemplate([params] [, options] [, callback]) +client.indices.existsTemplate({ + name: string | string[], + flat_settings: boolean, + master_timeout: string, + local: boolean +}) ---- link:{ref}/indices-templates.html[Reference] [cols=2*] |=== |`name` -|`string, string[]` - The comma separated names of the index templates +|`string \| string[]` - The comma separated names of the index templates |`flat_settings` or `flatSettings` |`boolean` - Return settings in flat format (default: false) @@ -1914,18 +2408,25 @@ link:{ref}/indices-templates.html[Reference] |=== === indices.existsType -[source,js] +[source,ts] ---- -client.indices.existsType([params] [, options] [, callback]) +client.indices.existsType({ + index: string | string[], + type: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + local: boolean +}) ---- link:{ref}/indices-types-exists.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` to check the types across all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` to check the types across all indices |`type` -|`string, string[]` - A comma-separated list of document types to check +|`string \| string[]` - A comma-separated list of document types to check |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -1934,7 +2435,7 @@ link:{ref}/indices-types-exists.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`local` @@ -1943,15 +2444,22 @@ _Default:_ `open` |=== === indices.flush -[source,js] +[source,ts] ---- -client.indices.flush([params] [, options] [, callback]) +client.indices.flush({ + index: string | string[], + force: boolean, + wait_if_ongoing: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all' +}) ---- link:{ref}/indices-flush.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string for all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string for all indices |`force` |`boolean` - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) @@ -1966,21 +2474,26 @@ link:{ref}/indices-flush.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |=== === indices.flushSynced -[source,js] +[source,ts] ---- -client.indices.flushSynced([params] [, options] [, callback]) +client.indices.flushSynced({ + index: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all' +}) ---- -link:{ref}/indices-synced-flush.html[Reference] +link:{ref}/indices-flush.html#synced-flush-api[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string for all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string for all indices |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -1989,21 +2502,29 @@ link:{ref}/indices-synced-flush.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |=== === indices.forcemerge -[source,js] +[source,ts] ---- -client.indices.forcemerge([params] [, options] [, callback]) +client.indices.forcemerge({ + index: string | string[], + flush: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + max_num_segments: number, + only_expunge_deletes: boolean +}) ---- link:{ref}/indices-forcemerge.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`flush` |`boolean` - Specify whether the index should be flushed after performing the operation (default: true) @@ -2015,7 +2536,7 @@ link:{ref}/indices-forcemerge.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`max_num_segments` or `maxNumSegments` @@ -2027,15 +2548,25 @@ _Default:_ `open` |=== === indices.get -[source,js] +[source,ts] ---- -client.indices.get([params] [, options] [, callback]) +client.indices.get({ + index: string | string[], + include_type_name: boolean, + local: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + flat_settings: boolean, + include_defaults: boolean, + master_timeout: string +}) ---- link:{ref}/indices-get-index.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names +|`string \| string[]` - A comma-separated list of index names |`include_type_name` or `includeTypeName` |`boolean` - Whether to add the type name to the response (default: false) @@ -2050,7 +2581,7 @@ link:{ref}/indices-get-index.html[Reference] |`boolean` - Ignore if a wildcard expression resolves to no concrete indices (default: false) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) + _Default:_ `open` |`flat_settings` or `flatSettings` @@ -2065,18 +2596,25 @@ _Default:_ `open` |=== === indices.getAlias -[source,js] +[source,ts] ---- -client.indices.getAlias([params] [, options] [, callback]) +client.indices.getAlias({ + index: string | string[], + name: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + local: boolean +}) ---- link:{ref}/indices-aliases.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to filter aliases +|`string \| string[]` - A comma-separated list of index names to filter aliases |`name` -|`string, string[]` - A comma-separated list of alias names to return +|`string \| string[]` - A comma-separated list of alias names to return |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -2085,7 +2623,7 @@ link:{ref}/indices-aliases.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `all` |`local` @@ -2094,21 +2632,31 @@ _Default:_ `all` |=== === indices.getFieldMapping -[source,js] +[source,ts] ---- -client.indices.getFieldMapping([params] [, options] [, callback]) +client.indices.getFieldMapping({ + index: string | string[], + type: string | string[], + fields: string | string[], + include_type_name: boolean, + include_defaults: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + local: boolean +}) ---- link:{ref}/indices-get-field-mapping.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names +|`string \| string[]` - A comma-separated list of index names |`type` -|`string, string[]` - A comma-separated list of document types +|`string \| string[]` - A comma-separated list of document types |`fields` -|`string, string[]` - A comma-separated list of fields +|`string \| string[]` - A comma-separated list of fields |`include_type_name` or `includeTypeName` |`boolean` - Whether a type should be returned in the body of the mappings. @@ -2123,7 +2671,7 @@ link:{ref}/indices-get-field-mapping.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`local` @@ -2132,18 +2680,27 @@ _Default:_ `open` |=== === indices.getMapping -[source,js] +[source,ts] ---- -client.indices.getMapping([params] [, options] [, callback]) +client.indices.getMapping({ + index: string | string[], + type: string | string[], + include_type_name: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + master_timeout: string, + local: boolean +}) ---- link:{ref}/indices-get-mapping.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names +|`string \| string[]` - A comma-separated list of index names |`type` -|`string, string[]` - A comma-separated list of document types +|`string \| string[]` - A comma-separated list of document types |`include_type_name` or `includeTypeName` |`boolean` - Whether to add the type name to the response (default: false) @@ -2155,7 +2712,7 @@ link:{ref}/indices-get-mapping.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`master_timeout` or `masterTimeout` @@ -2167,18 +2724,28 @@ _Default:_ `open` |=== === indices.getSettings -[source,js] +[source,ts] ---- -client.indices.getSettings([params] [, options] [, callback]) +client.indices.getSettings({ + index: string | string[], + name: string | string[], + master_timeout: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + flat_settings: boolean, + local: boolean, + include_defaults: boolean +}) ---- link:{ref}/indices-get-settings.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`name` -|`string, string[]` - The name of the settings that should be included +|`string \| string[]` - The name of the settings that should be included |`master_timeout` or `masterTimeout` |`string` - Specify timeout for connection to master @@ -2190,7 +2757,7 @@ link:{ref}/indices-get-settings.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open,closed` |`flat_settings` or `flatSettings` @@ -2205,15 +2772,21 @@ _Default:_ `open,closed` |=== === indices.getTemplate -[source,js] +[source,ts] ---- -client.indices.getTemplate([params] [, options] [, callback]) +client.indices.getTemplate({ + name: string | string[], + include_type_name: boolean, + flat_settings: boolean, + master_timeout: string, + local: boolean +}) ---- link:{ref}/indices-templates.html[Reference] [cols=2*] |=== |`name` -|`string, string[]` - The comma separated names of the index templates +|`string \| string[]` - The comma separated names of the index templates |`include_type_name` or `includeTypeName` |`boolean` - Whether a type should be returned in the body of the mappings. @@ -2230,15 +2803,20 @@ link:{ref}/indices-templates.html[Reference] |=== === indices.getUpgrade -[source,js] +[source,ts] ---- -client.indices.getUpgrade([params] [, options] [, callback]) +client.indices.getUpgrade({ + index: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all' +}) ---- link:{ref}/indices-upgrade.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -2247,21 +2825,29 @@ link:{ref}/indices-upgrade.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |=== === indices.open -[source,js] +[source,ts] ---- -client.indices.open([params] [, options] [, callback]) +client.indices.open({ + index: string | string[], + timeout: string, + master_timeout: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + wait_for_active_shards: string +}) ---- link:{ref}/indices-open-close.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma separated list of indices to open +|`string \| string[]` - A comma separated list of indices to open |`timeout` |`string` - Explicit operation timeout @@ -2276,7 +2862,7 @@ link:{ref}/indices-open-close.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `closed` |`wait_for_active_shards` or `waitForActiveShards` @@ -2285,15 +2871,21 @@ _Default:_ `closed` |=== === indices.putAlias -[source,js] +[source,ts] ---- -client.indices.putAlias([params] [, options] [, callback]) +client.indices.putAlias({ + index: string | string[], + name: string, + timeout: string, + master_timeout: string, + body: object +}) ---- link:{ref}/indices-aliases.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. +|`string \| string[]` - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. |`name` |`string` - The name of the alias to be created or updated @@ -2310,15 +2902,25 @@ link:{ref}/indices-aliases.html[Reference] |=== === indices.putMapping -[source,js] +[source,ts] ---- -client.indices.putMapping([params] [, options] [, callback]) +client.indices.putMapping({ + index: string | string[], + type: string, + include_type_name: boolean, + timeout: string, + master_timeout: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + body: object +}) ---- link:{ref}/indices-put-mapping.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. +|`string \| string[]` - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. |`type` |`string` - The name of the document type @@ -2339,7 +2941,7 @@ link:{ref}/indices-put-mapping.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`body` @@ -2348,15 +2950,25 @@ _Default:_ `open` |=== === indices.putSettings -[source,js] +[source,ts] ---- -client.indices.putSettings([params] [, options] [, callback]) +client.indices.putSettings({ + index: string | string[], + master_timeout: string, + timeout: string, + preserve_existing: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + flat_settings: boolean, + body: object +}) ---- link:{ref}/indices-update-settings.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`master_timeout` or `masterTimeout` |`string` - Specify timeout for connection to master @@ -2374,7 +2986,7 @@ link:{ref}/indices-update-settings.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`flat_settings` or `flatSettings` @@ -2386,9 +2998,18 @@ _Default:_ `open` |=== === indices.putTemplate -[source,js] +[source,ts] ---- -client.indices.putTemplate([params] [, options] [, callback]) +client.indices.putTemplate({ + name: string, + include_type_name: boolean, + order: number, + create: boolean, + timeout: string, + master_timeout: string, + flat_settings: boolean, + body: object +}) ---- link:{ref}/indices-templates.html[Reference] [cols=2*] @@ -2420,15 +3041,19 @@ link:{ref}/indices-templates.html[Reference] |=== === indices.recovery -[source,js] +[source,ts] ---- -client.indices.recovery([params] [, options] [, callback]) +client.indices.recovery({ + index: string | string[], + detailed: boolean, + active_only: boolean +}) ---- link:{ref}/indices-recovery.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`detailed` |`boolean` - Whether to display detailed information about shard recovery @@ -2439,15 +3064,20 @@ link:{ref}/indices-recovery.html[Reference] |=== === indices.refresh -[source,js] +[source,ts] ---- -client.indices.refresh([params] [, options] [, callback]) +client.indices.refresh({ + index: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all' +}) ---- link:{ref}/indices-refresh.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -2456,15 +3086,24 @@ link:{ref}/indices-refresh.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |=== === indices.rollover -[source,js] +[source,ts] ---- -client.indices.rollover([params] [, options] [, callback]) +client.indices.rollover({ + alias: string, + new_index: string, + include_type_name: boolean, + timeout: string, + dry_run: boolean, + master_timeout: string, + wait_for_active_shards: string, + body: object +}) ---- link:{ref}/indices-rollover-index.html[Reference] [cols=2*] @@ -2496,15 +3135,21 @@ link:{ref}/indices-rollover-index.html[Reference] |=== === indices.segments -[source,js] +[source,ts] ---- -client.indices.segments([params] [, options] [, callback]) +client.indices.segments({ + index: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + verbose: boolean +}) ---- link:{ref}/indices-segments.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -2513,7 +3158,7 @@ link:{ref}/indices-segments.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`verbose` @@ -2522,18 +3167,24 @@ _Default:_ `open` |=== === indices.shardStores -[source,js] +[source,ts] ---- -client.indices.shardStores([params] [, options] [, callback]) +client.indices.shardStores({ + index: string | string[], + status: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all' +}) ---- link:{ref}/indices-shards-stores.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`status` -|`string, string[]` - A comma-separated list of statuses used to filter on shards to get store information for +|`string \| string[]` - A comma-separated list of statuses used to filter on shards to get store information for |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -2542,15 +3193,22 @@ link:{ref}/indices-shards-stores.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |=== === indices.shrink -[source,js] +[source,ts] ---- -client.indices.shrink([params] [, options] [, callback]) +client.indices.shrink({ + index: string, + target: string, + timeout: string, + master_timeout: string, + wait_for_active_shards: string, + body: object +}) ---- link:{ref}/indices-shrink-index.html[Reference] [cols=2*] @@ -2576,9 +3234,16 @@ link:{ref}/indices-shrink-index.html[Reference] |=== === indices.split -[source,js] +[source,ts] ---- -client.indices.split([params] [, options] [, callback]) +client.indices.split({ + index: string, + target: string, + timeout: string, + master_timeout: string, + wait_for_active_shards: string, + body: object +}) ---- link:{ref}/indices-split-index.html[Reference] [cols=2*] @@ -2604,37 +3269,50 @@ link:{ref}/indices-split-index.html[Reference] |=== === indices.stats -[source,js] +[source,ts] ---- -client.indices.stats([params] [, options] [, callback]) +client.indices.stats({ + index: string | string[], + metric: string | string[], + completion_fields: string | string[], + fielddata_fields: string | string[], + fields: string | string[], + groups: string | string[], + level: 'cluster' | 'indices' | 'shards', + types: string | string[], + include_segment_file_sizes: boolean, + include_unloaded_segments: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + forbid_closed_indices: boolean +}) ---- link:{ref}/indices-stats.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`metric` -|`string, string[]` - Limit the information returned the specific metrics. +|`string \| string[]` - Limit the information returned the specific metrics. |`completion_fields` or `completionFields` -|`string, string[]` - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) +|`string \| string[]` - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) |`fielddata_fields` or `fielddataFields` -|`string, string[]` - A comma-separated list of fields for `fielddata` index metric (supports wildcards) +|`string \| string[]` - A comma-separated list of fields for `fielddata` index metric (supports wildcards) |`fields` -|`string, string[]` - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) +|`string \| string[]` - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) |`groups` -|`string, string[]` - A comma-separated list of search groups for `search` index metric +|`string \| string[]` - A comma-separated list of search groups for `search` index metric |`level` -|`'cluster', 'indices', 'shards'` - Return stats aggregated at cluster, index or shard level + +|`'cluster' \| 'indices' \| 'shards'` - Return stats aggregated at cluster, index or shard level + _Default:_ `indices` |`types` -|`string, string[]` - A comma-separated list of document types for the `indexing` index metric +|`string \| string[]` - A comma-separated list of document types for the `indexing` index metric |`include_segment_file_sizes` or `includeSegmentFileSizes` |`boolean` - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) @@ -2643,7 +3321,7 @@ _Default:_ `indices` |`boolean` - If set to true segment stats will include stats for segments that are not currently loaded into memory |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`forbid_closed_indices` or `forbidClosedIndices` @@ -2653,9 +3331,13 @@ _Default:_ `true` |=== === indices.updateAliases -[source,js] +[source,ts] ---- -client.indices.updateAliases([params] [, options] [, callback]) +client.indices.updateAliases({ + timeout: string, + master_timeout: string, + body: object +}) ---- link:{ref}/indices-aliases.html[Reference] [cols=2*] @@ -2672,21 +3354,28 @@ link:{ref}/indices-aliases.html[Reference] |=== === indices.upgrade -[source,js] +[source,ts] ---- -client.indices.upgrade([params] [, options] [, callback]) +client.indices.upgrade({ + index: string | string[], + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + ignore_unavailable: boolean, + wait_for_completion: boolean, + only_ancient_segments: boolean +}) ---- link:{ref}/indices-upgrade.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices |`allow_no_indices` or `allowNoIndices` |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`ignore_unavailable` or `ignoreUnavailable` @@ -2701,18 +3390,34 @@ _Default:_ `open` |=== === indices.validateQuery -[source,js] +[source,ts] ---- -client.indices.validateQuery([params] [, options] [, callback]) +client.indices.validateQuery({ + index: string | string[], + type: string | string[], + explain: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + q: string, + analyzer: string, + analyze_wildcard: boolean, + default_operator: 'AND' | 'OR', + df: string, + lenient: boolean, + rewrite: boolean, + all_shards: boolean, + body: object +}) ---- link:{ref}/search-validate.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices |`type` -|`string, string[]` - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types +|`string \| string[]` - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types |`explain` |`boolean` - Return detailed information about the error @@ -2724,7 +3429,7 @@ link:{ref}/search-validate.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`q` @@ -2737,7 +3442,7 @@ _Default:_ `open` |`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false) |`default_operator` or `defaultOperator` -|`'AND', 'OR'` - The default operator for query string query (AND or OR) + +|`'AND' \| 'OR'` - The default operator for query string query (AND or OR) + _Default:_ `OR` |`df` @@ -2758,17 +3463,21 @@ _Default:_ `OR` |=== === info -[source,js] +[source,ts] ---- -client.info([params] [, options] [, callback]) +client.info() ---- link:http://www.elastic.co/guide/[Reference] === ingest.deletePipeline -[source,js] +[source,ts] ---- -client.ingest.deletePipeline([params] [, options] [, callback]) +client.ingest.deletePipeline({ + id: string, + master_timeout: string, + timeout: string +}) ---- link:{ref}/delete-pipeline-api.html[Reference] [cols=2*] @@ -2785,9 +3494,12 @@ link:{ref}/delete-pipeline-api.html[Reference] |=== === ingest.getPipeline -[source,js] +[source,ts] ---- -client.ingest.getPipeline([params] [, options] [, callback]) +client.ingest.getPipeline({ + id: string, + master_timeout: string +}) ---- link:{ref}/get-pipeline-api.html[Reference] [cols=2*] @@ -2801,17 +3513,22 @@ link:{ref}/get-pipeline-api.html[Reference] |=== === ingest.processorGrok -[source,js] +[source,ts] ---- -client.ingest.processorGrok([params] [, options] [, callback]) +client.ingest.processorGrok() ---- link:{ref}/grok-processor.html#grok-processor-rest-get[Reference] === ingest.putPipeline -[source,js] +[source,ts] ---- -client.ingest.putPipeline([params] [, options] [, callback]) +client.ingest.putPipeline({ + id: string, + master_timeout: string, + timeout: string, + body: object +}) ---- link:{ref}/put-pipeline-api.html[Reference] [cols=2*] @@ -2831,9 +3548,13 @@ link:{ref}/put-pipeline-api.html[Reference] |=== === ingest.simulate -[source,js] +[source,ts] ---- -client.ingest.simulate([params] [, options] [, callback]) +client.ingest.simulate({ + id: string, + verbose: boolean, + body: object +}) ---- link:{ref}/simulate-pipeline-api.html[Reference] [cols=2*] @@ -2850,9 +3571,21 @@ link:{ref}/simulate-pipeline-api.html[Reference] |=== === mget -[source,js] +[source,ts] ---- -client.mget([params] [, options] [, callback]) +client.mget({ + index: string, + type: string, + stored_fields: string | string[], + preference: string, + realtime: boolean, + refresh: boolean, + routing: string, + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + body: object +}) ---- link:{ref}/docs-multi-get.html[Reference] [cols=2*] @@ -2864,7 +3597,7 @@ link:{ref}/docs-multi-get.html[Reference] |`string` - The type of the document |`stored_fields` or `storedFields` -|`string, string[]` - A comma-separated list of stored fields to return in the response +|`string \| string[]` - A comma-separated list of stored fields to return in the response |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) @@ -2879,13 +3612,13 @@ link:{ref}/docs-multi-get.html[Reference] |`string` - Specific routing value |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`body` |`object` - Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. @@ -2893,18 +3626,28 @@ link:{ref}/docs-multi-get.html[Reference] |=== === msearch -[source,js] +[source,ts] ---- -client.msearch([params] [, options] [, callback]) +client.msearch({ + index: string | string[], + search_type: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch', + max_concurrent_searches: number, + typed_keys: boolean, + pre_filter_shard_size: number, + max_concurrent_shard_requests: number, + rest_total_hits_as_int: boolean, + ccs_minimize_roundtrips: boolean, + body: object +}) ---- link:{ref}/search-multi-search.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to use as default +|`string \| string[]` - A comma-separated list of index names to use as default |`search_type` or `searchType` -|`'query_then_fetch', 'query_and_fetch', 'dfs_query_then_fetch', 'dfs_query_and_fetch'` - Search operation type +|`'query_then_fetch' \| 'query_and_fetch' \| 'dfs_query_then_fetch' \| 'dfs_query_and_fetch'` - Search operation type |`max_concurrent_searches` or `maxConcurrentSearches` |`number` - Controls the maximum number of concurrent searches the multi search api will execute @@ -2933,18 +3676,26 @@ _Default:_ `true` |=== === msearchTemplate -[source,js] +[source,ts] ---- -client.msearchTemplate([params] [, options] [, callback]) +client.msearchTemplate({ + index: string | string[], + search_type: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch', + typed_keys: boolean, + max_concurrent_searches: number, + rest_total_hits_as_int: boolean, + ccs_minimize_roundtrips: boolean, + body: object +}) ---- link:{ref}/search-multi-search.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to use as default +|`string \| string[]` - A comma-separated list of index names to use as default |`search_type` or `searchType` -|`'query_then_fetch', 'query_and_fetch', 'dfs_query_then_fetch', 'dfs_query_and_fetch'` - Search operation type +|`'query_then_fetch' \| 'query_and_fetch' \| 'dfs_query_then_fetch' \| 'dfs_query_and_fetch'` - Search operation type |`typed_keys` or `typedKeys` |`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response @@ -2965,9 +3716,24 @@ _Default:_ `true` |=== === mtermvectors -[source,js] +[source,ts] ---- -client.mtermvectors([params] [, options] [, callback]) +client.mtermvectors({ + index: string, + ids: string | string[], + term_statistics: boolean, + field_statistics: boolean, + fields: string | string[], + offsets: boolean, + positions: boolean, + payloads: boolean, + preference: string, + routing: string, + realtime: boolean, + version: number, + version_type: 'internal' | 'external' | 'external_gte' | 'force', + body: object +}) ---- link:{ref}/docs-multi-termvectors.html[Reference] [cols=2*] @@ -2976,7 +3742,7 @@ link:{ref}/docs-multi-termvectors.html[Reference] |`string` - The index in which the document resides. |`ids` -|`string, string[]` - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body +|`string \| string[]` - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body |`term_statistics` or `termStatistics` |`boolean` - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". @@ -2986,7 +3752,7 @@ link:{ref}/docs-multi-termvectors.html[Reference] _Default:_ `true` |`fields` -|`string, string[]` - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". +|`string \| string[]` - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". |`offsets` |`boolean` - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + @@ -3013,7 +3779,7 @@ _Default:_ `true` |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal', 'external', 'external_gte', 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type |`body` |`object` - Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. @@ -3021,15 +3787,23 @@ _Default:_ `true` |=== === nodes.hotThreads -[source,js] +[source,ts] ---- -client.nodes.hotThreads([params] [, options] [, callback]) +client.nodes.hotThreads({ + node_id: string | string[], + interval: string, + snapshots: number, + threads: number, + ignore_idle_threads: boolean, + type: 'cpu' | 'wait' | 'block', + timeout: string +}) ---- link:{ref}/cluster-nodes-hot-threads.html[Reference] [cols=2*] |=== |`node_id` or `nodeId` -|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +|`string \| string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes |`interval` |`string` - The interval for the second sampling of threads @@ -3044,7 +3818,7 @@ link:{ref}/cluster-nodes-hot-threads.html[Reference] |`boolean` - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) |`type` -|`'cpu', 'wait', 'block'` - The type to sample (default: cpu) +|`'cpu' \| 'wait' \| 'block'` - The type to sample (default: cpu) |`timeout` |`string` - Explicit operation timeout @@ -3052,18 +3826,23 @@ link:{ref}/cluster-nodes-hot-threads.html[Reference] |=== === nodes.info -[source,js] +[source,ts] ---- -client.nodes.info([params] [, options] [, callback]) +client.nodes.info({ + node_id: string | string[], + metric: string | string[], + flat_settings: boolean, + timeout: string +}) ---- link:{ref}/cluster-nodes-info.html[Reference] [cols=2*] |=== |`node_id` or `nodeId` -|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +|`string \| string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes |`metric` -|`string, string[]` - A comma-separated list of metrics you wish returned. Leave empty to return all. +|`string \| string[]` - A comma-separated list of metrics you wish returned. Leave empty to return all. |`flat_settings` or `flatSettings` |`boolean` - Return settings in flat format (default: false) @@ -3074,15 +3853,18 @@ link:{ref}/cluster-nodes-info.html[Reference] |=== === nodes.reloadSecureSettings -[source,js] +[source,ts] ---- -client.nodes.reloadSecureSettings([params] [, options] [, callback]) +client.nodes.reloadSecureSettings({ + node_id: string | string[], + timeout: string +}) ---- link:{ref}/secure-settings.html#reloadable-secure-settings[Reference] [cols=2*] |=== |`node_id` or `nodeId` -|`string, string[]` - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. +|`string \| string[]` - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. |`timeout` |`string` - Explicit operation timeout @@ -3090,40 +3872,52 @@ link:{ref}/secure-settings.html#reloadable-secure-settings[Reference] |=== === nodes.stats -[source,js] +[source,ts] ---- -client.nodes.stats([params] [, options] [, callback]) +client.nodes.stats({ + metric: string | string[], + index_metric: string | string[], + node_id: string | string[], + completion_fields: string | string[], + fielddata_fields: string | string[], + fields: string | string[], + groups: boolean, + level: 'indices' | 'node' | 'shards', + types: string | string[], + timeout: string, + include_segment_file_sizes: boolean +}) ---- link:{ref}/cluster-nodes-stats.html[Reference] [cols=2*] |=== |`metric` -|`string, string[]` - Limit the information returned to the specified metrics +|`string \| string[]` - Limit the information returned to the specified metrics |`index_metric` or `indexMetric` -|`string, string[]` - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. +|`string \| string[]` - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. |`node_id` or `nodeId` -|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +|`string \| string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes |`completion_fields` or `completionFields` -|`string, string[]` - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) +|`string \| string[]` - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) |`fielddata_fields` or `fielddataFields` -|`string, string[]` - A comma-separated list of fields for `fielddata` index metric (supports wildcards) +|`string \| string[]` - A comma-separated list of fields for `fielddata` index metric (supports wildcards) |`fields` -|`string, string[]` - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) +|`string \| string[]` - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) |`groups` |`boolean` - A comma-separated list of search groups for `search` index metric |`level` -|`'indices', 'node', 'shards'` - Return indices stats aggregated at index, node or shard level + +|`'indices' \| 'node' \| 'shards'` - Return indices stats aggregated at index, node or shard level + _Default:_ `node` |`types` -|`string, string[]` - A comma-separated list of document types for the `indexing` index metric +|`string \| string[]` - A comma-separated list of document types for the `indexing` index metric |`timeout` |`string` - Explicit operation timeout @@ -3134,18 +3928,22 @@ _Default:_ `node` |=== === nodes.usage -[source,js] +[source,ts] ---- -client.nodes.usage([params] [, options] [, callback]) +client.nodes.usage({ + metric: string | string[], + node_id: string | string[], + timeout: string +}) ---- link:{ref}/cluster-nodes-usage.html[Reference] [cols=2*] |=== |`metric` -|`string, string[]` - Limit the information returned to the specified metrics +|`string \| string[]` - Limit the information returned to the specified metrics |`node_id` or `nodeId` -|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +|`string \| string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes |`timeout` |`string` - Explicit operation timeout @@ -3153,17 +3951,24 @@ link:{ref}/cluster-nodes-usage.html[Reference] |=== === ping -[source,js] +[source,ts] ---- -client.ping([params] [, options] [, callback]) +client.ping() ---- link:http://www.elastic.co/guide/[Reference] === putScript -[source,js] +[source,ts] ---- -client.putScript([params] [, options] [, callback]) +client.putScript({ + id: string, + context: string, + timeout: string, + master_timeout: string, + context: string, + body: object +}) ---- link:{ref}/modules-scripting.html[Reference] [cols=2*] @@ -3189,15 +3994,21 @@ link:{ref}/modules-scripting.html[Reference] |=== === rankEval -[source,js] +[source,ts] ---- -client.rankEval([params] [, options] [, callback]) +client.rankEval({ + index: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + body: object +}) ---- link:{ref}/search-rank-eval.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -3206,7 +4017,7 @@ link:{ref}/search-rank-eval.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`body` @@ -3215,9 +4026,19 @@ _Default:_ `open` |=== === reindex -[source,js] +[source,ts] ---- -client.reindex([params] [, options] [, callback]) +client.reindex({ + refresh: boolean, + timeout: string, + wait_for_active_shards: string, + wait_for_completion: boolean, + requests_per_second: number, + scroll: string, + slices: number, + max_docs: number, + body: object +}) ---- link:{ref}/docs-reindex.html[Reference] [cols=2*] @@ -3256,9 +4077,12 @@ _Default:_ `1` |=== === reindexRethrottle -[source,js] +[source,ts] ---- -client.reindexRethrottle([params] [, options] [, callback]) +client.reindexRethrottle({ + task_id: string, + requests_per_second: number +}) ---- link:{ref}/docs-reindex.html[Reference] [cols=2*] @@ -3272,9 +4096,12 @@ link:{ref}/docs-reindex.html[Reference] |=== === renderSearchTemplate -[source,js] +[source,ts] ---- -client.renderSearchTemplate([params] [, options] [, callback]) +client.renderSearchTemplate({ + id: string, + body: object +}) ---- link:{ref}/search-template.html[Reference] [cols=2*] @@ -3288,9 +4115,11 @@ link:{ref}/search-template.html[Reference] |=== === scriptsPainlessExecute -[source,js] +[source,ts] ---- -client.scriptsPainlessExecute([params] [, options] [, callback]) +client.scriptsPainlessExecute({ + body: object +}) ---- link:https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html[Reference] [cols=2*] @@ -3301,11 +4130,17 @@ link:https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-exec |=== === scroll -[source,js] +[source,ts] ---- -client.scroll([params] [, options] [, callback]) +client.scroll({ + scroll_id: string, + scroll: string, + scroll_id: string, + rest_total_hits_as_int: boolean, + body: object +}) ---- -link:{ref}/search-request-scroll.html[Reference] +link:{ref}/search-request-body.html#request-body-search-scroll[Reference] [cols=2*] |=== |`scroll_id` or `scrollId` @@ -3326,15 +4161,60 @@ link:{ref}/search-request-scroll.html[Reference] |=== === search -[source,js] +[source,ts] ---- -client.search([params] [, options] [, callback]) +client.search({ + index: string | string[], + analyzer: string, + analyze_wildcard: boolean, + ccs_minimize_roundtrips: boolean, + default_operator: 'AND' | 'OR', + df: string, + explain: boolean, + stored_fields: string | string[], + docvalue_fields: string | string[], + from: number, + ignore_unavailable: boolean, + ignore_throttled: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + lenient: boolean, + preference: string, + q: string, + routing: string | string[], + scroll: string, + search_type: 'query_then_fetch' | 'dfs_query_then_fetch', + size: number, + sort: string | string[], + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + terminate_after: number, + stats: string | string[], + suggest_field: string, + suggest_mode: 'missing' | 'popular' | 'always', + suggest_size: number, + suggest_text: string, + timeout: string, + track_scores: boolean, + track_total_hits: boolean, + allow_partial_search_results: boolean, + typed_keys: boolean, + version: boolean, + seq_no_primary_term: boolean, + request_cache: boolean, + batched_reduce_size: number, + max_concurrent_shard_requests: number, + pre_filter_shard_size: number, + rest_total_hits_as_int: boolean, + body: object +}) ---- link:{ref}/search-search.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices |`analyzer` |`string` - The analyzer to use for the query string @@ -3347,7 +4227,7 @@ link:{ref}/search-search.html[Reference] _Default:_ `true` |`default_operator` or `defaultOperator` -|`'AND', 'OR'` - The default operator for query string query (AND or OR) + +|`'AND' \| 'OR'` - The default operator for query string query (AND or OR) + _Default:_ `OR` |`df` @@ -3357,10 +4237,10 @@ _Default:_ `OR` |`boolean` - Specify whether to return detailed information about score computation as part of a hit |`stored_fields` or `storedFields` -|`string, string[]` - A comma-separated list of stored fields to return as part of a hit +|`string \| string[]` - A comma-separated list of stored fields to return as part of a hit |`docvalue_fields` or `docvalueFields` -|`string, string[]` - A comma-separated list of fields to return as the docvalue representation of a field for each hit +|`string \| string[]` - A comma-separated list of fields to return as the docvalue representation of a field for each hit |`from` |`number` - Starting offset (default: 0) @@ -3375,7 +4255,7 @@ _Default:_ `OR` |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`lenient` @@ -3388,40 +4268,40 @@ _Default:_ `open` |`string` - Query in the Lucene query string syntax |`routing` -|`string, string[]` - A comma-separated list of specific routing values +|`string \| string[]` - A comma-separated list of specific routing values |`scroll` |`string` - Specify how long a consistent view of the index should be maintained for scrolled search |`search_type` or `searchType` -|`'query_then_fetch', 'dfs_query_then_fetch'` - Search operation type +|`'query_then_fetch' \| 'dfs_query_then_fetch'` - Search operation type |`size` |`number` - Number of hits to return (default: 10) |`sort` -|`string, string[]` - A comma-separated list of : pairs +|`string \| string[]` - A comma-separated list of : pairs |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`terminate_after` or `terminateAfter` |`number` - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. |`stats` -|`string, string[]` - Specific 'tag' of the request for logging and statistical purposes +|`string \| string[]` - Specific 'tag' of the request for logging and statistical purposes |`suggest_field` or `suggestField` |`string` - Specify which field to use for suggestions |`suggest_mode` or `suggestMode` -|`'missing', 'popular', 'always'` - Specify suggest mode + +|`'missing' \| 'popular' \| 'always'` - Specify suggest mode + _Default:_ `missing` |`suggest_size` or `suggestSize` @@ -3476,15 +4356,23 @@ _Default:_ `128` |=== === searchShards -[source,js] +[source,ts] ---- -client.searchShards([params] [, options] [, callback]) +client.searchShards({ + index: string | string[], + preference: string, + routing: string, + local: boolean, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all' +}) ---- link:{ref}/search-shards.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) @@ -3502,21 +4390,37 @@ link:{ref}/search-shards.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |=== === searchTemplate -[source,js] +[source,ts] ---- -client.searchTemplate([params] [, options] [, callback]) +client.searchTemplate({ + index: string | string[], + ignore_unavailable: boolean, + ignore_throttled: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + preference: string, + routing: string | string[], + scroll: string, + search_type: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch', + explain: boolean, + profile: boolean, + typed_keys: boolean, + rest_total_hits_as_int: boolean, + ccs_minimize_roundtrips: boolean, + body: object +}) ---- link:{ref}/search-template.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -3528,20 +4432,20 @@ link:{ref}/search-template.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) |`routing` -|`string, string[]` - A comma-separated list of specific routing values +|`string \| string[]` - A comma-separated list of specific routing values |`scroll` |`string` - Specify how long a consistent view of the index should be maintained for scrolled search |`search_type` or `searchType` -|`'query_then_fetch', 'query_and_fetch', 'dfs_query_then_fetch', 'dfs_query_and_fetch'` - Search operation type +|`'query_then_fetch' \| 'query_and_fetch' \| 'dfs_query_then_fetch' \| 'dfs_query_and_fetch'` - Search operation type |`explain` |`boolean` - Specify whether to return detailed information about score computation as part of a hit @@ -3565,9 +4469,15 @@ _Default:_ `true` |=== === snapshot.create -[source,js] +[source,ts] ---- -client.snapshot.create([params] [, options] [, callback]) +client.snapshot.create({ + repository: string, + snapshot: string, + master_timeout: string, + wait_for_completion: boolean, + body: object +}) ---- link:{ref}/modules-snapshots.html[Reference] [cols=2*] @@ -3590,9 +4500,15 @@ link:{ref}/modules-snapshots.html[Reference] |=== === snapshot.createRepository -[source,js] +[source,ts] ---- -client.snapshot.createRepository([params] [, options] [, callback]) +client.snapshot.createRepository({ + repository: string, + master_timeout: string, + timeout: string, + verify: boolean, + body: object +}) ---- link:{ref}/modules-snapshots.html[Reference] [cols=2*] @@ -3615,9 +4531,13 @@ link:{ref}/modules-snapshots.html[Reference] |=== === snapshot.delete -[source,js] +[source,ts] ---- -client.snapshot.delete([params] [, options] [, callback]) +client.snapshot.delete({ + repository: string, + snapshot: string, + master_timeout: string +}) ---- link:{ref}/modules-snapshots.html[Reference] [cols=2*] @@ -3634,15 +4554,19 @@ link:{ref}/modules-snapshots.html[Reference] |=== === snapshot.deleteRepository -[source,js] +[source,ts] ---- -client.snapshot.deleteRepository([params] [, options] [, callback]) +client.snapshot.deleteRepository({ + repository: string | string[], + master_timeout: string, + timeout: string +}) ---- link:{ref}/modules-snapshots.html[Reference] [cols=2*] |=== |`repository` -|`string, string[]` - A comma-separated list of repository names +|`string \| string[]` - A comma-separated list of repository names |`master_timeout` or `masterTimeout` |`string` - Explicit operation timeout for connection to master node @@ -3653,9 +4577,15 @@ link:{ref}/modules-snapshots.html[Reference] |=== === snapshot.get -[source,js] +[source,ts] ---- -client.snapshot.get([params] [, options] [, callback]) +client.snapshot.get({ + repository: string, + snapshot: string | string[], + master_timeout: string, + ignore_unavailable: boolean, + verbose: boolean +}) ---- link:{ref}/modules-snapshots.html[Reference] [cols=2*] @@ -3664,7 +4594,7 @@ link:{ref}/modules-snapshots.html[Reference] |`string` - A repository name |`snapshot` -|`string, string[]` - A comma-separated list of snapshot names +|`string \| string[]` - A comma-separated list of snapshot names |`master_timeout` or `masterTimeout` |`string` - Explicit operation timeout for connection to master node @@ -3678,15 +4608,19 @@ link:{ref}/modules-snapshots.html[Reference] |=== === snapshot.getRepository -[source,js] +[source,ts] ---- -client.snapshot.getRepository([params] [, options] [, callback]) +client.snapshot.getRepository({ + repository: string | string[], + master_timeout: string, + local: boolean +}) ---- link:{ref}/modules-snapshots.html[Reference] [cols=2*] |=== |`repository` -|`string, string[]` - A comma-separated list of repository names +|`string \| string[]` - A comma-separated list of repository names |`master_timeout` or `masterTimeout` |`string` - Explicit operation timeout for connection to master node @@ -3697,9 +4631,15 @@ link:{ref}/modules-snapshots.html[Reference] |=== === snapshot.restore -[source,js] +[source,ts] ---- -client.snapshot.restore([params] [, options] [, callback]) +client.snapshot.restore({ + repository: string, + snapshot: string, + master_timeout: string, + wait_for_completion: boolean, + body: object +}) ---- link:{ref}/modules-snapshots.html[Reference] [cols=2*] @@ -3722,9 +4662,14 @@ link:{ref}/modules-snapshots.html[Reference] |=== === snapshot.status -[source,js] +[source,ts] ---- -client.snapshot.status([params] [, options] [, callback]) +client.snapshot.status({ + repository: string, + snapshot: string | string[], + master_timeout: string, + ignore_unavailable: boolean +}) ---- link:{ref}/modules-snapshots.html[Reference] [cols=2*] @@ -3733,7 +4678,7 @@ link:{ref}/modules-snapshots.html[Reference] |`string` - A repository name |`snapshot` -|`string, string[]` - A comma-separated list of snapshot names +|`string \| string[]` - A comma-separated list of snapshot names |`master_timeout` or `masterTimeout` |`string` - Explicit operation timeout for connection to master node @@ -3744,9 +4689,13 @@ link:{ref}/modules-snapshots.html[Reference] |=== === snapshot.verifyRepository -[source,js] +[source,ts] ---- -client.snapshot.verifyRepository([params] [, options] [, callback]) +client.snapshot.verifyRepository({ + repository: string, + master_timeout: string, + timeout: string +}) ---- link:{ref}/modules-snapshots.html[Reference] [cols=2*] @@ -3763,9 +4712,14 @@ link:{ref}/modules-snapshots.html[Reference] |=== === tasks.cancel -[source,js] +[source,ts] ---- -client.tasks.cancel([params] [, options] [, callback]) +client.tasks.cancel({ + task_id: string, + nodes: string | string[], + actions: string | string[], + parent_task_id: string +}) ---- link:{ref}/tasks.html[Reference] [cols=2*] @@ -3774,10 +4728,10 @@ link:{ref}/tasks.html[Reference] |`string` - Cancel the task with specified task id (node_id:task_number) |`nodes` -|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +|`string \| string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes |`actions` -|`string, string[]` - A comma-separated list of actions that should be cancelled. Leave empty to cancel all. +|`string \| string[]` - A comma-separated list of actions that should be cancelled. Leave empty to cancel all. |`parent_task_id` or `parentTaskId` |`string` - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. @@ -3785,9 +4739,13 @@ link:{ref}/tasks.html[Reference] |=== === tasks.get -[source,js] +[source,ts] ---- -client.tasks.get([params] [, options] [, callback]) +client.tasks.get({ + task_id: string, + wait_for_completion: boolean, + timeout: string +}) ---- link:{ref}/tasks.html[Reference] [cols=2*] @@ -3804,18 +4762,26 @@ link:{ref}/tasks.html[Reference] |=== === tasks.list -[source,js] +[source,ts] ---- -client.tasks.list([params] [, options] [, callback]) +client.tasks.list({ + nodes: string | string[], + actions: string | string[], + detailed: boolean, + parent_task_id: string, + wait_for_completion: boolean, + group_by: 'nodes' | 'parents' | 'none', + timeout: string +}) ---- link:{ref}/tasks.html[Reference] [cols=2*] |=== |`nodes` -|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +|`string \| string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes |`actions` -|`string, string[]` - A comma-separated list of actions that should be returned. Leave empty to return all. +|`string \| string[]` - A comma-separated list of actions that should be returned. Leave empty to return all. |`detailed` |`boolean` - Return detailed task information (default: false) @@ -3827,7 +4793,7 @@ link:{ref}/tasks.html[Reference] |`boolean` - Wait for the matching tasks to complete (default: false) |`group_by` or `groupBy` -|`'nodes', 'parents', 'none'` - Group tasks by nodes or parent/child relationships + +|`'nodes' \| 'parents' \| 'none'` - Group tasks by nodes or parent/child relationships + _Default:_ `nodes` |`timeout` @@ -3836,9 +4802,24 @@ _Default:_ `nodes` |=== === termvectors -[source,js] +[source,ts] ---- -client.termvectors([params] [, options] [, callback]) +client.termvectors({ + index: string, + id: string, + term_statistics: boolean, + field_statistics: boolean, + fields: string | string[], + offsets: boolean, + positions: boolean, + payloads: boolean, + preference: string, + routing: string, + realtime: boolean, + version: number, + version_type: 'internal' | 'external' | 'external_gte' | 'force', + body: object +}) ---- link:{ref}/docs-termvectors.html[Reference] [cols=2*] @@ -3857,7 +4838,7 @@ link:{ref}/docs-termvectors.html[Reference] _Default:_ `true` |`fields` -|`string, string[]` - A comma-separated list of fields to return. +|`string \| string[]` - A comma-separated list of fields to return. |`offsets` |`boolean` - Specifies if term offsets should be returned. + @@ -3884,7 +4865,7 @@ _Default:_ `true` |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal', 'external', 'external_gte', 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type |`body` |`object` - Define parameters and or supply a document to get termvectors for. See documentation. @@ -3892,9 +4873,25 @@ _Default:_ `true` |=== === update -[source,js] +[source,ts] ---- -client.update([params] [, options] [, callback]) +client.update({ + id: string, + index: string, + type: string, + wait_for_active_shards: string, + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + lang: string, + refresh: 'true' | 'false' | 'wait_for', + retry_on_conflict: number, + routing: string, + timeout: string, + if_seq_no: number, + if_primary_term: number, + body: object +}) ---- link:{ref}/docs-update.html[Reference] [cols=2*] @@ -3912,19 +4909,19 @@ link:{ref}/docs-update.html[Reference] |`string` - Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`lang` |`string` - The script language (default: painless) |`refresh` -|`'true', 'false', 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. |`retry_on_conflict` or `retryOnConflict` |`number` - Specify how many times should the operation be retried when a conflict occurs (default: 0) @@ -3947,15 +4944,52 @@ link:{ref}/docs-update.html[Reference] |=== === updateByQuery -[source,js] +[source,ts] ---- -client.updateByQuery([params] [, options] [, callback]) +client.updateByQuery({ + index: string | string[], + analyzer: string, + analyze_wildcard: boolean, + default_operator: 'AND' | 'OR', + df: string, + from: number, + ignore_unavailable: boolean, + allow_no_indices: boolean, + conflicts: 'abort' | 'proceed', + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + lenient: boolean, + pipeline: string, + preference: string, + q: string, + routing: string | string[], + scroll: string, + search_type: 'query_then_fetch' | 'dfs_query_then_fetch', + search_timeout: string, + max_docs: number, + sort: string | string[], + _source: string | string[], + _source_excludes: string | string[], + _source_includes: string | string[], + terminate_after: number, + stats: string | string[], + version: boolean, + version_type: boolean, + request_cache: boolean, + refresh: boolean, + timeout: string, + wait_for_active_shards: string, + scroll_size: number, + wait_for_completion: boolean, + requests_per_second: number, + slices: number, + body: object +}) ---- link:{ref}/docs-update-by-query.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices |`analyzer` |`string` - The analyzer to use for the query string @@ -3964,7 +4998,7 @@ link:{ref}/docs-update-by-query.html[Reference] |`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false) |`default_operator` or `defaultOperator` -|`'AND', 'OR'` - The default operator for query string query (AND or OR) + +|`'AND' \| 'OR'` - The default operator for query string query (AND or OR) + _Default:_ `OR` |`df` @@ -3980,11 +5014,11 @@ _Default:_ `OR` |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`conflicts` -|`'abort', 'proceed'` - What to do when the update by query hits version conflicts? + +|`'abort' \| 'proceed'` - What to do when the update by query hits version conflicts? + _Default:_ `abort` |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |`lenient` @@ -4000,13 +5034,13 @@ _Default:_ `open` |`string` - Query in the Lucene query string syntax |`routing` -|`string, string[]` - A comma-separated list of specific routing values +|`string \| string[]` - A comma-separated list of specific routing values |`scroll` |`string` - Specify how long a consistent view of the index should be maintained for scrolled search |`search_type` or `searchType` -|`'query_then_fetch', 'dfs_query_then_fetch'` - Search operation type +|`'query_then_fetch' \| 'dfs_query_then_fetch'` - Search operation type |`search_timeout` or `searchTimeout` |`string` - Explicit timeout for each search request. Defaults to no timeout. @@ -4015,22 +5049,22 @@ _Default:_ `open` |`number` - Maximum number of documents to process (default: all documents) |`sort` -|`string, string[]` - A comma-separated list of : pairs +|`string \| string[]` - A comma-separated list of : pairs |`_source` -|`string, string[]` - True or false to return the _source field or not, or a list of fields to return +|`string \| string[]` - True or false to return the _source field or not, or a list of fields to return |`_source_excludes` or `_sourceExcludes` -|`string, string[]` - A list of fields to exclude from the returned _source field +|`string \| string[]` - A list of fields to exclude from the returned _source field |`_source_includes` or `_sourceIncludes` -|`string, string[]` - A list of fields to extract and return from the _source field +|`string \| string[]` - A list of fields to extract and return from the _source field |`terminate_after` or `terminateAfter` |`number` - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. |`stats` -|`string, string[]` - Specific 'tag' of the request for logging and statistical purposes +|`string \| string[]` - Specific 'tag' of the request for logging and statistical purposes |`version` |`boolean` - Specify whether to return document version as part of a hit @@ -4071,9 +5105,12 @@ _Default:_ `1` |=== === updateByQueryRethrottle -[source,js] +[source,ts] ---- -client.updateByQueryRethrottle([params] [, options] [, callback]) +client.updateByQueryRethrottle({ + task_id: string, + requests_per_second: number +}) ---- link:{ref}/docs-update-by-query.html[Reference] [cols=2*] @@ -4087,9 +5124,11 @@ link:{ref}/docs-update-by-query.html[Reference] |=== === ccr.deleteAutoFollowPattern -[source,js] +[source,ts] ---- -client.ccr.deleteAutoFollowPattern([params] [, options] [, callback]) +client.ccr.deleteAutoFollowPattern({ + name: string +}) ---- link:{ref}/ccr-delete-auto-follow-pattern.html[Reference] [cols=2*] @@ -4100,9 +5139,13 @@ link:{ref}/ccr-delete-auto-follow-pattern.html[Reference] |=== === ccr.follow -[source,js] +[source,ts] ---- -client.ccr.follow([params] [, options] [, callback]) +client.ccr.follow({ + index: string, + wait_for_active_shards: string, + body: object +}) ---- link:{ref}/ccr-put-follow.html[Reference] [cols=2*] @@ -4120,35 +5163,42 @@ _Default:_ `0` |=== === ccr.followInfo -[source,js] +[source,ts] ---- -client.ccr.followInfo([params] [, options] [, callback]) +client.ccr.followInfo({ + index: string | string[] +}) ---- link:{ref}/ccr-get-follow-info.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index patterns; use `_all` to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index patterns; use `_all` to perform the operation on all indices |=== === ccr.followStats -[source,js] +[source,ts] ---- -client.ccr.followStats([params] [, options] [, callback]) +client.ccr.followStats({ + index: string | string[] +}) ---- link:{ref}/ccr-get-follow-stats.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index patterns; use `_all` to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index patterns; use `_all` to perform the operation on all indices |=== === ccr.forgetFollower -[source,js] +[source,ts] ---- -client.ccr.forgetFollower([params] [, options] [, callback]) +client.ccr.forgetFollower({ + index: string, + body: object +}) ---- link:http://www.elastic.co/guide/en/elasticsearch/reference/current[Reference] [cols=2*] @@ -4162,9 +5212,11 @@ link:http://www.elastic.co/guide/en/elasticsearch/reference/current[Reference] |=== === ccr.getAutoFollowPattern -[source,js] +[source,ts] ---- -client.ccr.getAutoFollowPattern([params] [, options] [, callback]) +client.ccr.getAutoFollowPattern({ + name: string +}) ---- link:{ref}/ccr-get-auto-follow-pattern.html[Reference] [cols=2*] @@ -4175,9 +5227,11 @@ link:{ref}/ccr-get-auto-follow-pattern.html[Reference] |=== === ccr.pauseFollow -[source,js] +[source,ts] ---- -client.ccr.pauseFollow([params] [, options] [, callback]) +client.ccr.pauseFollow({ + index: string +}) ---- link:{ref}/ccr-post-pause-follow.html[Reference] [cols=2*] @@ -4188,9 +5242,12 @@ link:{ref}/ccr-post-pause-follow.html[Reference] |=== === ccr.putAutoFollowPattern -[source,js] +[source,ts] ---- -client.ccr.putAutoFollowPattern([params] [, options] [, callback]) +client.ccr.putAutoFollowPattern({ + name: string, + body: object +}) ---- link:{ref}/ccr-put-auto-follow-pattern.html[Reference] [cols=2*] @@ -4204,9 +5261,12 @@ link:{ref}/ccr-put-auto-follow-pattern.html[Reference] |=== === ccr.resumeFollow -[source,js] +[source,ts] ---- -client.ccr.resumeFollow([params] [, options] [, callback]) +client.ccr.resumeFollow({ + index: string, + body: object +}) ---- link:{ref}/ccr-post-resume-follow.html[Reference] [cols=2*] @@ -4220,17 +5280,19 @@ link:{ref}/ccr-post-resume-follow.html[Reference] |=== === ccr.stats -[source,js] +[source,ts] ---- -client.ccr.stats([params] [, options] [, callback]) +client.ccr.stats() ---- link:{ref}/ccr-get-stats.html[Reference] === ccr.unfollow -[source,js] +[source,ts] ---- -client.ccr.unfollow([params] [, options] [, callback]) +client.ccr.unfollow({ + index: string +}) ---- link:http://www.elastic.co/guide/en/elasticsearch/reference/current[Reference] [cols=2*] @@ -4241,9 +5303,12 @@ link:http://www.elastic.co/guide/en/elasticsearch/reference/current[Reference] |=== === dataFrame.deleteDataFrameTransform -[source,js] +[source,ts] ---- -client.dataFrame.deleteDataFrameTransform([params] [, options] [, callback]) +client.dataFrame.deleteDataFrameTransform({ + transform_id: string, + force: boolean +}) ---- link:{ref}/delete-data-frame-transform.html[Reference] [cols=2*] @@ -4251,12 +5316,20 @@ link:{ref}/delete-data-frame-transform.html[Reference] |`transform_id` or `transformId` |`string` - The id of the transform to delete +|`force` +|`boolean` - When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted. + |=== === dataFrame.getDataFrameTransform -[source,js] +[source,ts] ---- -client.dataFrame.getDataFrameTransform([params] [, options] [, callback]) +client.dataFrame.getDataFrameTransform({ + transform_id: string, + from: number, + size: number, + allow_no_match: boolean +}) ---- link:{ref}/get-data-frame-transform.html[Reference] [cols=2*] @@ -4276,9 +5349,14 @@ link:{ref}/get-data-frame-transform.html[Reference] |=== === dataFrame.getDataFrameTransformStats -[source,js] +[source,ts] ---- -client.dataFrame.getDataFrameTransformStats([params] [, options] [, callback]) +client.dataFrame.getDataFrameTransformStats({ + transform_id: string, + from: number, + size: number, + allow_no_match: boolean +}) ---- link:{ref}/get-data-frame-transform-stats.html[Reference] [cols=2*] @@ -4298,9 +5376,11 @@ link:{ref}/get-data-frame-transform-stats.html[Reference] |=== === dataFrame.previewDataFrameTransform -[source,js] +[source,ts] ---- -client.dataFrame.previewDataFrameTransform([params] [, options] [, callback]) +client.dataFrame.previewDataFrameTransform({ + body: object +}) ---- link:{ref}/preview-data-frame-transform.html[Reference] [cols=2*] @@ -4311,9 +5391,13 @@ link:{ref}/preview-data-frame-transform.html[Reference] |=== === dataFrame.putDataFrameTransform -[source,js] +[source,ts] ---- -client.dataFrame.putDataFrameTransform([params] [, options] [, callback]) +client.dataFrame.putDataFrameTransform({ + transform_id: string, + defer_validation: boolean, + body: object +}) ---- link:{ref}/put-data-frame-transform.html[Reference] [cols=2*] @@ -4321,15 +5405,21 @@ link:{ref}/put-data-frame-transform.html[Reference] |`transform_id` or `transformId` |`string` - The id of the new transform. +|`defer_validation` or `deferValidation` +|`boolean` - If validations should be deferred until data frame transform starts, defaults to false. + |`body` |`object` - The data frame transform definition |=== === dataFrame.startDataFrameTransform -[source,js] +[source,ts] ---- -client.dataFrame.startDataFrameTransform([params] [, options] [, callback]) +client.dataFrame.startDataFrameTransform({ + transform_id: string, + timeout: string +}) ---- link:{ref}/start-data-frame-transform.html[Reference] [cols=2*] @@ -4343,9 +5433,14 @@ link:{ref}/start-data-frame-transform.html[Reference] |=== === dataFrame.stopDataFrameTransform -[source,js] +[source,ts] ---- -client.dataFrame.stopDataFrameTransform([params] [, options] [, callback]) +client.dataFrame.stopDataFrameTransform({ + transform_id: string, + wait_for_completion: boolean, + timeout: string, + allow_no_match: boolean +}) ---- link:{ref}/stop-data-frame-transform.html[Reference] [cols=2*] @@ -4365,18 +5460,24 @@ link:{ref}/stop-data-frame-transform.html[Reference] |=== === graph.explore -[source,js] +[source,ts] ---- -client.graph.explore([params] [, options] [, callback]) +client.graph.explore({ + index: string | string[], + type: string | string[], + routing: string, + timeout: string, + body: object +}) ---- link:{ref}/graph-explore-api.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +|`string \| string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices |`type` -|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types +|`string \| string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types |`routing` |`string` - Specific routing value @@ -4390,9 +5491,11 @@ link:{ref}/graph-explore-api.html[Reference] |=== === ilm.deleteLifecycle -[source,js] +[source,ts] ---- -client.ilm.deleteLifecycle([params] [, options] [, callback]) +client.ilm.deleteLifecycle({ + policy: string +}) ---- link:{ref}/ilm-delete-lifecycle.html[Reference] [cols=2*] @@ -4403,9 +5506,11 @@ link:{ref}/ilm-delete-lifecycle.html[Reference] |=== === ilm.explainLifecycle -[source,js] +[source,ts] ---- -client.ilm.explainLifecycle([params] [, options] [, callback]) +client.ilm.explainLifecycle({ + index: string +}) ---- link:{ref}/ilm-explain-lifecycle.html[Reference] [cols=2*] @@ -4416,9 +5521,11 @@ link:{ref}/ilm-explain-lifecycle.html[Reference] |=== === ilm.getLifecycle -[source,js] +[source,ts] ---- -client.ilm.getLifecycle([params] [, options] [, callback]) +client.ilm.getLifecycle({ + policy: string +}) ---- link:{ref}/ilm-get-lifecycle.html[Reference] [cols=2*] @@ -4429,17 +5536,20 @@ link:{ref}/ilm-get-lifecycle.html[Reference] |=== === ilm.getStatus -[source,js] +[source,ts] ---- -client.ilm.getStatus([params] [, options] [, callback]) +client.ilm.getStatus() ---- link:{ref}/ilm-get-status.html[Reference] === ilm.moveToStep -[source,js] +[source,ts] ---- -client.ilm.moveToStep([params] [, options] [, callback]) +client.ilm.moveToStep({ + index: string, + body: object +}) ---- link:{ref}/ilm-move-to-step.html[Reference] [cols=2*] @@ -4453,9 +5563,12 @@ link:{ref}/ilm-move-to-step.html[Reference] |=== === ilm.putLifecycle -[source,js] +[source,ts] ---- -client.ilm.putLifecycle([params] [, options] [, callback]) +client.ilm.putLifecycle({ + policy: string, + body: object +}) ---- link:{ref}/ilm-put-lifecycle.html[Reference] [cols=2*] @@ -4469,9 +5582,11 @@ link:{ref}/ilm-put-lifecycle.html[Reference] |=== === ilm.removePolicy -[source,js] +[source,ts] ---- -client.ilm.removePolicy([params] [, options] [, callback]) +client.ilm.removePolicy({ + index: string +}) ---- link:{ref}/ilm-remove-policy.html[Reference] [cols=2*] @@ -4482,9 +5597,11 @@ link:{ref}/ilm-remove-policy.html[Reference] |=== === ilm.retry -[source,js] +[source,ts] ---- -client.ilm.retry([params] [, options] [, callback]) +client.ilm.retry({ + index: string +}) ---- link:{ref}/ilm-retry-policy.html[Reference] [cols=2*] @@ -4495,25 +5612,33 @@ link:{ref}/ilm-retry-policy.html[Reference] |=== === ilm.start -[source,js] +[source,ts] ---- -client.ilm.start([params] [, options] [, callback]) +client.ilm.start() ---- link:{ref}/ilm-start.html[Reference] === ilm.stop -[source,js] +[source,ts] ---- -client.ilm.stop([params] [, options] [, callback]) +client.ilm.stop() ---- link:{ref}/ilm-stop.html[Reference] === indices.freeze -[source,js] +[source,ts] ---- -client.indices.freeze([params] [, options] [, callback]) +client.indices.freeze({ + index: string, + timeout: string, + master_timeout: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + wait_for_active_shards: string +}) ---- link:{ref}/freeze-index-api.html[Reference] [cols=2*] @@ -4534,7 +5659,7 @@ link:{ref}/freeze-index-api.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `closed` |`wait_for_active_shards` or `waitForActiveShards` @@ -4543,15 +5668,20 @@ _Default:_ `closed` |=== === indices.reloadSearchAnalyzers -[source,js] +[source,ts] ---- -client.indices.reloadSearchAnalyzers([params] [, options] [, callback]) +client.indices.reloadSearchAnalyzers({ + index: string | string[], + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all' +}) ---- link:{ref}/indices-reload-analyzers.html[Reference] [cols=2*] |=== |`index` -|`string, string[]` - A comma-separated list of index names to reload analyzers for +|`string \| string[]` - A comma-separated list of index names to reload analyzers for |`ignore_unavailable` or `ignoreUnavailable` |`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -4560,15 +5690,23 @@ link:{ref}/indices-reload-analyzers.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `open` |=== === indices.unfreeze -[source,js] +[source,ts] ---- -client.indices.unfreeze([params] [, options] [, callback]) +client.indices.unfreeze({ + index: string, + timeout: string, + master_timeout: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + expand_wildcards: 'open' | 'closed' | 'none' | 'all', + wait_for_active_shards: string +}) ---- link:{ref}/freeze-index-api.html[Reference] [cols=2*] @@ -4589,7 +5727,7 @@ link:{ref}/freeze-index-api.html[Reference] |`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + +|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + _Default:_ `closed` |`wait_for_active_shards` or `waitForActiveShards` @@ -4598,17 +5736,19 @@ _Default:_ `closed` |=== === license.delete -[source,js] +[source,ts] ---- -client.license.delete([params] [, options] [, callback]) +client.license.delete() ---- link:{ref}/delete-license.html[Reference] === license.get -[source,js] +[source,ts] ---- -client.license.get([params] [, options] [, callback]) +client.license.get({ + local: boolean +}) ---- link:{ref}/get-license.html[Reference] [cols=2*] @@ -4619,25 +5759,28 @@ link:{ref}/get-license.html[Reference] |=== === license.getBasicStatus -[source,js] +[source,ts] ---- -client.license.getBasicStatus([params] [, options] [, callback]) +client.license.getBasicStatus() ---- link:{ref}/get-basic-status.html[Reference] === license.getTrialStatus -[source,js] +[source,ts] ---- -client.license.getTrialStatus([params] [, options] [, callback]) +client.license.getTrialStatus() ---- link:{ref}/get-trial-status.html[Reference] === license.post -[source,js] +[source,ts] ---- -client.license.post([params] [, options] [, callback]) +client.license.post({ + acknowledge: boolean, + body: object +}) ---- link:{ref}/update-license.html[Reference] [cols=2*] @@ -4651,9 +5794,11 @@ link:{ref}/update-license.html[Reference] |=== === license.postStartBasic -[source,js] +[source,ts] ---- -client.license.postStartBasic([params] [, options] [, callback]) +client.license.postStartBasic({ + acknowledge: boolean +}) ---- link:{ref}/start-basic.html[Reference] [cols=2*] @@ -4664,9 +5809,12 @@ link:{ref}/start-basic.html[Reference] |=== === license.postStartTrial -[source,js] +[source,ts] ---- -client.license.postStartTrial([params] [, options] [, callback]) +client.license.postStartTrial({ + type: string, + acknowledge: boolean +}) ---- link:{ref}/start-trial.html[Reference] [cols=2*] @@ -4680,9 +5828,11 @@ link:{ref}/start-trial.html[Reference] |=== === migration.deprecations -[source,js] +[source,ts] ---- -client.migration.deprecations([params] [, options] [, callback]) +client.migration.deprecations({ + index: string +}) ---- link:{ref}/migration-api-deprecation.html[Reference] [cols=2*] @@ -4693,9 +5843,15 @@ link:{ref}/migration-api-deprecation.html[Reference] |=== === ml.closeJob -[source,js] +[source,ts] ---- -client.ml.closeJob([params] [, options] [, callback]) +client.ml.closeJob({ + job_id: string, + allow_no_jobs: boolean, + force: boolean, + timeout: string, + body: object +}) ---- link:{ref}/ml-close-job.html[Reference] [cols=2*] @@ -4718,9 +5874,11 @@ link:{ref}/ml-close-job.html[Reference] |=== === ml.deleteCalendar -[source,js] +[source,ts] ---- -client.ml.deleteCalendar([params] [, options] [, callback]) +client.ml.deleteCalendar({ + calendar_id: string +}) ---- [cols=2*] |=== @@ -4730,9 +5888,12 @@ client.ml.deleteCalendar([params] [, options] [, callback]) |=== === ml.deleteCalendarEvent -[source,js] +[source,ts] ---- -client.ml.deleteCalendarEvent([params] [, options] [, callback]) +client.ml.deleteCalendarEvent({ + calendar_id: string, + event_id: string +}) ---- [cols=2*] |=== @@ -4745,9 +5906,12 @@ client.ml.deleteCalendarEvent([params] [, options] [, callback]) |=== === ml.deleteCalendarJob -[source,js] +[source,ts] ---- -client.ml.deleteCalendarJob([params] [, options] [, callback]) +client.ml.deleteCalendarJob({ + calendar_id: string, + job_id: string +}) ---- [cols=2*] |=== @@ -4760,9 +5924,11 @@ client.ml.deleteCalendarJob([params] [, options] [, callback]) |=== === ml.deleteDataFrameAnalytics -[source,js] +[source,ts] ---- -client.ml.deleteDataFrameAnalytics([params] [, options] [, callback]) +client.ml.deleteDataFrameAnalytics({ + id: string +}) ---- link:{ref}/delete-dfanalytics.html[Reference] [cols=2*] @@ -4773,9 +5939,12 @@ link:{ref}/delete-dfanalytics.html[Reference] |=== === ml.deleteDatafeed -[source,js] +[source,ts] ---- -client.ml.deleteDatafeed([params] [, options] [, callback]) +client.ml.deleteDatafeed({ + datafeed_id: string, + force: boolean +}) ---- link:{ref}/ml-delete-datafeed.html[Reference] [cols=2*] @@ -4789,16 +5958,18 @@ link:{ref}/ml-delete-datafeed.html[Reference] |=== === ml.deleteExpiredData -[source,js] +[source,ts] ---- -client.ml.deleteExpiredData([params] [, options] [, callback]) +client.ml.deleteExpiredData() ---- === ml.deleteFilter -[source,js] +[source,ts] ---- -client.ml.deleteFilter([params] [, options] [, callback]) +client.ml.deleteFilter({ + filter_id: string +}) ---- [cols=2*] |=== @@ -4808,9 +5979,14 @@ client.ml.deleteFilter([params] [, options] [, callback]) |=== === ml.deleteForecast -[source,js] +[source,ts] ---- -client.ml.deleteForecast([params] [, options] [, callback]) +client.ml.deleteForecast({ + job_id: string, + forecast_id: string, + allow_no_forecasts: boolean, + timeout: string +}) ---- link:{ref}/ml-delete-forecast.html[Reference] [cols=2*] @@ -4830,9 +6006,13 @@ link:{ref}/ml-delete-forecast.html[Reference] |=== === ml.deleteJob -[source,js] +[source,ts] ---- -client.ml.deleteJob([params] [, options] [, callback]) +client.ml.deleteJob({ + job_id: string, + force: boolean, + wait_for_completion: boolean +}) ---- link:{ref}/ml-delete-job.html[Reference] [cols=2*] @@ -4850,9 +6030,12 @@ _Default:_ `true` |=== === ml.deleteModelSnapshot -[source,js] +[source,ts] ---- -client.ml.deleteModelSnapshot([params] [, options] [, callback]) +client.ml.deleteModelSnapshot({ + job_id: string, + snapshot_id: string +}) ---- link:{ref}/ml-delete-snapshot.html[Reference] [cols=2*] @@ -4866,9 +6049,11 @@ link:{ref}/ml-delete-snapshot.html[Reference] |=== === ml.evaluateDataFrame -[source,js] +[source,ts] ---- -client.ml.evaluateDataFrame([params] [, options] [, callback]) +client.ml.evaluateDataFrame({ + body: object +}) ---- link:{ref}/evaluate-dfanalytics.html[Reference] [cols=2*] @@ -4879,9 +6064,25 @@ link:{ref}/evaluate-dfanalytics.html[Reference] |=== === ml.findFileStructure -[source,js] +[source,ts] ---- -client.ml.findFileStructure([params] [, options] [, callback]) +client.ml.findFileStructure({ + lines_to_sample: number, + line_merge_size_limit: number, + timeout: string, + charset: string, + format: 'ndjson' | 'xml' | 'delimited' | 'semi_structured_text', + has_header_row: boolean, + column_names: string | string[], + delimiter: string, + quote: string, + should_trim_fields: boolean, + grok_pattern: string, + timestamp_field: string, + timestamp_format: string, + explain: boolean, + body: object +}) ---- link:{ref}/ml-find-file-structure.html[Reference] [cols=2*] @@ -4902,13 +6103,13 @@ _Default:_ `25s` |`string` - Optional parameter to specify the character set of the file |`format` -|`'ndjson', 'xml', 'delimited', 'semi_structured_text'` - Optional parameter to specify the high level file format +|`'ndjson' \| 'xml' \| 'delimited' \| 'semi_structured_text'` - Optional parameter to specify the high level file format |`has_header_row` or `hasHeaderRow` |`boolean` - Optional parameter to specify whether a delimited file includes the column names in its first row |`column_names` or `columnNames` -|`string, string[]` - Optional parameter containing a comma separated list of the column names for a delimited file +|`string \| string[]` - Optional parameter containing a comma separated list of the column names for a delimited file |`delimiter` |`string` - Optional parameter to specify the delimiter character for a delimited file - must be a single character @@ -4937,9 +6138,17 @@ _Default:_ `25s` |=== === ml.flushJob -[source,js] +[source,ts] ---- -client.ml.flushJob([params] [, options] [, callback]) +client.ml.flushJob({ + job_id: string, + calc_interim: boolean, + start: string, + end: string, + advance_time: string, + skip_time: string, + body: object +}) ---- link:{ref}/ml-flush-job.html[Reference] [cols=2*] @@ -4968,9 +6177,13 @@ link:{ref}/ml-flush-job.html[Reference] |=== === ml.forecast -[source,js] +[source,ts] ---- -client.ml.forecast([params] [, options] [, callback]) +client.ml.forecast({ + job_id: string, + duration: string, + expires_in: string +}) ---- [cols=2*] |=== @@ -4986,9 +6199,22 @@ client.ml.forecast([params] [, options] [, callback]) |=== === ml.getBuckets -[source,js] +[source,ts] ---- -client.ml.getBuckets([params] [, options] [, callback]) +client.ml.getBuckets({ + job_id: string, + timestamp: string, + expand: boolean, + exclude_interim: boolean, + from: number, + size: number, + start: string, + end: string, + anomaly_score: number, + sort: string, + desc: boolean, + body: object +}) ---- link:{ref}/ml-get-bucket.html[Reference] [cols=2*] @@ -5032,9 +6258,16 @@ link:{ref}/ml-get-bucket.html[Reference] |=== === ml.getCalendarEvents -[source,js] +[source,ts] ---- -client.ml.getCalendarEvents([params] [, options] [, callback]) +client.ml.getCalendarEvents({ + calendar_id: string, + job_id: string, + start: string, + end: string, + from: number, + size: number +}) ---- [cols=2*] |=== @@ -5059,9 +6292,14 @@ client.ml.getCalendarEvents([params] [, options] [, callback]) |=== === ml.getCalendars -[source,js] +[source,ts] ---- -client.ml.getCalendars([params] [, options] [, callback]) +client.ml.getCalendars({ + calendar_id: string, + from: number, + size: number, + body: object +}) ---- [cols=2*] |=== @@ -5080,9 +6318,15 @@ client.ml.getCalendars([params] [, options] [, callback]) |=== === ml.getCategories -[source,js] +[source,ts] ---- -client.ml.getCategories([params] [, options] [, callback]) +client.ml.getCategories({ + job_id: string, + category_id: number, + from: number, + size: number, + body: object +}) ---- link:{ref}/ml-get-category.html[Reference] [cols=2*] @@ -5105,9 +6349,14 @@ link:{ref}/ml-get-category.html[Reference] |=== === ml.getDataFrameAnalytics -[source,js] +[source,ts] ---- -client.ml.getDataFrameAnalytics([params] [, options] [, callback]) +client.ml.getDataFrameAnalytics({ + id: string, + allow_no_match: boolean, + from: number, + size: number +}) ---- link:{ref}/get-dfanalytics.html[Reference] [cols=2*] @@ -5129,9 +6378,14 @@ _Default:_ `100` |=== === ml.getDataFrameAnalyticsStats -[source,js] +[source,ts] ---- -client.ml.getDataFrameAnalyticsStats([params] [, options] [, callback]) +client.ml.getDataFrameAnalyticsStats({ + id: string, + allow_no_match: boolean, + from: number, + size: number +}) ---- link:{ref}/get-dfanalytics-stats.html[Reference] [cols=2*] @@ -5153,9 +6407,12 @@ _Default:_ `100` |=== === ml.getDatafeedStats -[source,js] +[source,ts] ---- -client.ml.getDatafeedStats([params] [, options] [, callback]) +client.ml.getDatafeedStats({ + datafeed_id: string, + allow_no_datafeeds: boolean +}) ---- link:{ref}/ml-get-datafeed-stats.html[Reference] [cols=2*] @@ -5169,9 +6426,12 @@ link:{ref}/ml-get-datafeed-stats.html[Reference] |=== === ml.getDatafeeds -[source,js] +[source,ts] ---- -client.ml.getDatafeeds([params] [, options] [, callback]) +client.ml.getDatafeeds({ + datafeed_id: string, + allow_no_datafeeds: boolean +}) ---- link:{ref}/ml-get-datafeed.html[Reference] [cols=2*] @@ -5185,9 +6445,13 @@ link:{ref}/ml-get-datafeed.html[Reference] |=== === ml.getFilters -[source,js] +[source,ts] ---- -client.ml.getFilters([params] [, options] [, callback]) +client.ml.getFilters({ + filter_id: string, + from: number, + size: number +}) ---- [cols=2*] |=== @@ -5203,9 +6467,20 @@ client.ml.getFilters([params] [, options] [, callback]) |=== === ml.getInfluencers -[source,js] +[source,ts] ---- -client.ml.getInfluencers([params] [, options] [, callback]) +client.ml.getInfluencers({ + job_id: string, + exclude_interim: boolean, + from: number, + size: number, + start: string, + end: string, + influencer_score: number, + sort: string, + desc: boolean, + body: object +}) ---- link:{ref}/ml-get-influencer.html[Reference] [cols=2*] @@ -5243,9 +6518,12 @@ link:{ref}/ml-get-influencer.html[Reference] |=== === ml.getJobStats -[source,js] +[source,ts] ---- -client.ml.getJobStats([params] [, options] [, callback]) +client.ml.getJobStats({ + job_id: string, + allow_no_jobs: boolean +}) ---- link:{ref}/ml-get-job-stats.html[Reference] [cols=2*] @@ -5259,9 +6537,12 @@ link:{ref}/ml-get-job-stats.html[Reference] |=== === ml.getJobs -[source,js] +[source,ts] ---- -client.ml.getJobs([params] [, options] [, callback]) +client.ml.getJobs({ + job_id: string, + allow_no_jobs: boolean +}) ---- link:{ref}/ml-get-job.html[Reference] [cols=2*] @@ -5275,9 +6556,19 @@ link:{ref}/ml-get-job.html[Reference] |=== === ml.getModelSnapshots -[source,js] +[source,ts] ---- -client.ml.getModelSnapshots([params] [, options] [, callback]) +client.ml.getModelSnapshots({ + job_id: string, + snapshot_id: string, + from: number, + size: number, + start: string, + end: string, + sort: string, + desc: boolean, + body: object +}) ---- link:{ref}/ml-get-snapshot.html[Reference] [cols=2*] @@ -5312,9 +6603,19 @@ link:{ref}/ml-get-snapshot.html[Reference] |=== === ml.getOverallBuckets -[source,js] +[source,ts] ---- -client.ml.getOverallBuckets([params] [, options] [, callback]) +client.ml.getOverallBuckets({ + job_id: string, + top_n: number, + bucket_span: string, + overall_score: number, + exclude_interim: boolean, + start: string, + end: string, + allow_no_jobs: boolean, + body: object +}) ---- link:{ref}/ml-get-overall-buckets.html[Reference] [cols=2*] @@ -5349,9 +6650,20 @@ link:{ref}/ml-get-overall-buckets.html[Reference] |=== === ml.getRecords -[source,js] +[source,ts] ---- -client.ml.getRecords([params] [, options] [, callback]) +client.ml.getRecords({ + job_id: string, + exclude_interim: boolean, + from: number, + size: number, + start: string, + end: string, + record_score: number, + sort: string, + desc: boolean, + body: object +}) ---- link:{ref}/ml-get-record.html[Reference] [cols=2*] @@ -5389,16 +6701,20 @@ link:{ref}/ml-get-record.html[Reference] |=== === ml.info -[source,js] +[source,ts] ---- -client.ml.info([params] [, options] [, callback]) +client.ml.info() ---- === ml.openJob -[source,js] +[source,ts] ---- -client.ml.openJob([params] [, options] [, callback]) +client.ml.openJob({ + job_id: string, + ignore_downtime: boolean, + timeout: string +}) ---- link:{ref}/ml-open-job.html[Reference] [cols=2*] @@ -5415,9 +6731,12 @@ link:{ref}/ml-open-job.html[Reference] |=== === ml.postCalendarEvents -[source,js] +[source,ts] ---- -client.ml.postCalendarEvents([params] [, options] [, callback]) +client.ml.postCalendarEvents({ + calendar_id: string, + body: object +}) ---- [cols=2*] |=== @@ -5430,9 +6749,14 @@ client.ml.postCalendarEvents([params] [, options] [, callback]) |=== === ml.postData -[source,js] +[source,ts] ---- -client.ml.postData([params] [, options] [, callback]) +client.ml.postData({ + job_id: string, + reset_start: string, + reset_end: string, + body: object +}) ---- link:{ref}/ml-post-data.html[Reference] [cols=2*] @@ -5452,9 +6776,11 @@ link:{ref}/ml-post-data.html[Reference] |=== === ml.previewDatafeed -[source,js] +[source,ts] ---- -client.ml.previewDatafeed([params] [, options] [, callback]) +client.ml.previewDatafeed({ + datafeed_id: string +}) ---- link:{ref}/ml-preview-datafeed.html[Reference] [cols=2*] @@ -5465,9 +6791,12 @@ link:{ref}/ml-preview-datafeed.html[Reference] |=== === ml.putCalendar -[source,js] +[source,ts] ---- -client.ml.putCalendar([params] [, options] [, callback]) +client.ml.putCalendar({ + calendar_id: string, + body: object +}) ---- [cols=2*] |=== @@ -5480,9 +6809,12 @@ client.ml.putCalendar([params] [, options] [, callback]) |=== === ml.putCalendarJob -[source,js] +[source,ts] ---- -client.ml.putCalendarJob([params] [, options] [, callback]) +client.ml.putCalendarJob({ + calendar_id: string, + job_id: string +}) ---- [cols=2*] |=== @@ -5495,9 +6827,12 @@ client.ml.putCalendarJob([params] [, options] [, callback]) |=== === ml.putDataFrameAnalytics -[source,js] +[source,ts] ---- -client.ml.putDataFrameAnalytics([params] [, options] [, callback]) +client.ml.putDataFrameAnalytics({ + id: string, + body: object +}) ---- link:{ref}/put-dfanalytics.html[Reference] [cols=2*] @@ -5511,9 +6846,12 @@ link:{ref}/put-dfanalytics.html[Reference] |=== === ml.putDatafeed -[source,js] +[source,ts] ---- -client.ml.putDatafeed([params] [, options] [, callback]) +client.ml.putDatafeed({ + datafeed_id: string, + body: object +}) ---- link:{ref}/ml-put-datafeed.html[Reference] [cols=2*] @@ -5527,9 +6865,12 @@ link:{ref}/ml-put-datafeed.html[Reference] |=== === ml.putFilter -[source,js] +[source,ts] ---- -client.ml.putFilter([params] [, options] [, callback]) +client.ml.putFilter({ + filter_id: string, + body: object +}) ---- [cols=2*] |=== @@ -5542,9 +6883,12 @@ client.ml.putFilter([params] [, options] [, callback]) |=== === ml.putJob -[source,js] +[source,ts] ---- -client.ml.putJob([params] [, options] [, callback]) +client.ml.putJob({ + job_id: string, + body: object +}) ---- link:{ref}/ml-put-job.html[Reference] [cols=2*] @@ -5558,9 +6902,14 @@ link:{ref}/ml-put-job.html[Reference] |=== === ml.revertModelSnapshot -[source,js] +[source,ts] ---- -client.ml.revertModelSnapshot([params] [, options] [, callback]) +client.ml.revertModelSnapshot({ + job_id: string, + snapshot_id: string, + delete_intervening_results: boolean, + body: object +}) ---- link:{ref}/ml-revert-snapshot.html[Reference] [cols=2*] @@ -5580,9 +6929,12 @@ link:{ref}/ml-revert-snapshot.html[Reference] |=== === ml.setUpgradeMode -[source,js] +[source,ts] ---- -client.ml.setUpgradeMode([params] [, options] [, callback]) +client.ml.setUpgradeMode({ + enabled: boolean, + timeout: string +}) ---- link:{ref}/ml-set-upgrade-mode.html[Reference] [cols=2*] @@ -5596,9 +6948,13 @@ link:{ref}/ml-set-upgrade-mode.html[Reference] |=== === ml.startDataFrameAnalytics -[source,js] +[source,ts] ---- -client.ml.startDataFrameAnalytics([params] [, options] [, callback]) +client.ml.startDataFrameAnalytics({ + id: string, + timeout: string, + body: object +}) ---- link:{ref}/start-dfanalytics.html[Reference] [cols=2*] @@ -5615,9 +6971,15 @@ link:{ref}/start-dfanalytics.html[Reference] |=== === ml.startDatafeed -[source,js] +[source,ts] ---- -client.ml.startDatafeed([params] [, options] [, callback]) +client.ml.startDatafeed({ + datafeed_id: string, + start: string, + end: string, + timeout: string, + body: object +}) ---- link:{ref}/ml-start-datafeed.html[Reference] [cols=2*] @@ -5640,9 +7002,15 @@ link:{ref}/ml-start-datafeed.html[Reference] |=== === ml.stopDataFrameAnalytics -[source,js] +[source,ts] ---- -client.ml.stopDataFrameAnalytics([params] [, options] [, callback]) +client.ml.stopDataFrameAnalytics({ + id: string, + allow_no_match: boolean, + force: boolean, + timeout: string, + body: object +}) ---- link:{ref}/stop-dfanalytics.html[Reference] [cols=2*] @@ -5665,9 +7033,14 @@ link:{ref}/stop-dfanalytics.html[Reference] |=== === ml.stopDatafeed -[source,js] +[source,ts] ---- -client.ml.stopDatafeed([params] [, options] [, callback]) +client.ml.stopDatafeed({ + datafeed_id: string, + allow_no_datafeeds: boolean, + force: boolean, + timeout: string +}) ---- link:{ref}/ml-stop-datafeed.html[Reference] [cols=2*] @@ -5687,9 +7060,12 @@ link:{ref}/ml-stop-datafeed.html[Reference] |=== === ml.updateDatafeed -[source,js] +[source,ts] ---- -client.ml.updateDatafeed([params] [, options] [, callback]) +client.ml.updateDatafeed({ + datafeed_id: string, + body: object +}) ---- link:{ref}/ml-update-datafeed.html[Reference] [cols=2*] @@ -5703,9 +7079,12 @@ link:{ref}/ml-update-datafeed.html[Reference] |=== === ml.updateFilter -[source,js] +[source,ts] ---- -client.ml.updateFilter([params] [, options] [, callback]) +client.ml.updateFilter({ + filter_id: string, + body: object +}) ---- [cols=2*] |=== @@ -5718,9 +7097,12 @@ client.ml.updateFilter([params] [, options] [, callback]) |=== === ml.updateJob -[source,js] +[source,ts] ---- -client.ml.updateJob([params] [, options] [, callback]) +client.ml.updateJob({ + job_id: string, + body: object +}) ---- link:{ref}/ml-update-job.html[Reference] [cols=2*] @@ -5734,9 +7116,13 @@ link:{ref}/ml-update-job.html[Reference] |=== === ml.updateModelSnapshot -[source,js] +[source,ts] ---- -client.ml.updateModelSnapshot([params] [, options] [, callback]) +client.ml.updateModelSnapshot({ + job_id: string, + snapshot_id: string, + body: object +}) ---- link:{ref}/ml-update-snapshot.html[Reference] [cols=2*] @@ -5753,9 +7139,11 @@ link:{ref}/ml-update-snapshot.html[Reference] |=== === ml.validate -[source,js] +[source,ts] ---- -client.ml.validate([params] [, options] [, callback]) +client.ml.validate({ + body: object +}) ---- [cols=2*] |=== @@ -5765,9 +7153,11 @@ client.ml.validate([params] [, options] [, callback]) |=== === ml.validateDetector -[source,js] +[source,ts] ---- -client.ml.validateDetector([params] [, options] [, callback]) +client.ml.validateDetector({ + body: object +}) ---- [cols=2*] |=== @@ -5777,9 +7167,15 @@ client.ml.validateDetector([params] [, options] [, callback]) |=== === monitoring.bulk -[source,js] +[source,ts] ---- -client.monitoring.bulk([params] [, options] [, callback]) +client.monitoring.bulk({ + type: string, + system_id: string, + system_api_version: string, + interval: string, + body: object +}) ---- link:{ref}/es-monitoring.html[Reference] [cols=2*] @@ -5802,9 +7198,11 @@ link:{ref}/es-monitoring.html[Reference] |=== === rollup.deleteJob -[source,js] +[source,ts] ---- -client.rollup.deleteJob([params] [, options] [, callback]) +client.rollup.deleteJob({ + id: string +}) ---- [cols=2*] |=== @@ -5814,9 +7212,11 @@ client.rollup.deleteJob([params] [, options] [, callback]) |=== === rollup.getJobs -[source,js] +[source,ts] ---- -client.rollup.getJobs([params] [, options] [, callback]) +client.rollup.getJobs({ + id: string +}) ---- [cols=2*] |=== @@ -5826,9 +7226,11 @@ client.rollup.getJobs([params] [, options] [, callback]) |=== === rollup.getRollupCaps -[source,js] +[source,ts] ---- -client.rollup.getRollupCaps([params] [, options] [, callback]) +client.rollup.getRollupCaps({ + id: string +}) ---- [cols=2*] |=== @@ -5838,9 +7240,11 @@ client.rollup.getRollupCaps([params] [, options] [, callback]) |=== === rollup.getRollupIndexCaps -[source,js] +[source,ts] ---- -client.rollup.getRollupIndexCaps([params] [, options] [, callback]) +client.rollup.getRollupIndexCaps({ + index: string +}) ---- [cols=2*] |=== @@ -5850,9 +7254,12 @@ client.rollup.getRollupIndexCaps([params] [, options] [, callback]) |=== === rollup.putJob -[source,js] +[source,ts] ---- -client.rollup.putJob([params] [, options] [, callback]) +client.rollup.putJob({ + id: string, + body: object +}) ---- [cols=2*] |=== @@ -5865,14 +7272,20 @@ client.rollup.putJob([params] [, options] [, callback]) |=== === rollup.rollupSearch -[source,js] +[source,ts] ---- -client.rollup.rollupSearch([params] [, options] [, callback]) +client.rollup.rollupSearch({ + index: string | string[], + type: string, + typed_keys: boolean, + rest_total_hits_as_int: boolean, + body: object +}) ---- [cols=2*] |=== |`index` -|`string, string[]` - The indices or index-pattern(s) (containing rollup or regular data) that should be searched +|`string \| string[]` - The indices or index-pattern(s) (containing rollup or regular data) that should be searched |`type` |`string` - The doc type inside the index @@ -5889,9 +7302,11 @@ client.rollup.rollupSearch([params] [, options] [, callback]) |=== === rollup.startJob -[source,js] +[source,ts] ---- -client.rollup.startJob([params] [, options] [, callback]) +client.rollup.startJob({ + id: string +}) ---- [cols=2*] |=== @@ -5901,9 +7316,13 @@ client.rollup.startJob([params] [, options] [, callback]) |=== === rollup.stopJob -[source,js] +[source,ts] ---- -client.rollup.stopJob([params] [, options] [, callback]) +client.rollup.stopJob({ + id: string, + wait_for_completion: boolean, + timeout: string +}) ---- [cols=2*] |=== @@ -5919,17 +7338,21 @@ client.rollup.stopJob([params] [, options] [, callback]) |=== === security.authenticate -[source,js] +[source,ts] ---- -client.security.authenticate([params] [, options] [, callback]) +client.security.authenticate() ---- link:{ref}/security-api-authenticate.html[Reference] === security.changePassword -[source,js] +[source,ts] ---- -client.security.changePassword([params] [, options] [, callback]) +client.security.changePassword({ + username: string, + refresh: 'true' | 'false' | 'wait_for', + body: object +}) ---- link:{ref}/security-api-change-password.html[Reference] [cols=2*] @@ -5938,7 +7361,7 @@ link:{ref}/security-api-change-password.html[Reference] |`string` - The username of the user to change the password for |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |`body` |`object` - the new password for the user @@ -5946,44 +7369,52 @@ link:{ref}/security-api-change-password.html[Reference] |=== === security.clearCachedRealms -[source,js] +[source,ts] ---- -client.security.clearCachedRealms([params] [, options] [, callback]) +client.security.clearCachedRealms({ + realms: string | string[], + usernames: string | string[] +}) ---- link:{ref}/security-api-clear-cache.html[Reference] [cols=2*] |=== |`realms` -|`string, string[]` - Comma-separated list of realms to clear +|`string \| string[]` - Comma-separated list of realms to clear |`usernames` -|`string, string[]` - Comma-separated list of usernames to clear from the cache +|`string \| string[]` - Comma-separated list of usernames to clear from the cache |=== === security.clearCachedRoles -[source,js] +[source,ts] ---- -client.security.clearCachedRoles([params] [, options] [, callback]) +client.security.clearCachedRoles({ + name: string | string[] +}) ---- link:{ref}/security-api-clear-role-cache.html[Reference] [cols=2*] |=== |`name` -|`string, string[]` - Role name +|`string \| string[]` - Role name |=== === security.createApiKey -[source,js] +[source,ts] ---- -client.security.createApiKey([params] [, options] [, callback]) +client.security.createApiKey({ + refresh: 'true' | 'false' | 'wait_for', + body: object +}) ---- link:{ref}/security-api-create-api-key.html[Reference] [cols=2*] |=== |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |`body` |`object` - The api key request to create an API key @@ -5991,9 +7422,13 @@ link:{ref}/security-api-create-api-key.html[Reference] |=== === security.deletePrivileges -[source,js] +[source,ts] ---- -client.security.deletePrivileges([params] [, options] [, callback]) +client.security.deletePrivileges({ + application: string, + name: string, + refresh: 'true' | 'false' | 'wait_for' +}) ---- link:TODO[Reference] [cols=2*] @@ -6005,14 +7440,17 @@ link:TODO[Reference] |`string` - Privilege name |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |=== === security.deleteRole -[source,js] +[source,ts] ---- -client.security.deleteRole([params] [, options] [, callback]) +client.security.deleteRole({ + name: string, + refresh: 'true' | 'false' | 'wait_for' +}) ---- link:{ref}/security-api-delete-role.html[Reference] [cols=2*] @@ -6021,14 +7459,17 @@ link:{ref}/security-api-delete-role.html[Reference] |`string` - Role name |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |=== === security.deleteRoleMapping -[source,js] +[source,ts] ---- -client.security.deleteRoleMapping([params] [, options] [, callback]) +client.security.deleteRoleMapping({ + name: string, + refresh: 'true' | 'false' | 'wait_for' +}) ---- link:{ref}/security-api-delete-role-mapping.html[Reference] [cols=2*] @@ -6037,14 +7478,17 @@ link:{ref}/security-api-delete-role-mapping.html[Reference] |`string` - Role-mapping name |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |=== === security.deleteUser -[source,js] +[source,ts] ---- -client.security.deleteUser([params] [, options] [, callback]) +client.security.deleteUser({ + username: string, + refresh: 'true' | 'false' | 'wait_for' +}) ---- link:{ref}/security-api-delete-user.html[Reference] [cols=2*] @@ -6053,14 +7497,17 @@ link:{ref}/security-api-delete-user.html[Reference] |`string` - username |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |=== === security.disableUser -[source,js] +[source,ts] ---- -client.security.disableUser([params] [, options] [, callback]) +client.security.disableUser({ + username: string, + refresh: 'true' | 'false' | 'wait_for' +}) ---- link:{ref}/security-api-disable-user.html[Reference] [cols=2*] @@ -6069,14 +7516,17 @@ link:{ref}/security-api-disable-user.html[Reference] |`string` - The username of the user to disable |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |=== === security.enableUser -[source,js] +[source,ts] ---- -client.security.enableUser([params] [, options] [, callback]) +client.security.enableUser({ + username: string, + refresh: 'true' | 'false' | 'wait_for' +}) ---- link:{ref}/security-api-enable-user.html[Reference] [cols=2*] @@ -6085,14 +7535,19 @@ link:{ref}/security-api-enable-user.html[Reference] |`string` - The username of the user to enable |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |=== === security.getApiKey -[source,js] +[source,ts] ---- -client.security.getApiKey([params] [, options] [, callback]) +client.security.getApiKey({ + id: string, + name: string, + username: string, + realm_name: string +}) ---- link:{ref}/security-api-get-api-key.html[Reference] [cols=2*] @@ -6112,17 +7567,20 @@ link:{ref}/security-api-get-api-key.html[Reference] |=== === security.getBuiltinPrivileges -[source,js] +[source,ts] ---- -client.security.getBuiltinPrivileges([params] [, options] [, callback]) +client.security.getBuiltinPrivileges() ---- link:{ref}/security-api-get-builtin-privileges.html[Reference] === security.getPrivileges -[source,js] +[source,ts] ---- -client.security.getPrivileges([params] [, options] [, callback]) +client.security.getPrivileges({ + application: string, + name: string +}) ---- link:{ref}/security-api-get-privileges.html[Reference] [cols=2*] @@ -6136,9 +7594,11 @@ link:{ref}/security-api-get-privileges.html[Reference] |=== === security.getRole -[source,js] +[source,ts] ---- -client.security.getRole([params] [, options] [, callback]) +client.security.getRole({ + name: string +}) ---- link:{ref}/security-api-get-role.html[Reference] [cols=2*] @@ -6149,9 +7609,11 @@ link:{ref}/security-api-get-role.html[Reference] |=== === security.getRoleMapping -[source,js] +[source,ts] ---- -client.security.getRoleMapping([params] [, options] [, callback]) +client.security.getRoleMapping({ + name: string +}) ---- link:{ref}/security-api-get-role-mapping.html[Reference] [cols=2*] @@ -6162,9 +7624,11 @@ link:{ref}/security-api-get-role-mapping.html[Reference] |=== === security.getToken -[source,js] +[source,ts] ---- -client.security.getToken([params] [, options] [, callback]) +client.security.getToken({ + body: object +}) ---- link:{ref}/security-api-get-token.html[Reference] [cols=2*] @@ -6175,30 +7639,35 @@ link:{ref}/security-api-get-token.html[Reference] |=== === security.getUser -[source,js] +[source,ts] ---- -client.security.getUser([params] [, options] [, callback]) +client.security.getUser({ + username: string | string[] +}) ---- link:{ref}/security-api-get-user.html[Reference] [cols=2*] |=== |`username` -|`string, string[]` - A comma-separated list of usernames +|`string \| string[]` - A comma-separated list of usernames |=== === security.getUserPrivileges -[source,js] +[source,ts] ---- -client.security.getUserPrivileges([params] [, options] [, callback]) +client.security.getUserPrivileges() ---- link:{ref}/security-api-get-privileges.html[Reference] === security.hasPrivileges -[source,js] +[source,ts] ---- -client.security.hasPrivileges([params] [, options] [, callback]) +client.security.hasPrivileges({ + user: string, + body: object +}) ---- link:{ref}/security-api-has-privileges.html[Reference] [cols=2*] @@ -6212,9 +7681,11 @@ link:{ref}/security-api-has-privileges.html[Reference] |=== === security.invalidateApiKey -[source,js] +[source,ts] ---- -client.security.invalidateApiKey([params] [, options] [, callback]) +client.security.invalidateApiKey({ + body: object +}) ---- link:{ref}/security-api-invalidate-api-key.html[Reference] [cols=2*] @@ -6225,9 +7696,11 @@ link:{ref}/security-api-invalidate-api-key.html[Reference] |=== === security.invalidateToken -[source,js] +[source,ts] ---- -client.security.invalidateToken([params] [, options] [, callback]) +client.security.invalidateToken({ + body: object +}) ---- link:{ref}/security-api-invalidate-token.html[Reference] [cols=2*] @@ -6238,15 +7711,18 @@ link:{ref}/security-api-invalidate-token.html[Reference] |=== === security.putPrivileges -[source,js] +[source,ts] ---- -client.security.putPrivileges([params] [, options] [, callback]) +client.security.putPrivileges({ + refresh: 'true' | 'false' | 'wait_for', + body: object +}) ---- link:TODO[Reference] [cols=2*] |=== |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |`body` |`object` - The privilege(s) to add @@ -6254,9 +7730,13 @@ link:TODO[Reference] |=== === security.putRole -[source,js] +[source,ts] ---- -client.security.putRole([params] [, options] [, callback]) +client.security.putRole({ + name: string, + refresh: 'true' | 'false' | 'wait_for', + body: object +}) ---- link:{ref}/security-api-put-role.html[Reference] [cols=2*] @@ -6265,7 +7745,7 @@ link:{ref}/security-api-put-role.html[Reference] |`string` - Role name |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |`body` |`object` - The role to add @@ -6273,9 +7753,13 @@ link:{ref}/security-api-put-role.html[Reference] |=== === security.putRoleMapping -[source,js] +[source,ts] ---- -client.security.putRoleMapping([params] [, options] [, callback]) +client.security.putRoleMapping({ + name: string, + refresh: 'true' | 'false' | 'wait_for', + body: object +}) ---- link:{ref}/security-api-put-role-mapping.html[Reference] [cols=2*] @@ -6284,7 +7768,7 @@ link:{ref}/security-api-put-role-mapping.html[Reference] |`string` - Role-mapping name |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |`body` |`object` - The role mapping to add @@ -6292,9 +7776,13 @@ link:{ref}/security-api-put-role-mapping.html[Reference] |=== === security.putUser -[source,js] +[source,ts] ---- -client.security.putUser([params] [, options] [, callback]) +client.security.putUser({ + username: string, + refresh: 'true' | 'false' | 'wait_for', + body: object +}) ---- link:{ref}/security-api-put-user.html[Reference] [cols=2*] @@ -6303,7 +7791,7 @@ link:{ref}/security-api-put-user.html[Reference] |`string` - The username of the User |`refresh` -|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. |`body` |`object` - The user to add @@ -6311,9 +7799,11 @@ link:{ref}/security-api-put-user.html[Reference] |=== === sql.clearCursor -[source,js] +[source,ts] ---- -client.sql.clearCursor([params] [, options] [, callback]) +client.sql.clearCursor({ + body: object +}) ---- link:Clear SQL cursor[Reference] [cols=2*] @@ -6324,9 +7814,12 @@ link:Clear SQL cursor[Reference] |=== === sql.query -[source,js] +[source,ts] ---- -client.sql.query([params] [, options] [, callback]) +client.sql.query({ + format: string, + body: object +}) ---- link:Execute SQL[Reference] [cols=2*] @@ -6340,9 +7833,11 @@ link:Execute SQL[Reference] |=== === sql.translate -[source,js] +[source,ts] ---- -client.sql.translate([params] [, options] [, callback]) +client.sql.translate({ + body: object +}) ---- link:Translate SQL into Elasticsearch queries[Reference] [cols=2*] @@ -6353,17 +7848,20 @@ link:Translate SQL into Elasticsearch queries[Reference] |=== === ssl.certificates -[source,js] +[source,ts] ---- -client.ssl.certificates([params] [, options] [, callback]) +client.ssl.certificates() ---- link:{ref}/security-api-ssl.html[Reference] === watcher.ackWatch -[source,js] +[source,ts] ---- -client.watcher.ackWatch([params] [, options] [, callback]) +client.watcher.ackWatch({ + watch_id: string, + action_id: string | string[] +}) ---- link:{ref}/watcher-api-ack-watch.html[Reference] [cols=2*] @@ -6372,14 +7870,16 @@ link:{ref}/watcher-api-ack-watch.html[Reference] |`string` - Watch ID |`action_id` or `actionId` -|`string, string[]` - A comma-separated list of the action ids to be acked +|`string \| string[]` - A comma-separated list of the action ids to be acked |=== === watcher.activateWatch -[source,js] +[source,ts] ---- -client.watcher.activateWatch([params] [, options] [, callback]) +client.watcher.activateWatch({ + watch_id: string +}) ---- link:{ref}/watcher-api-activate-watch.html[Reference] [cols=2*] @@ -6390,9 +7890,11 @@ link:{ref}/watcher-api-activate-watch.html[Reference] |=== === watcher.deactivateWatch -[source,js] +[source,ts] ---- -client.watcher.deactivateWatch([params] [, options] [, callback]) +client.watcher.deactivateWatch({ + watch_id: string +}) ---- link:{ref}/watcher-api-deactivate-watch.html[Reference] [cols=2*] @@ -6403,9 +7905,11 @@ link:{ref}/watcher-api-deactivate-watch.html[Reference] |=== === watcher.deleteWatch -[source,js] +[source,ts] ---- -client.watcher.deleteWatch([params] [, options] [, callback]) +client.watcher.deleteWatch({ + id: string +}) ---- link:{ref}/watcher-api-delete-watch.html[Reference] [cols=2*] @@ -6416,9 +7920,13 @@ link:{ref}/watcher-api-delete-watch.html[Reference] |=== === watcher.executeWatch -[source,js] +[source,ts] ---- -client.watcher.executeWatch([params] [, options] [, callback]) +client.watcher.executeWatch({ + id: string, + debug: boolean, + body: object +}) ---- link:{ref}/watcher-api-execute-watch.html[Reference] [cols=2*] @@ -6435,9 +7943,11 @@ link:{ref}/watcher-api-execute-watch.html[Reference] |=== === watcher.getWatch -[source,js] +[source,ts] ---- -client.watcher.getWatch([params] [, options] [, callback]) +client.watcher.getWatch({ + id: string +}) ---- link:{ref}/watcher-api-get-watch.html[Reference] [cols=2*] @@ -6448,9 +7958,16 @@ link:{ref}/watcher-api-get-watch.html[Reference] |=== === watcher.putWatch -[source,js] +[source,ts] ---- -client.watcher.putWatch([params] [, options] [, callback]) +client.watcher.putWatch({ + id: string, + active: boolean, + version: number, + if_seq_no: number, + if_primary_term: number, + body: object +}) ---- link:{ref}/watcher-api-put-watch.html[Reference] [cols=2*] @@ -6476,26 +7993,30 @@ link:{ref}/watcher-api-put-watch.html[Reference] |=== === watcher.start -[source,js] +[source,ts] ---- -client.watcher.start([params] [, options] [, callback]) +client.watcher.start() ---- link:{ref}/watcher-api-start.html[Reference] === watcher.stats -[source,js] +[source,ts] ---- -client.watcher.stats([params] [, options] [, callback]) +client.watcher.stats({ + metric: string | string[], + metric: string | string[], + emit_stacktraces: boolean +}) ---- link:{ref}/watcher-api-stats.html[Reference] [cols=2*] |=== |`metric` -|`string, string[]` - Controls what additional stat metrics should be include in the response +|`string \| string[]` - Controls what additional stat metrics should be include in the response |`metric` -|`string, string[]` - Controls what additional stat metrics should be include in the response +|`string \| string[]` - Controls what additional stat metrics should be include in the response |`emit_stacktraces` or `emitStacktraces` |`boolean` - Emits stack traces of currently running watches @@ -6503,30 +8024,34 @@ link:{ref}/watcher-api-stats.html[Reference] |=== === watcher.stop -[source,js] +[source,ts] ---- -client.watcher.stop([params] [, options] [, callback]) +client.watcher.stop() ---- link:{ref}/watcher-api-stop.html[Reference] === xpack.info -[source,js] +[source,ts] ---- -client.xpack.info([params] [, options] [, callback]) +client.xpack.info({ + categories: string | string[] +}) ---- link:{ref}/info-api.html[Reference] [cols=2*] |=== |`categories` -|`string, string[]` - Comma-separated list of info categories. Can be any of: build, license, features +|`string \| string[]` - Comma-separated list of info categories. Can be any of: build, license, features |=== === xpack.usage -[source,js] +[source,ts] ---- -client.xpack.usage([params] [, options] [, callback]) +client.xpack.usage({ + master_timeout: string +}) ---- link:Retrieve information about xpack features usage[Reference] [cols=2*] diff --git a/scripts/utils/generateDocs.js b/scripts/utils/generateDocs.js index b17fc3b45..8d4fdae16 100644 --- a/scripts/utils/generateDocs.js +++ b/scripts/utils/generateDocs.js @@ -14,7 +14,9 @@ function generateDocs (common, spec) { //////// This documentation is generated by running: - node scripts/run.js --tag v7.0.0-beta + node scripts/run.js --tag tagName + or + node scripts/run.js --branch branchName ////////\n\n` doc += commonParameters(common) @@ -94,11 +96,23 @@ function generateApiDoc (spec) { }) } + const codeParameters = params + .reduce((acc, val) => { + var code = `${val.name}: ${val.type},` + acc += acc === '' + ? code + : '\n ' + code + + return acc + }, '') + // remove last comma + .slice(0, -1) + var doc = dedent` === ${camelify(name)} - [source,js] + [source,ts] ---- - client.${camelify(name)}([params] [, options] [, callback]) + client.${camelify(name)}(${codeParameters.length > 0 ? `{\n ${codeParameters}\n}` : ''}) ----\n` if (documentationUrl) { doc += `link:${documentationUrl}[Reference]\n` @@ -113,7 +127,7 @@ function generateApiDoc (spec) { : '`' + val.name + '`' acc += dedent` |${name} - |${'`' + val.type + '`'} - ${val.description}` + |${'`' + val.type.replace(/\|/g, '\\|') + '`'} - ${val.description}` if (val.default) { acc += ` +\n_Default:_ ${'`' + val.default + '`'}` } @@ -165,13 +179,13 @@ function fixLink (name, str) { function getType (type, options) { switch (type) { case 'list': - return 'string, string[]' + return 'string | string[]' case 'date': case 'time': case 'timeout': return 'string' case 'enum': - return options.map(k => `'${k}'`).join(', ') + return options.map(k => `'${k}'`).join(' | ') case 'int': case 'double': case 'long':