diff --git a/api/api/cat.nodes.js b/api/api/cat.nodes.js index 01923de06..f6c45d534 100644 --- a/api/api/cat.nodes.js +++ b/api/api/cat.nodes.js @@ -15,7 +15,6 @@ function buildCatNodes (opts) { 'bytes', 'format', 'full_id', - 'local', 'master_timeout', 'h', 'help', diff --git a/api/api/indices.delete_alias.js b/api/api/indices.delete_alias.js index f10bb25d5..7f5da226b 100644 --- a/api/api/indices.delete_alias.js +++ b/api/api/indices.delete_alias.js @@ -79,10 +79,10 @@ function buildIndicesDeleteAlias (opts) { if ((index) != null && (name) != null) { if (method == null) method = 'DELETE' - path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name) + path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name) } else { if (method == null) method = 'DELETE' - path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name) + path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name) } // build request object diff --git a/api/api/indices.put_alias.js b/api/api/indices.put_alias.js index bb32f3098..4e72de0d6 100644 --- a/api/api/indices.put_alias.js +++ b/api/api/indices.put_alias.js @@ -79,10 +79,10 @@ function buildIndicesPutAlias (opts) { if ((index) != null && (name) != null) { if (method == null) method = 'PUT' - path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name) + path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name) } else { if (method == null) method = 'PUT' - path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name) + path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name) } // build request object diff --git a/api/api/ml.delete_data_frame_analytics.js b/api/api/ml.delete_data_frame_analytics.js index fd7711a0e..a64404902 100644 --- a/api/api/ml.delete_data_frame_analytics.js +++ b/api/api/ml.delete_data_frame_analytics.js @@ -12,7 +12,7 @@ function buildMlDeleteDataFrameAnalytics (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ - + 'force' ] const snakeCase = { diff --git a/api/api/ml.delete_trained_model.js b/api/api/ml.delete_trained_model.js index 66be6a2c4..163f1b2b1 100644 --- a/api/api/ml.delete_trained_model.js +++ b/api/api/ml.delete_trained_model.js @@ -21,7 +21,7 @@ function buildMlDeleteTrainedModel (opts) { /** * Perform a ml.delete_trained_model request - * TODO + * https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference.html */ return function mlDeleteTrainedModel (params, options, callback) { options = options || {} diff --git a/api/api/ml.get_trained_models.js b/api/api/ml.get_trained_models.js index 83f26a323..e369d43a7 100644 --- a/api/api/ml.get_trained_models.js +++ b/api/api/ml.get_trained_models.js @@ -14,19 +14,21 @@ function buildMlGetTrainedModels (opts) { const acceptedQuerystring = [ 'allow_no_match', 'include_model_definition', + 'decompress_definition', 'from', 'size' ] const snakeCase = { allowNoMatch: 'allow_no_match', - includeModelDefinition: 'include_model_definition' + includeModelDefinition: 'include_model_definition', + decompressDefinition: 'decompress_definition' } /** * Perform a ml.get_trained_models request - * TODO + * https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference.html */ return function mlGetTrainedModels (params, options, callback) { options = options || {} diff --git a/api/api/ml.get_trained_models_stats.js b/api/api/ml.get_trained_models_stats.js index 3279891f2..459c8ac57 100644 --- a/api/api/ml.get_trained_models_stats.js +++ b/api/api/ml.get_trained_models_stats.js @@ -24,7 +24,7 @@ function buildMlGetTrainedModelsStats (opts) { /** * Perform a ml.get_trained_models_stats request - * TODO + * https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-stats.html */ return function mlGetTrainedModelsStats (params, options, callback) { options = options || {} diff --git a/api/api/nodes.hot_threads.js b/api/api/nodes.hot_threads.js index be4fcaa5a..6e2a44d4b 100644 --- a/api/api/nodes.hot_threads.js +++ b/api/api/nodes.hot_threads.js @@ -67,16 +67,16 @@ function buildNodesHotThreads (opts) { if ((node_id || nodeId) != null) { if (method == null) method = 'GET' - path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads' - } else if ((node_id || nodeId) != null) { - if (method == null) method = 'GET' - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads' + path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads' } else if ((node_id || nodeId) != null) { if (method == null) method = 'GET' path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads' } else if ((node_id || nodeId) != null) { if (method == null) method = 'GET' - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads' + path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads' + } else if ((node_id || nodeId) != null) { + if (method == null) method = 'GET' + path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads' } else { if (method == null) method = 'GET' path = '/' + '_nodes' + '/' + 'hot_threads' diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index cfdbb5bf6..60e27bf1e 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -124,7 +124,6 @@ export interface CatNodes extends Generic { bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; format?: string; full_id?: boolean; - local?: boolean; master_timeout?: string; h?: string | string[]; help?: boolean; @@ -1578,6 +1577,7 @@ export interface MlDeleteCalendarJob extends Generic { export interface MlDeleteDataFrameAnalytics extends Generic { id: string; + force?: boolean; } export interface MlDeleteDatafeed extends Generic { @@ -1790,6 +1790,7 @@ export interface MlGetTrainedModels extends Generic { model_id?: string; allow_no_match?: boolean; include_model_definition?: boolean; + decompress_definition?: boolean; from?: number; size?: number; } diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 5acce1242..efb5a75ed 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -502,7 +502,6 @@ client.cat.nodes({ bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', format: string, full_id: boolean, - local: boolean, master_timeout: string, h: string | string[], help: boolean, @@ -523,9 +522,6 @@ link:{ref}/cat-nodes.html[Reference] |`full_id` or `fullId` |`boolean` - Return the full node ID instead of the shortened version (default: false) -|`local` -|`boolean` - Return local information, do not retrieve the state from master node (default: false) - |`master_timeout` or `masterTimeout` |`string` - Explicit operation timeout for connection to master node @@ -6288,7 +6284,8 @@ client.ml.deleteCalendarJob({ [source,ts] ---- client.ml.deleteDataFrameAnalytics({ - id: string + id: string, + force: boolean }) ---- link:{ref}/delete-dfanalytics.html[Reference] @@ -6297,6 +6294,9 @@ link:{ref}/delete-dfanalytics.html[Reference] |`id` |`string` - The ID of the data frame analytics to delete +|`force` +|`boolean` - True if the job should be forcefully deleted + |=== === ml.deleteDatafeed @@ -6423,7 +6423,7 @@ client.ml.deleteTrainedModel({ model_id: string }) ---- -link:TODO[Reference] +link:{ref}/delete-inference.html[Reference] [cols=2*] |=== |`model_id` or `modelId` @@ -7130,11 +7130,12 @@ client.ml.getTrainedModels({ model_id: string, allow_no_match: boolean, include_model_definition: boolean, + decompress_definition: boolean, from: number, size: number }) ---- -link:TODO[Reference] +link:{ref}/get-inference.html[Reference] [cols=2*] |=== |`model_id` or `modelId` @@ -7145,7 +7146,11 @@ link:TODO[Reference] _Default:_ `true` |`include_model_definition` or `includeModelDefinition` -|`boolean` - Should the full model definition be included in the results. These definitions can be large +|`boolean` - Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false. + +|`decompress_definition` or `decompressDefinition` +|`boolean` - Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true. + +_Default:_ `true` |`from` |`number` - skips a number of trained models @@ -7167,7 +7172,7 @@ client.ml.getTrainedModelsStats({ size: number }) ---- -link:TODO[Reference] +link:{ref}/get-inference-stats.html[Reference] [cols=2*] |=== |`model_id` or `modelId`