A newer version is available. For the latest information, see the
current release documentation.
Get user privileges API
editGet user privileges API
editRetrieves the security privileges for the logged in user.
Request
editGET /_security/user/_privileges
Prerequisites
edit- 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.
Description
editTo check whether a user has a specific list of privileges, use the has privileges API.
Examples
editGET /_security/user/_privileges
{ "cluster" : [ "all" ], "global" : [ ], "indices" : [ { "names" : [ "*" ], "privileges" : [ "all" ], "allow_restricted_indices" : true } ], "applications" : [ { "application" : "*", "privileges" : [ "*" ], "resources" : [ "*" ] } ], "run_as" : [ "*" ] }