API generation
This commit is contained in:
83
api/api/cat.ml.datafeeds.js
Normal file
83
api/api/cat.ml.datafeeds.js
Normal file
@ -0,0 +1,83 @@
|
||||
// Licensed to Elasticsearch B.V under one or more agreements.
|
||||
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
// See the LICENSE file in the project root for more information
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildCatMlDatafeeds (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_datafeeds',
|
||||
'format',
|
||||
'h',
|
||||
'help',
|
||||
's',
|
||||
'time',
|
||||
'v'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoDatafeeds: 'allow_no_datafeeds'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a cat.ml.datafeeds request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
|
||||
*/
|
||||
return function catMlDatafeeds (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, datafeedId, datafeed_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((datafeed_id || datafeedId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildCatMlDatafeeds
|
||||
86
api/api/cat.ml.trained_models.js
Normal file
86
api/api/cat.ml.trained_models.js
Normal file
@ -0,0 +1,86 @@
|
||||
// Licensed to Elasticsearch B.V under one or more agreements.
|
||||
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
// See the LICENSE file in the project root for more information
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildCatMlTrainedModels (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'from',
|
||||
'size',
|
||||
'bytes',
|
||||
'format',
|
||||
'h',
|
||||
'help',
|
||||
's',
|
||||
'time',
|
||||
'v'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a cat.ml.trained_models request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-stats.html
|
||||
*/
|
||||
return function catMlTrainedModels (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, modelId, model_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((model_id || modelId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildCatMlTrainedModels
|
||||
@ -21,7 +21,7 @@ function buildCcrForgetFollower (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ccr.forget_follower request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html
|
||||
*/
|
||||
return function ccrForgetFollower (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildCcrUnfollow (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ccr.unfollow request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html
|
||||
*/
|
||||
return function ccrUnfollow (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMigrationDeprecations (opts) {
|
||||
|
||||
/**
|
||||
* Perform a migration.deprecations request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html
|
||||
*/
|
||||
return function migrationDeprecations (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -24,7 +24,7 @@ function buildMlCloseJob (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.close_job request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html
|
||||
*/
|
||||
return function mlCloseJob (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlDeleteDataFrameAnalytics (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.delete_data_frame_analytics request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html
|
||||
*/
|
||||
return function mlDeleteDataFrameAnalytics (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlDeleteDatafeed (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.delete_datafeed request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html
|
||||
*/
|
||||
return function mlDeleteDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -23,7 +23,7 @@ function buildMlDeleteForecast (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.delete_forecast request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html
|
||||
*/
|
||||
return function mlDeleteForecast (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -22,7 +22,7 @@ function buildMlDeleteJob (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.delete_job request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html
|
||||
*/
|
||||
return function mlDeleteJob (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlDeleteModelSnapshot (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.delete_model_snapshot request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html
|
||||
*/
|
||||
return function mlDeleteModelSnapshot (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlEvaluateDataFrame (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.evaluate_data_frame request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html
|
||||
*/
|
||||
return function mlEvaluateDataFrame (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -42,7 +42,7 @@ function buildMlFindFileStructure (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.find_file_structure request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html
|
||||
*/
|
||||
return function mlFindFileStructure (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -27,7 +27,7 @@ function buildMlFlushJob (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.flush_job request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html
|
||||
*/
|
||||
return function mlFlushJob (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -31,7 +31,7 @@ function buildMlGetBuckets (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_buckets request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html
|
||||
*/
|
||||
return function mlGetBuckets (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -22,7 +22,7 @@ function buildMlGetCategories (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_categories request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html
|
||||
*/
|
||||
return function mlGetCategories (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -24,7 +24,7 @@ function buildMlGetDataFrameAnalytics (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_data_frame_analytics request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html
|
||||
*/
|
||||
return function mlGetDataFrameAnalytics (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -24,7 +24,7 @@ function buildMlGetDataFrameAnalyticsStats (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_data_frame_analytics_stats request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html
|
||||
*/
|
||||
return function mlGetDataFrameAnalyticsStats (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlGetDatafeedStats (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_datafeed_stats request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
|
||||
*/
|
||||
return function mlGetDatafeedStats (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlGetDatafeeds (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_datafeeds request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html
|
||||
*/
|
||||
return function mlGetDatafeeds (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -30,7 +30,7 @@ function buildMlGetInfluencers (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_influencers request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html
|
||||
*/
|
||||
return function mlGetInfluencers (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlGetJobStats (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_job_stats request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html
|
||||
*/
|
||||
return function mlGetJobStats (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlGetJobs (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_jobs request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html
|
||||
*/
|
||||
return function mlGetJobs (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -26,7 +26,7 @@ function buildMlGetModelSnapshots (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_model_snapshots request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html
|
||||
*/
|
||||
return function mlGetModelSnapshots (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -31,7 +31,7 @@ function buildMlGetOverallBuckets (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_overall_buckets request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html
|
||||
*/
|
||||
return function mlGetOverallBuckets (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -30,7 +30,7 @@ function buildMlGetRecords (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_records request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html
|
||||
*/
|
||||
return function mlGetRecords (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlOpenJob (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.open_job request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html
|
||||
*/
|
||||
return function mlOpenJob (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -23,7 +23,7 @@ function buildMlPostData (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.post_data request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html
|
||||
*/
|
||||
return function mlPostData (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlPreviewDatafeed (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.preview_datafeed request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html
|
||||
*/
|
||||
return function mlPreviewDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlPutDataFrameAnalytics (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.put_data_frame_analytics request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html
|
||||
*/
|
||||
return function mlPutDataFrameAnalytics (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlPutDatafeed (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.put_datafeed request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
|
||||
*/
|
||||
return function mlPutDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlPutJob (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.put_job request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html
|
||||
*/
|
||||
return function mlPutJob (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlRevertModelSnapshot (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.revert_model_snapshot request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html
|
||||
*/
|
||||
return function mlRevertModelSnapshot (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -22,7 +22,7 @@ function buildMlSetUpgradeMode (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.set_upgrade_mode request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html
|
||||
*/
|
||||
return function mlSetUpgradeMode (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlStartDataFrameAnalytics (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.start_data_frame_analytics request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html
|
||||
*/
|
||||
return function mlStartDataFrameAnalytics (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -23,7 +23,7 @@ function buildMlStartDatafeed (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.start_datafeed request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html
|
||||
*/
|
||||
return function mlStartDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -24,7 +24,7 @@ function buildMlStopDataFrameAnalytics (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.stop_data_frame_analytics request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html
|
||||
*/
|
||||
return function mlStopDataFrameAnalytics (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -24,7 +24,7 @@ function buildMlStopDatafeed (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.stop_datafeed request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html
|
||||
*/
|
||||
return function mlStopDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlUpdateDatafeed (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.update_datafeed request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html
|
||||
*/
|
||||
return function mlUpdateDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlUpdateJob (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.update_job request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html
|
||||
*/
|
||||
return function mlUpdateJob (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlUpdateModelSnapshot (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.update_model_snapshot request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html
|
||||
*/
|
||||
return function mlUpdateModelSnapshot (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildSecurityDeletePrivileges (opts) {
|
||||
|
||||
/**
|
||||
* Perform a security.delete_privileges request
|
||||
* TODO
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html
|
||||
*/
|
||||
return function securityDeletePrivileges (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildSecurityPutPrivileges (opts) {
|
||||
|
||||
/**
|
||||
* Perform a security.put_privileges request
|
||||
* TODO
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html
|
||||
*/
|
||||
return function securityPutPrivileges (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildWatcherAckWatch (opts) {
|
||||
|
||||
/**
|
||||
* Perform a watcher.ack_watch request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html
|
||||
*/
|
||||
return function watcherAckWatch (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildWatcherDeleteWatch (opts) {
|
||||
|
||||
/**
|
||||
* Perform a watcher.delete_watch request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html
|
||||
*/
|
||||
return function watcherDeleteWatch (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildWatcherExecuteWatch (opts) {
|
||||
|
||||
/**
|
||||
* Perform a watcher.execute_watch request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html
|
||||
*/
|
||||
return function watcherExecuteWatch (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildWatcherGetWatch (opts) {
|
||||
|
||||
/**
|
||||
* Perform a watcher.get_watch request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html
|
||||
*/
|
||||
return function watcherGetWatch (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -25,7 +25,7 @@ function buildWatcherPutWatch (opts) {
|
||||
|
||||
/**
|
||||
* Perform a watcher.put_watch request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html
|
||||
*/
|
||||
return function watcherPutWatch (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildWatcherStart (opts) {
|
||||
|
||||
/**
|
||||
* Perform a watcher.start request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html
|
||||
*/
|
||||
return function watcherStart (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -22,7 +22,7 @@ function buildWatcherStats (opts) {
|
||||
|
||||
/**
|
||||
* Perform a watcher.stats request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html
|
||||
*/
|
||||
return function watcherStats (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -21,7 +21,7 @@ function buildWatcherStop (opts) {
|
||||
|
||||
/**
|
||||
* Perform a watcher.stop request
|
||||
* http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html
|
||||
*/
|
||||
return function watcherStop (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -27,7 +27,10 @@ function ESAPI (opts) {
|
||||
indices: lazyLoad('cat.indices', opts),
|
||||
master: lazyLoad('cat.master', opts),
|
||||
ml: {
|
||||
jobs: lazyLoad('cat.ml.jobs', opts)
|
||||
datafeeds: lazyLoad('cat.ml.datafeeds', opts),
|
||||
jobs: lazyLoad('cat.ml.jobs', opts),
|
||||
trained_models: lazyLoad('cat.ml.trained_models', opts),
|
||||
trainedModels: lazyLoad('cat.ml.trained_models', opts)
|
||||
},
|
||||
nodeattrs: lazyLoad('cat.nodeattrs', opts),
|
||||
nodes: lazyLoad('cat.nodes', opts),
|
||||
|
||||
29
api/requestParams.d.ts
vendored
29
api/requestParams.d.ts
vendored
@ -1036,7 +1036,7 @@ export interface Reindex<T = any> extends Generic {
|
||||
wait_for_completion?: boolean;
|
||||
requests_per_second?: number;
|
||||
scroll?: string;
|
||||
slices?: number;
|
||||
slices?: number|string;
|
||||
max_docs?: number;
|
||||
body: T;
|
||||
}
|
||||
@ -1306,7 +1306,7 @@ export interface UpdateByQuery<T = any> extends Generic {
|
||||
scroll_size?: number;
|
||||
wait_for_completion?: boolean;
|
||||
requests_per_second?: number;
|
||||
slices?: number;
|
||||
slices?: number|string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
@ -1315,6 +1315,17 @@ export interface UpdateByQueryRethrottle extends Generic {
|
||||
requests_per_second: number;
|
||||
}
|
||||
|
||||
export interface CatMlDatafeeds extends Generic {
|
||||
datafeed_id?: string;
|
||||
allow_no_datafeeds?: boolean;
|
||||
format?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
s?: string | string[];
|
||||
time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)';
|
||||
v?: boolean;
|
||||
}
|
||||
|
||||
export interface CatMlJobs extends Generic {
|
||||
job_id?: string;
|
||||
allow_no_jobs?: boolean;
|
||||
@ -1327,6 +1338,20 @@ export interface CatMlJobs extends Generic {
|
||||
v?: boolean;
|
||||
}
|
||||
|
||||
export interface CatMlTrainedModels extends Generic {
|
||||
model_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
from?: number;
|
||||
size?: number;
|
||||
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
|
||||
format?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
s?: string | string[];
|
||||
time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)';
|
||||
v?: boolean;
|
||||
}
|
||||
|
||||
export interface CcrDeleteAutoFollowPattern extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user