Skip to content

Commit 6cef0af

Browse files
committed
API generation
1 parent 59559f7 commit 6cef0af

10 files changed

+31
-24
lines changed

api/api/cat.nodes.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ function buildCatNodes (opts) {
1515
'bytes',
1616
'format',
1717
'full_id',
18-
'local',
1918
'master_timeout',
2019
'h',
2120
'help',

api/api/indices.delete_alias.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ function buildIndicesDeleteAlias (opts) {
7979

8080
if ((index) != null && (name) != null) {
8181
if (method == null) method = 'DELETE'
82-
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
82+
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
8383
} else {
8484
if (method == null) method = 'DELETE'
85-
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
85+
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
8686
}
8787

8888
// build request object

api/api/indices.put_alias.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ function buildIndicesPutAlias (opts) {
7979

8080
if ((index) != null && (name) != null) {
8181
if (method == null) method = 'PUT'
82-
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
82+
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
8383
} else {
8484
if (method == null) method = 'PUT'
85-
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
85+
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
8686
}
8787

8888
// build request object

api/api/ml.delete_data_frame_analytics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function buildMlDeleteDataFrameAnalytics (opts) {
1212
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
1313

1414
const acceptedQuerystring = [
15-
15+
'force'
1616
]
1717

1818
const snakeCase = {

api/api/ml.delete_trained_model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function buildMlDeleteTrainedModel (opts) {
2121

2222
/**
2323
* Perform a ml.delete_trained_model request
24-
* TODO
24+
* https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference.html
2525
*/
2626
return function mlDeleteTrainedModel (params, options, callback) {
2727
options = options || {}

api/api/ml.get_trained_models.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@ function buildMlGetTrainedModels (opts) {
1414
const acceptedQuerystring = [
1515
'allow_no_match',
1616
'include_model_definition',
17+
'decompress_definition',
1718
'from',
1819
'size'
1920
]
2021

2122
const snakeCase = {
2223
allowNoMatch: 'allow_no_match',
23-
includeModelDefinition: 'include_model_definition'
24+
includeModelDefinition: 'include_model_definition',
25+
decompressDefinition: 'decompress_definition'
2426

2527
}
2628

2729
/**
2830
* Perform a ml.get_trained_models request
29-
* TODO
31+
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference.html
3032
*/
3133
return function mlGetTrainedModels (params, options, callback) {
3234
options = options || {}

api/api/ml.get_trained_models_stats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function buildMlGetTrainedModelsStats (opts) {
2424

2525
/**
2626
* Perform a ml.get_trained_models_stats request
27-
* TODO
27+
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-stats.html
2828
*/
2929
return function mlGetTrainedModelsStats (params, options, callback) {
3030
options = options || {}

api/api/nodes.hot_threads.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ function buildNodesHotThreads (opts) {
6767

6868
if ((node_id || nodeId) != null) {
6969
if (method == null) method = 'GET'
70-
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
70+
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
7171
} else if ((node_id || nodeId) != null) {
7272
if (method == null) method = 'GET'
73-
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
73+
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
7474
} else if ((node_id || nodeId) != null) {
7575
if (method == null) method = 'GET'
76-
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
76+
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
7777
} else if ((node_id || nodeId) != null) {
7878
if (method == null) method = 'GET'
79-
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
79+
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
8080
} else {
8181
if (method == null) method = 'GET'
8282
path = '/' + '_nodes' + '/' + 'hot_threads'

api/requestParams.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ export interface CatNodes extends Generic {
124124
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
125125
format?: string;
126126
full_id?: boolean;
127-
local?: boolean;
128127
master_timeout?: string;
129128
h?: string | string[];
130129
help?: boolean;
@@ -1578,6 +1577,7 @@ export interface MlDeleteCalendarJob extends Generic {
15781577

15791578
export interface MlDeleteDataFrameAnalytics extends Generic {
15801579
id: string;
1580+
force?: boolean;
15811581
}
15821582

15831583
export interface MlDeleteDatafeed extends Generic {
@@ -1790,6 +1790,7 @@ export interface MlGetTrainedModels extends Generic {
17901790
model_id?: string;
17911791
allow_no_match?: boolean;
17921792
include_model_definition?: boolean;
1793+
decompress_definition?: boolean;
17931794
from?: number;
17941795
size?: number;
17951796
}

docs/reference.asciidoc

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@ client.cat.nodes({
502502
bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
503503
format: string,
504504
full_id: boolean,
505-
local: boolean,
506505
master_timeout: string,
507506
h: string | string[],
508507
help: boolean,
@@ -523,9 +522,6 @@ link:{ref}/cat-nodes.html[Reference]
523522
|`full_id` or `fullId`
524523
|`boolean` - Return the full node ID instead of the shortened version (default: false)
525524

526-
|`local`
527-
|`boolean` - Return local information, do not retrieve the state from master node (default: false)
528-
529525
|`master_timeout` or `masterTimeout`
530526
|`string` - Explicit operation timeout for connection to master node
531527

@@ -6288,7 +6284,8 @@ client.ml.deleteCalendarJob({
62886284
[source,ts]
62896285
----
62906286
client.ml.deleteDataFrameAnalytics({
6291-
id: string
6287+
id: string,
6288+
force: boolean
62926289
})
62936290
----
62946291
link:{ref}/delete-dfanalytics.html[Reference]
@@ -6297,6 +6294,9 @@ link:{ref}/delete-dfanalytics.html[Reference]
62976294
|`id`
62986295
|`string` - The ID of the data frame analytics to delete
62996296

6297+
|`force`
6298+
|`boolean` - True if the job should be forcefully deleted
6299+
63006300
|===
63016301

63026302
=== ml.deleteDatafeed
@@ -6423,7 +6423,7 @@ client.ml.deleteTrainedModel({
64236423
model_id: string
64246424
})
64256425
----
6426-
link:TODO[Reference]
6426+
link:{ref}/delete-inference.html[Reference]
64276427
[cols=2*]
64286428
|===
64296429
|`model_id` or `modelId`
@@ -7130,11 +7130,12 @@ client.ml.getTrainedModels({
71307130
model_id: string,
71317131
allow_no_match: boolean,
71327132
include_model_definition: boolean,
7133+
decompress_definition: boolean,
71337134
from: number,
71347135
size: number
71357136
})
71367137
----
7137-
link:TODO[Reference]
7138+
link:{ref}/get-inference.html[Reference]
71387139
[cols=2*]
71397140
|===
71407141
|`model_id` or `modelId`
@@ -7145,7 +7146,11 @@ link:TODO[Reference]
71457146
_Default:_ `true`
71467147

71477148
|`include_model_definition` or `includeModelDefinition`
7148-
|`boolean` - Should the full model definition be included in the results. These definitions can be large
7149+
|`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.
7150+
7151+
|`decompress_definition` or `decompressDefinition`
7152+
|`boolean` - Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true. +
7153+
_Default:_ `true`
71497154

71507155
|`from`
71517156
|`number` - skips a number of trained models
@@ -7167,7 +7172,7 @@ client.ml.getTrainedModelsStats({
71677172
size: number
71687173
})
71697174
----
7170-
link:TODO[Reference]
7175+
link:{ref}/get-inference-stats.html[Reference]
71717176
[cols=2*]
71727177
|===
71737178
|`model_id` or `modelId`

0 commit comments

Comments
 (0)