Check user profile privileges Added in 8.3.0
Determine whether the users associated with the specified user profile IDs have all the requested privileges.
Body Required
-
A list of profile IDs. The privileges are checked for associated users of the profiles.
-
Additional properties are allowed.
POST
/_security/profile/_has_privileges
curl \
-X POST http://api.example.com/_security/profile/_has_privileges \
-H "Content-Type: application/json" \
-d '{"uids":["string"],"privileges":{"application":[{"application":"string","privileges":["string"],"resources":["string"]}],"cluster":["string"],"index":[{"names":"string","privileges":["string"],"allow_restricted_indices":true}]}}'
Request examples
{
"uids": [
"string"
],
"privileges": {
"application": [
{
"application": "string",
"privileges": [
"string"
],
"resources": [
"string"
]
}
],
"cluster": [
"string"
],
"index": [
{
"names": "string",
"privileges": [
"string"
],
"allow_restricted_indices": true
}
]
}
}
Response examples (200)
{
"has_privilege_uids": [
"string"
],
"errors": {
"count": 42.0,
"details": {
"*": {
"type": "string",
"reason": "string",
"stack_trace": "string",
"caused_by": {},
"root_cause": [
{}
],
"suppressed": [
{}
]
}
}
}
}