mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
HLRC: Add get users action (#36332)
This commit adds get user action to the high level rest client.
This commit is contained in:
parent
b820d7c617
commit
4b17055035
13 changed files with 607 additions and 12 deletions
48
docs/java-rest/high-level/security/get-users.asciidoc
Normal file
48
docs/java-rest/high-level/security/get-users.asciidoc
Normal file
|
@ -0,0 +1,48 @@
|
|||
|
||||
--
|
||||
:api: get-users
|
||||
:request: GetUsersRequest
|
||||
:respnse: GetUsersResponse
|
||||
--
|
||||
|
||||
[id="{upid}-{api}"]
|
||||
=== Get Users API
|
||||
|
||||
[id="{upid}-{api}-request"]
|
||||
==== Get Users Request
|
||||
|
||||
Retrieving a user can be performed using the `security().getUsers()`
|
||||
method and by setting the username on +{request}+:
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request]
|
||||
--------------------------------------------------
|
||||
|
||||
Retrieving multiple users can be performed using the `security().getUsers()`
|
||||
method and by setting multiple usernames on +{request}+:
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-list-request]
|
||||
--------------------------------------------------
|
||||
|
||||
Retrieving all users can be performed using the `security().getUsers()`
|
||||
method without specifying any usernames on +{request}+:
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-all-request]
|
||||
--------------------------------------------------
|
||||
|
||||
include::../execution.asciidoc[]
|
||||
|
||||
[id="{upid}-{api}-response"]
|
||||
==== Get Users Response
|
||||
|
||||
The returned +{response}+ allows getting information about the retrieved users as follows.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-response]
|
||||
--------------------------------------------------
|
|
@ -387,6 +387,7 @@ include::rollup/get_rollup_index_caps.asciidoc[]
|
|||
The Java High Level REST Client supports the following Security APIs:
|
||||
|
||||
* <<java-rest-high-security-put-user>>
|
||||
* <<{upid}-get-users>>
|
||||
* <<{upid}-delete-user>>
|
||||
* <<java-rest-high-security-enable-user>>
|
||||
* <<java-rest-high-security-disable-user>>
|
||||
|
@ -410,6 +411,7 @@ The Java High Level REST Client supports the following Security APIs:
|
|||
* <<{upid}-delete-privileges>>
|
||||
|
||||
include::security/put-user.asciidoc[]
|
||||
include::security/get-users.asciidoc[]
|
||||
include::security/delete-user.asciidoc[]
|
||||
include::security/enable-user.asciidoc[]
|
||||
include::security/disable-user.asciidoc[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue