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
-
uids
array[string] Required A list of profile IDs. The privileges are checked for associated users of the profiles.
-
privileges
object Required Additional properties are allowed.
POST
/_security/profile/_has_privileges
curl \
--request POST http://api.example.com/_security/profile/_has_privileges \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"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": [
{}
]
}
}
}
}