Type to search.

Check user privileges

  • POST also GET /_security/user/{user}/_has_privileges
  • POST also GET /_security/user/_has_privileges
Auth The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 6.4 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

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