diff --git a/api/api/security.js b/api/api/security.js index f9269b2bd..4926d6cb8 100644 --- a/api/api/security.js +++ b/api/api/security.js @@ -1074,6 +1074,27 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca return this.transport.request(request, options, callback) } +SecurityApi.prototype.queryApiKeys = function securityQueryApiKeysApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + let { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = body == null ? 'GET' : 'POST' + path = '/' + '_security' + '/' + '_query' + '/' + 'api_key' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + SecurityApi.prototype.samlAuthenticate = function securitySamlAuthenticateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) @@ -1272,6 +1293,7 @@ Object.defineProperties(SecurityApi.prototype, { put_role: { get () { return this.putRole } }, put_role_mapping: { get () { return this.putRoleMapping } }, put_user: { get () { return this.putUser } }, + query_api_keys: { get () { return this.queryApiKeys } }, saml_authenticate: { get () { return this.samlAuthenticate } }, saml_complete_logout: { get () { return this.samlCompleteLogout } }, saml_invalidate: { get () { return this.samlInvalidate } }, diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 63bdda001..8aab88c42 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -2421,6 +2421,10 @@ export interface SecurityPutUser extends Generic { body: T; } +export interface SecurityQueryApiKeys extends Generic { + body?: T; +} + export interface SecuritySamlAuthenticate extends Generic { body: T; } diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 805481e4d..7bbdfbfb7 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -9994,6 +9994,23 @@ link:{ref}/security-api-put-user.html[Documentation] + |=== +[discrete] +=== security.queryApiKeys + +[source,ts] +---- +client.security.queryApiKeys({ + body: object +}) +---- +link:{ref}/security-api-query-api-key.html[Documentation] + +[cols=2*] +|=== +|`body` +|`object` - From, size, query, sort and search_after + +|=== + [discrete] === security.samlAuthenticate diff --git a/index.d.ts b/index.d.ts index 365368fdf..8e923d6c1 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2462,6 +2462,14 @@ declare class Client { putUser, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback putUser, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityPutUser, callback: callbackFn): TransportRequestCallback putUser, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityPutUser, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + query_api_keys, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityQueryApiKeys, options?: TransportRequestOptions): TransportRequestPromise> + query_api_keys, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + query_api_keys, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityQueryApiKeys, callback: callbackFn): TransportRequestCallback + query_api_keys, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityQueryApiKeys, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + queryApiKeys, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityQueryApiKeys, options?: TransportRequestOptions): TransportRequestPromise> + queryApiKeys, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + queryApiKeys, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityQueryApiKeys, callback: callbackFn): TransportRequestCallback + queryApiKeys, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityQueryApiKeys, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback saml_authenticate, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlAuthenticate, options?: TransportRequestOptions): TransportRequestPromise> saml_authenticate, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback saml_authenticate, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlAuthenticate, callback: callbackFn): TransportRequestCallback