Check user privileges

  • POST also GET /_security/user/{user}/_has_privileges
  • POST also GET /_security/user/_has_privileges
Auth

Determine whether the specified user has a specified list of privileges. 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.

Read the reference documentation

Path parameters

user string optional

Username

Leave it out to use /_security/user/_has_privileges.

Request body

cluster union anyOf[]

A list of the cluster privileges that you want to check.

Values: all cancel_task create_snapshot cross_cluster_replication cross_cluster_search delegate_pki grant_api_key manage manage_api_key manage_autoscaling manage_behavioral_analytics manage_ccr

Response

application/json
application object required
cluster map string to boolean required
has_all_requested boolean required
index map string to string to boolean required
username string required