Check user privileges Added in 6.4.0
Determine whether the specified user has a specified list of privileges.
Body Required
-
application array[object]
-
cluster array[string]
A list of the cluster privileges that you want to check.
-
index array[object]
GET
/_security/user/_has_privileges
curl \
-X GET http://api.example.com/_security/user/_has_privileges \
-H "Content-Type: application/json" \
-d '{"application":[{"application":"string","privileges":["string"],"resources":["string"]}],"cluster":["string"],"index":[{"names":"string","privileges":["string"],"allow_restricted_indices":true}]}'
Request examples
{
"application": [
{
"application": "string",
"privileges": [
"string"
],
"resources": [
"string"
]
}
],
"cluster": [
"string"
],
"index": [
{
"names": "string",
"privileges": [
"string"
],
"allow_restricted_indices": true
}
]
}
Response examples (200)
{
"application": {
"additionalProperty1": {
"additionalProperty1": {
"additionalProperty1": true,
"additionalProperty2": true
},
"additionalProperty2": {
"additionalProperty1": true,
"additionalProperty2": true
}
},
"additionalProperty2": {
"additionalProperty1": {
"additionalProperty1": true,
"additionalProperty2": true
},
"additionalProperty2": {
"additionalProperty1": true,
"additionalProperty2": true
}
}
},
"cluster": {
"additionalProperty1": true,
"additionalProperty2": true
},
"has_all_requested": true,
"index": {
"additionalProperty1": {
"additionalProperty1": true,
"additionalProperty2": true
},
"additionalProperty2": {
"additionalProperty1": true,
"additionalProperty2": true
}
},
"username": "string"
}