23
23
/* eslint no-unused-vars: 0 */
24
24
25
25
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require ( '../utils' )
26
- const acceptedQuerystring = [ 'allow_no_match' , 'allow_no_jobs' , 'force' , 'timeout' , 'pretty' , 'human' , 'error_trace' , 'source' , 'filter_path' , 'requests_per_second' , 'allow_no_forecasts' , 'wait_for_completion' , 'lines_to_sample' , 'line_merge_size_limit' , 'charset' , 'format' , 'has_header_row' , 'column_names' , 'delimiter' , 'quote' , 'should_trim_fields' , 'grok_pattern' , 'timestamp_field' , 'timestamp_format' , 'explain' , 'calc_interim' , 'start' , 'end' , 'advance_time' , 'skip_time' , 'duration' , 'expires_in' , 'max_model_memory' , 'expand' , 'exclude_interim' , 'from' , 'size' , 'anomaly_score' , 'sort' , 'desc' , 'job_id' , 'partition_field_value' , 'verbose' , 'allow_no_datafeeds' , 'influencer_score' , 'top_n' , 'bucket_span' , 'overall_score' , 'record_score' , 'include' , 'include_model_definition' , 'decompress_definition' , 'tags' , 'for_export ', 'reset_start' , 'reset_end' , 'ignore_unavailable' , 'allow_no_indices' , 'ignore_throttled' , 'expand_wildcards' , 'delete_intervening_results' , 'enabled' ]
27
- const snakeCase = { allowNoMatch : 'allow_no_match' , allowNoJobs : 'allow_no_jobs' , errorTrace : 'error_trace' , filterPath : 'filter_path' , requestsPerSecond : 'requests_per_second' , allowNoForecasts : 'allow_no_forecasts' , waitForCompletion : 'wait_for_completion' , linesToSample : 'lines_to_sample' , lineMergeSizeLimit : 'line_merge_size_limit' , hasHeaderRow : 'has_header_row' , columnNames : 'column_names' , shouldTrimFields : 'should_trim_fields' , grokPattern : 'grok_pattern' , timestampField : 'timestamp_field' , timestampFormat : 'timestamp_format' , calcInterim : 'calc_interim' , advanceTime : 'advance_time' , skipTime : 'skip_time' , expiresIn : 'expires_in' , maxModelMemory : 'max_model_memory' , excludeInterim : 'exclude_interim' , anomalyScore : 'anomaly_score' , jobId : 'job_id' , partitionFieldValue : 'partition_field_value' , allowNoDatafeeds : 'allow_no_datafeeds' , influencerScore : 'influencer_score' , topN : 'top_n' , bucketSpan : 'bucket_span' , overallScore : 'overall_score' , recordScore : 'record_score' , includeModelDefinition : 'include_model_definition' , decompressDefinition : 'decompress_definition' , forExport : 'for_export' , resetStart : 'reset_start' , resetEnd : 'reset_end' , ignoreUnavailable : 'ignore_unavailable' , allowNoIndices : 'allow_no_indices' , ignoreThrottled : 'ignore_throttled' , expandWildcards : 'expand_wildcards' , deleteInterveningResults : 'delete_intervening_results' }
26
+ const acceptedQuerystring = [ 'allow_no_match' , 'allow_no_jobs' , 'force' , 'timeout' , 'pretty' , 'human' , 'error_trace' , 'source' , 'filter_path' , 'requests_per_second' , 'allow_no_forecasts' , 'wait_for_completion' , 'lines_to_sample' , 'line_merge_size_limit' , 'charset' , 'format' , 'has_header_row' , 'column_names' , 'delimiter' , 'quote' , 'should_trim_fields' , 'grok_pattern' , 'timestamp_field' , 'timestamp_format' , 'explain' , 'calc_interim' , 'start' , 'end' , 'advance_time' , 'skip_time' , 'duration' , 'expires_in' , 'max_model_memory' , 'expand' , 'exclude_interim' , 'from' , 'size' , 'anomaly_score' , 'sort' , 'desc' , 'job_id' , 'partition_field_value' , 'for_export' , ' verbose', 'allow_no_datafeeds' , 'influencer_score' , 'top_n' , 'bucket_span' , 'overall_score' , 'record_score' , 'include' , 'include_model_definition' , 'decompress_definition' , 'tags' , 'reset_start' , 'reset_end' , 'ignore_unavailable' , 'allow_no_indices' , 'ignore_throttled' , 'expand_wildcards' , 'delete_intervening_results' , 'enabled' ]
27
+ const snakeCase = { allowNoMatch : 'allow_no_match' , allowNoJobs : 'allow_no_jobs' , errorTrace : 'error_trace' , filterPath : 'filter_path' , requestsPerSecond : 'requests_per_second' , allowNoForecasts : 'allow_no_forecasts' , waitForCompletion : 'wait_for_completion' , linesToSample : 'lines_to_sample' , lineMergeSizeLimit : 'line_merge_size_limit' , hasHeaderRow : 'has_header_row' , columnNames : 'column_names' , shouldTrimFields : 'should_trim_fields' , grokPattern : 'grok_pattern' , timestampField : 'timestamp_field' , timestampFormat : 'timestamp_format' , calcInterim : 'calc_interim' , advanceTime : 'advance_time' , skipTime : 'skip_time' , expiresIn : 'expires_in' , maxModelMemory : 'max_model_memory' , excludeInterim : 'exclude_interim' , anomalyScore : 'anomaly_score' , jobId : 'job_id' , partitionFieldValue : 'partition_field_value' , forExport : 'for_export' , allowNoDatafeeds : 'allow_no_datafeeds' , influencerScore : 'influencer_score' , topN : 'top_n' , bucketSpan : 'bucket_span' , overallScore : 'overall_score' , recordScore : 'record_score' , includeModelDefinition : 'include_model_definition' , decompressDefinition : 'decompress_definition' , resetStart : 'reset_start' , resetEnd : 'reset_end' , ignoreUnavailable : 'ignore_unavailable' , allowNoIndices : 'allow_no_indices' , ignoreThrottled : 'ignore_throttled' , expandWildcards : 'expand_wildcards' , deleteInterveningResults : 'delete_intervening_results' }
28
28
29
29
function MlApi ( transport , ConfigurationError ) {
30
30
this . transport = transport
@@ -382,7 +382,7 @@ MlApi.prototype.deleteTrainedModel = function mlDeleteTrainedModelApi (params, o
382
382
383
383
var path = ''
384
384
if ( method == null ) method = 'DELETE'
385
- path = '/' + '_ml' + '/' + 'inference ' + '/' + encodeURIComponent ( model_id || modelId )
385
+ path = '/' + '_ml' + '/' + 'trained_models ' + '/' + encodeURIComponent ( model_id || modelId )
386
386
387
387
// build request object
388
388
const request = {
@@ -995,10 +995,10 @@ MlApi.prototype.getTrainedModels = function mlGetTrainedModelsApi (params, optio
995
995
var path = ''
996
996
if ( ( model_id || modelId ) != null ) {
997
997
if ( method == null ) method = 'GET'
998
- path = '/' + '_ml' + '/' + 'inference ' + '/' + encodeURIComponent ( model_id || modelId )
998
+ path = '/' + '_ml' + '/' + 'trained_models ' + '/' + encodeURIComponent ( model_id || modelId )
999
999
} else {
1000
1000
if ( method == null ) method = 'GET'
1001
- path = '/' + '_ml' + '/' + 'inference '
1001
+ path = '/' + '_ml' + '/' + 'trained_models '
1002
1002
}
1003
1003
1004
1004
// build request object
@@ -1021,10 +1021,10 @@ MlApi.prototype.getTrainedModelsStats = function mlGetTrainedModelsStatsApi (par
1021
1021
var path = ''
1022
1022
if ( ( model_id || modelId ) != null ) {
1023
1023
if ( method == null ) method = 'GET'
1024
- path = '/' + '_ml' + '/' + 'inference ' + '/' + encodeURIComponent ( model_id || modelId ) + '/' + '_stats'
1024
+ path = '/' + '_ml' + '/' + 'trained_models ' + '/' + encodeURIComponent ( model_id || modelId ) + '/' + '_stats'
1025
1025
} else {
1026
1026
if ( method == null ) method = 'GET'
1027
- path = '/' + '_ml' + '/' + 'inference ' + '/' + '_stats'
1027
+ path = '/' + '_ml' + '/' + 'trained_models ' + '/' + '_stats'
1028
1028
}
1029
1029
1030
1030
// build request object
@@ -1381,7 +1381,7 @@ MlApi.prototype.putTrainedModel = function mlPutTrainedModelApi (params, options
1381
1381
1382
1382
var path = ''
1383
1383
if ( method == null ) method = 'PUT'
1384
- path = '/' + '_ml' + '/' + 'inference ' + '/' + encodeURIComponent ( model_id || modelId )
1384
+ path = '/' + '_ml' + '/' + 'trained_models ' + '/' + encodeURIComponent ( model_id || modelId )
1385
1385
1386
1386
// build request object
1387
1387
const request = {
0 commit comments