get-builtin-privileges.asciidoc 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. [role="xpack"]
  2. [[security-api-get-builtin-privileges]]
  3. === Get builtin privileges API
  4. ++++
  5. <titleabbrev>Get builtin privileges</titleabbrev>
  6. ++++
  7. Retrieves the list of <<privileges-list-cluster,cluster privileges>> and
  8. <<privileges-list-indices,index privileges>> that are
  9. available in this version of {es}.
  10. [[security-api-get-builtin-privileges-request]]
  11. ==== {api-request-title}
  12. `GET /_security/privilege/_builtin`
  13. [[security-api-get-builtin-privileges-prereqs]]
  14. ==== {api-prereq-title}
  15. * To use this API, you must have the `read_security` cluster privilege
  16. (or a greater privilege such as `manage_security` or `all`).
  17. [[security-api-get-builtin-privileges-desc]]
  18. ==== {api-description-title}
  19. This API retrieves the set of cluster and index privilege names that are
  20. available in the version of {es} that is being queried.
  21. To check whether a user has particular privileges, use the
  22. <<security-api-has-privileges,has privileges API>>.
  23. [[security-api-get-builtin-privileges-response-body]]
  24. ==== {api-response-body-title}
  25. The response is an object with two fields:
  26. `cluster`:: (array of string) The list of
  27. <<privileges-list-cluster,cluster privileges>> that are understood by this
  28. version of {es}.
  29. `index`:: (array of string) The list of
  30. <<privileges-list-indices,index privileges>> that are understood by this version
  31. of {es}.
  32. [[security-api-get-builtin-privileges-example]]
  33. ==== {api-examples-title}
  34. The following example retrieves the names of all builtin privileges:
  35. [source,console]
  36. --------------------------------------------------
  37. GET /_security/privilege/_builtin
  38. --------------------------------------------------
  39. A successful call returns an object with "cluster" and "index" fields.
  40. [source,console-result]
  41. --------------------------------------------------
  42. {
  43. "cluster" : [
  44. "all",
  45. "cancel_task",
  46. "create_snapshot",
  47. "cross_cluster_replication",
  48. "cross_cluster_search",
  49. "delegate_pki",
  50. "grant_api_key",
  51. "manage",
  52. "manage_api_key",
  53. "manage_autoscaling",
  54. "manage_behavioral_analytics",
  55. "manage_ccr",
  56. "manage_data_frame_transforms",
  57. "manage_enrich",
  58. "manage_ilm",
  59. "manage_index_templates",
  60. "manage_ingest_pipelines",
  61. "manage_logstash_pipelines",
  62. "manage_ml",
  63. "manage_oidc",
  64. "manage_own_api_key",
  65. "manage_pipeline",
  66. "manage_rollup",
  67. "manage_saml",
  68. "manage_search_application",
  69. "manage_search_query_rules",
  70. "manage_search_synonyms",
  71. "manage_security",
  72. "manage_service_account",
  73. "manage_slm",
  74. "manage_token",
  75. "manage_transform",
  76. "manage_user_profile",
  77. "manage_watcher",
  78. "monitor",
  79. "monitor_data_frame_transforms",
  80. "monitor_enrich",
  81. "monitor_ml",
  82. "monitor_rollup",
  83. "monitor_snapshot",
  84. "monitor_text_structure",
  85. "monitor_transform",
  86. "monitor_watcher",
  87. "none",
  88. "post_behavioral_analytics_event",
  89. "read_ccr",
  90. "read_connector_secrets",
  91. "read_fleet_secrets",
  92. "read_ilm",
  93. "read_pipeline",
  94. "read_security",
  95. "read_slm",
  96. "transport_client",
  97. "write_connector_secrets",
  98. "write_fleet_secrets"
  99. ],
  100. "index" : [
  101. "all",
  102. "auto_configure",
  103. "create",
  104. "create_doc",
  105. "create_index",
  106. "cross_cluster_replication",
  107. "cross_cluster_replication_internal",
  108. "delete",
  109. "delete_index",
  110. "index",
  111. "maintenance",
  112. "manage",
  113. "manage_data_stream_lifecycle",
  114. "manage_follow_index",
  115. "manage_ilm",
  116. "manage_leader_index",
  117. "monitor",
  118. "none",
  119. "read",
  120. "read_cross_cluster",
  121. "view_index_metadata",
  122. "write"
  123. ]
  124. }
  125. --------------------------------------------------