Get builtin privileges API

Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch.

Request

GET /_security/privilege/_builtin

Prerequisites

  • To use this API, you must have - the manage_security cluster privilege (or a greater privilege such as all).

Description

This API retrieves the set of cluster and index privilege names that are available in the version of Elasticsearch that is being queried.

To check whether a user has particular privileges, use the has privileges API.

Response body

The response is an object with two fields:

cluster

(array of string) The list of cluster privileges that are understood by this version of Elasticsearch.

index

(array of string) The list of index privileges that are understood by this version of Elasticsearch.

Examples

The following example retrieves the names of all builtin privileges:

  1. GET /_security/privilege/_builtin

A successful call returns an object with “cluster” and “index” fields.

  1. {
  2. "cluster" : [
  3. "all",
  4. "create_snapshot",
  5. "delegate_pki",
  6. "grant_api_key",
  7. "manage",
  8. "manage_api_key",
  9. "manage_autoscaling",
  10. "manage_ccr",
  11. "manage_data_frame_transforms",
  12. "manage_enrich",
  13. "manage_ilm",
  14. "manage_index_templates",
  15. "manage_ingest_pipelines",
  16. "manage_ml",
  17. "manage_oidc",
  18. "manage_own_api_key",
  19. "manage_pipeline",
  20. "manage_rollup",
  21. "manage_saml",
  22. "manage_security",
  23. "manage_slm",
  24. "manage_token",
  25. "manage_transform",
  26. "manage_watcher",
  27. "monitor",
  28. "monitor_data_frame_transforms",
  29. "monitor_ml",
  30. "monitor_rollup",
  31. "monitor_snapshot",
  32. "monitor_transform",
  33. "monitor_watcher",
  34. "none",
  35. "read_ccr",
  36. "read_ilm",
  37. "read_slm",
  38. "transport_client"
  39. ],
  40. "index" : [
  41. "all",
  42. "auto_configure",
  43. "create",
  44. "create_doc",
  45. "create_index",
  46. "delete",
  47. "delete_index",
  48. "index",
  49. "maintenance",
  50. "manage",
  51. "manage_follow_index",
  52. "manage_ilm",
  53. "manage_leader_index",
  54. "monitor",
  55. "none",
  56. "read",
  57. "read_cross_cluster",
  58. "view_index_metadata",
  59. "write"
  60. ]
  61. }