Update invalidate api key doc for the new ids field (#63860) (#63994)

Follow-up for #63224 and adds the missing doc update for the new ids field.
This commit is contained in:
Yang Wang 2020-10-22 00:19:41 +11:00 committed by GitHub
parent b933bd9f45
commit c1071b1eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 2 deletions

View File

@ -31,8 +31,12 @@ The following parameters can be specified in the body of a DELETE request and
pertain to invalidating api keys:
`id`::
(Optional, string) An API key id. This parameter cannot be used with any of
`name`, `realm_name` or `username` are used.
(Optional, string) An API key id. This parameter cannot be used when any of
`ids`, `name`, `realm_name` or `username` are used.
`ids`::
(Optional, array of string) A list of API key ids. This parameter cannot be used
when any of `id`, `name`, `realm_name`, `username` are used
`name`::
(Optional, string) An API key name. This parameter cannot be used with any of
@ -103,6 +107,17 @@ DELETE /_security/api_key
// TEST[s/VuaCfGcBCdbkQm-e5aOx/$body.id/]
// TEST[continued]
The above request can also be performed using the `ids` field which takes
a list of API keys for bulk invalidation:
[source,console]
--------------------------------------------------
DELETE /_security/api_key
{
"ids" : [ "VuaCfGcBCdbkQm-e5aOx" ]
}
--------------------------------------------------
The following example invalidates the API key identified by specified `name`
immediately: