Get user privileges APIedit
Retrieves the security privileges for the logged in user.
Requestedit
GET /_security/user/_privileges
Prerequisitesedit
- All users can use this API, but only to determine their own privileges. To check the privileges of other users, you must use the run as feature. For more information, see Submitting requests on behalf of other users.
Descriptionedit
To check whether a user has a specific list of privileges, use the has privileges API.
Examplesedit
GET /_security/user/_privileges
{ "cluster" : [ "all" ], "global" : [ ], "indices" : [ { "names" : [ "*" ], "privileges" : [ "all" ], "allow_restricted_indices" : true } ], "applications" : [ { "application" : "*", "privileges" : [ "*" ], "resources" : [ "*" ] } ], "run_as" : [ "*" ] }