Type to search.

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.

About Elasticsearch privileges

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 manage manage_api_key manage_behavioral_analytics manage_enrich manage_esql manage_index_templates manage_inference manage_ingest_pipelines manage_logstash_pipelines manage_ml

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