get-builtin-privileges.asciidoc 4.1 KB

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