You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: x-pack/docs/en/rest-api/security/get-api-keys.asciidoc
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,13 @@ Retrieves information for one or more API keys.
15
15
[[security-api-get-api-key-prereqs]]
16
16
==== {api-prereq-title}
17
17
18
-
* To use this API, you must have at least the `manage_own_api_key` or the
18
+
* To use this API, you must have at least the `manage_own_api_key` or the
19
19
`read_security` cluster privileges.
20
20
** If you only have the `manage_own_api_key` privilege, this API only returns
21
-
the API keys that you own.
21
+
the API keys that you own.
22
22
+
23
23
NOTE: Authenticating with an API key that has the `manage_own_api_key` privilege
24
-
does not allow retrieving the authenticated user's own keys. Instead,
24
+
does not allow retrieving the authenticated user's own keys. Instead,
25
25
authenticate the user with basic credentials.
26
26
** If you have `read_security`, `manage_api_key` or greater
27
27
privileges (including `manage_security`), this API returns all API keys
@@ -67,6 +67,12 @@ associated with the API key. An API key's actual permission is the intersection
67
67
its <<api-key-role-descriptors,assigned role descriptors>> and the owner user's role descriptors
68
68
(effectively limited by it). An API key must have `manage_api_key` or higher privileges to retrieve the limited-by role descriptors of any API key, including itself.
69
69
70
+
`active_only`::
71
+
(Optional, Boolean) A boolean flag that can be used to query API keys that are currently active.
72
+
An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together
73
+
with other parameters such as `owner` or `name`. If `active_only` is `false`, the response will
74
+
include both active and inactive (expired or invalidated) keys. Defaults to `false`.
75
+
70
76
NOTE: When none of the parameters "id", "name", "username" and "realm_name"
71
77
are specified, and the "owner" is set to false then it will retrieve all API
72
78
keys if the user is authorized. If the user is not authorized to retrieve other user's
0 commit comments