API generation
This commit is contained in:
@ -382,7 +382,7 @@ MlApi.prototype.deleteTrainedModel = function mlDeleteTrainedModelApi (params, o
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId)
|
||||
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -995,10 +995,10 @@ MlApi.prototype.getTrainedModels = function mlGetTrainedModelsApi (params, optio
|
||||
var path = ''
|
||||
if ((model_id || modelId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId)
|
||||
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ml' + '/' + 'inference'
|
||||
path = '/' + '_ml' + '/' + 'trained_models'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -1021,10 +1021,10 @@ MlApi.prototype.getTrainedModelsStats = function mlGetTrainedModelsStatsApi (par
|
||||
var path = ''
|
||||
if ((model_id || modelId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId) + '/' + '_stats'
|
||||
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) + '/' + '_stats'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ml' + '/' + 'inference' + '/' + '_stats'
|
||||
path = '/' + '_ml' + '/' + 'trained_models' + '/' + '_stats'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -1381,7 +1381,7 @@ MlApi.prototype.putTrainedModel = function mlPutTrainedModelApi (params, options
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId)
|
||||
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -84,6 +84,33 @@ SecurityApi.prototype.changePassword = function securityChangePasswordApi (param
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.clearApiKeyCache = function securityClearApiKeyCacheApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['ids'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: ids')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ids, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'api_key' + '/' + encodeURIComponent(ids) + '/' + '_clear_cache'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.clearCachedPrivileges = function securityClearCachedPrivilegesApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -775,6 +802,7 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca
|
||||
|
||||
Object.defineProperties(SecurityApi.prototype, {
|
||||
change_password: { get () { return this.changePassword } },
|
||||
clear_api_key_cache: { get () { return this.clearApiKeyCache } },
|
||||
clear_cached_privileges: { get () { return this.clearCachedPrivileges } },
|
||||
clear_cached_realms: { get () { return this.clearCachedRealms } },
|
||||
clear_cached_roles: { get () { return this.clearCachedRoles } },
|
||||
|
||||
1
api/kibana.d.ts
vendored
1
api/kibana.d.ts
vendored
@ -378,6 +378,7 @@ interface KibanaClient {
|
||||
security: {
|
||||
authenticate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityAuthenticate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
changePassword<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityChangePassword<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearApiKeyCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearApiKeyCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearCachedPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearCachedRealms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRealms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearCachedRoles<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRoles, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
|
||||
4
api/requestParams.d.ts
vendored
4
api/requestParams.d.ts
vendored
@ -2150,6 +2150,10 @@ export interface SecurityChangePassword<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SecurityClearApiKeyCache extends Generic {
|
||||
ids: string | string[];
|
||||
}
|
||||
|
||||
export interface SecurityClearCachedPrivileges extends Generic {
|
||||
application: string | string[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user