AuthThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.AvailabilityGenerally available since 6.4This 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.
A list of the privileges that you want to check for the specified resources.
It may be either application privilege names or the names of actions that are granted by those privileges
resourcesstring[]required
A list of resource names against which the privileges should be checked.
clusterunionanyOf[]
A list of the cluster privileges that you want to check.
This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices.
Implicitly, restricted indices do not match index patterns because restricted indices usually have limited privileges and including them in pattern tests would render most such tests false.
If restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of allow_restricted_indices.