Skip to content

Commit c901c78

Browse files
committed
API generation
1 parent c877e75 commit c901c78

File tree

6 files changed

+68
-10
lines changed

6 files changed

+68
-10
lines changed

api/api/ml.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ MlApi.prototype.deleteTrainedModel = function mlDeleteTrainedModelApi (params, o
382382

383383
var path = ''
384384
if (method == null) method = 'DELETE'
385-
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId)
385+
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
386386

387387
// build request object
388388
const request = {
@@ -995,10 +995,10 @@ MlApi.prototype.getTrainedModels = function mlGetTrainedModelsApi (params, optio
995995
var path = ''
996996
if ((model_id || modelId) != null) {
997997
if (method == null) method = 'GET'
998-
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId)
998+
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
999999
} else {
10001000
if (method == null) method = 'GET'
1001-
path = '/' + '_ml' + '/' + 'inference'
1001+
path = '/' + '_ml' + '/' + 'trained_models'
10021002
}
10031003

10041004
// build request object
@@ -1021,10 +1021,10 @@ MlApi.prototype.getTrainedModelsStats = function mlGetTrainedModelsStatsApi (par
10211021
var path = ''
10221022
if ((model_id || modelId) != null) {
10231023
if (method == null) method = 'GET'
1024-
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId) + '/' + '_stats'
1024+
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) + '/' + '_stats'
10251025
} else {
10261026
if (method == null) method = 'GET'
1027-
path = '/' + '_ml' + '/' + 'inference' + '/' + '_stats'
1027+
path = '/' + '_ml' + '/' + 'trained_models' + '/' + '_stats'
10281028
}
10291029

10301030
// build request object
@@ -1381,7 +1381,7 @@ MlApi.prototype.putTrainedModel = function mlPutTrainedModelApi (params, options
13811381

13821382
var path = ''
13831383
if (method == null) method = 'PUT'
1384-
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId)
1384+
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
13851385

13861386
// build request object
13871387
const request = {

api/api/security.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,33 @@ SecurityApi.prototype.changePassword = function securityChangePasswordApi (param
8484
return this.transport.request(request, options, callback)
8585
}
8686

87+
SecurityApi.prototype.clearApiKeyCache = function securityClearApiKeyCacheApi (params, options, callback) {
88+
;[params, options, callback] = normalizeArguments(params, options, callback)
89+
90+
// check required parameters
91+
if (params['ids'] == null) {
92+
const err = new this[kConfigurationError]('Missing required parameter: ids')
93+
return handleError(err, callback)
94+
}
95+
96+
var { method, body, ids, ...querystring } = params
97+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
98+
99+
var path = ''
100+
if (method == null) method = 'POST'
101+
path = '/' + '_security' + '/' + 'api_key' + '/' + encodeURIComponent(ids) + '/' + '_clear_cache'
102+
103+
// build request object
104+
const request = {
105+
method,
106+
path,
107+
body: body || '',
108+
querystring
109+
}
110+
111+
return this.transport.request(request, options, callback)
112+
}
113+
87114
SecurityApi.prototype.clearCachedPrivileges = function securityClearCachedPrivilegesApi (params, options, callback) {
88115
;[params, options, callback] = normalizeArguments(params, options, callback)
89116

@@ -775,6 +802,7 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca
775802

776803
Object.defineProperties(SecurityApi.prototype, {
777804
change_password: { get () { return this.changePassword } },
805+
clear_api_key_cache: { get () { return this.clearApiKeyCache } },
778806
clear_cached_privileges: { get () { return this.clearCachedPrivileges } },
779807
clear_cached_realms: { get () { return this.clearCachedRealms } },
780808
clear_cached_roles: { get () { return this.clearCachedRoles } },

api/kibana.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ interface KibanaClient {
378378
security: {
379379
authenticate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityAuthenticate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
380380
changePassword<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityChangePassword<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
381+
clearApiKeyCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearApiKeyCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
381382
clearCachedPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
382383
clearCachedRealms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRealms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
383384
clearCachedRoles<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRoles, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>

api/requestParams.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,10 @@ export interface SecurityChangePassword<T = RequestBody> extends Generic {
21502150
body: T;
21512151
}
21522152

2153+
export interface SecurityClearApiKeyCache extends Generic {
2154+
ids: string | string[];
2155+
}
2156+
21532157
export interface SecurityClearCachedPrivileges extends Generic {
21542158
application: string | string[];
21552159
}

docs/reference.asciidoc

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6227,7 +6227,7 @@ client.ml.deleteTrainedModel({
62276227
model_id: string
62286228
})
62296229
----
6230-
link:{ref}/delete-inference.html[Documentation] +
6230+
link:{ref}/delete-trained-models.html[Documentation] +
62316231
[cols=2*]
62326232
|===
62336233
|`model_id` or `modelId`
@@ -7026,7 +7026,7 @@ client.ml.getTrainedModels({
70267026
for_export: boolean
70277027
})
70287028
----
7029-
link:{ref}/get-inference.html[Documentation] +
7029+
link:{ref}/get-trained-models.html[Documentation] +
70307030
[cols=2*]
70317031
|===
70327032
|`model_id` or `modelId`
@@ -7075,7 +7075,7 @@ client.ml.getTrainedModelsStats({
70757075
size: number
70767076
})
70777077
----
7078-
link:{ref}/get-inference-stats.html[Documentation] +
7078+
link:{ref}/get-trained-models-stats.html[Documentation] +
70797079
[cols=2*]
70807080
|===
70817081
|`model_id` or `modelId`
@@ -7340,7 +7340,7 @@ client.ml.putTrainedModel({
73407340
body: object
73417341
})
73427342
----
7343-
link:{ref}/put-inference.html[Documentation] +
7343+
link:{ref}/put-trained-models.html[Documentation] +
73447344
[cols=2*]
73457345
|===
73467346
|`model_id` or `modelId`
@@ -8966,6 +8966,23 @@ link:{ref}/security-api-change-password.html[Documentation] +
89668966

89678967
|===
89688968

8969+
[discrete]
8970+
=== security.clearApiKeyCache
8971+
8972+
[source,ts]
8973+
----
8974+
client.security.clearApiKeyCache({
8975+
ids: string | string[]
8976+
})
8977+
----
8978+
link:{ref}/security-api-clear-api-key-cache.html[Documentation] +
8979+
[cols=2*]
8980+
|===
8981+
|`ids`
8982+
|`string \| string[]` - A comma-separated list of IDs of API keys to clear from the cache
8983+
8984+
|===
8985+
89698986
[discrete]
89708987
=== security.clearCachedPrivileges
89718988

index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,14 @@ declare class Client {
20042004
changePassword<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
20052005
changePassword<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityChangePassword<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
20062006
changePassword<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityChangePassword<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
2007+
clear_api_key_cache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearApiKeyCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
2008+
clear_api_key_cache<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
2009+
clear_api_key_cache<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearApiKeyCache, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
2010+
clear_api_key_cache<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearApiKeyCache, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
2011+
clearApiKeyCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearApiKeyCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
2012+
clearApiKeyCache<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
2013+
clearApiKeyCache<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearApiKeyCache, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
2014+
clearApiKeyCache<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearApiKeyCache, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
20072015
clear_cached_privileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
20082016
clear_cached_privileges<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
20092017
clear_cached_privileges<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearCachedPrivileges, callback: callbackFn<TResponse, TContext>): TransportRequestCallback

0 commit comments

Comments
 (0)