API generation
This commit is contained in:
@ -15,7 +15,6 @@ function buildCatNodes (opts) {
|
||||
'bytes',
|
||||
'format',
|
||||
'full_id',
|
||||
'local',
|
||||
'master_timeout',
|
||||
'h',
|
||||
'help',
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -12,7 +12,7 @@ function buildMlDeleteDataFrameAnalytics (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
|
||||
'force'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
|
||||
@ -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 || {}
|
||||
|
||||
@ -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 || {}
|
||||
|
||||
@ -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 || {}
|
||||
|
||||
@ -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'
|
||||
|
||||
3
api/requestParams.d.ts
vendored
3
api/requestParams.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
||||
@ -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`
|
||||
|
||||
Reference in New Issue
Block a user