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.
NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice.
Body Required
-
A list of profile IDs. The privileges are checked for associated users of the profiles.
-
Additional properties are allowed.
GET
/_security/profile/_has_privileges
curl \
-X GET 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": [
{}
]
}
}
}
}