Get user privileges API
Get user privileges API
Retrieves the security privileges for the logged in user.
Request
GET /_security/user/_privileges
Prerequisites
- 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
To check whether a user has a specific list of privileges, use the has privileges API.
Examples
GET /_security/user/_privileges
{
"cluster" : [
"all"
],
"global" : [ ],
"indices" : [
{
"names" : [
"*"
],
"privileges" : [
"all"
],
"allow_restricted_indices" : true
}
],
"applications" : [
{
"application" : "*",
"privileges" : [
"*"
],
"resources" : [
"*"
]
}
],
"run_as" : [
"*"
]
}