get-privileges.asciidoc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --
  2. :api: get-privileges
  3. :request: GetPrivilegesRequest
  4. :response: GetPrivilegesResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Get Privileges API
  9. [id="{upid}-{api}-request"]
  10. ==== Get Privileges Request
  11. The +{request}+ supports getting privilege(s) for all or for specific applications.
  12. ===== Specific privilege of a specific application
  13. ["source","java",subs="attributes,callouts,macros"]
  14. --------------------------------------------------
  15. include-tagged::{doc-tests-file}[{api}-request]
  16. --------------------------------------------------
  17. ===== All privileges of a specific application
  18. ["source","java",subs="attributes,callouts,macros"]
  19. --------------------------------------------------
  20. include-tagged::{doc-tests-file}[get-all-application-privileges-request]
  21. --------------------------------------------------
  22. ===== All privileges of all applications
  23. ["source","java",subs="attributes,callouts,macros"]
  24. --------------------------------------------------
  25. include-tagged::{doc-tests-file}[get-all-privileges-request]
  26. --------------------------------------------------
  27. include::../execution.asciidoc[]
  28. [id="{upid}-{api}-response"]
  29. ==== Get Privileges Response
  30. The returned +{response}+ allows to get information about the retrieved privileges as follows.
  31. ["source","java",subs="attributes,callouts,macros"]
  32. --------------------------------------------------
  33. include-tagged::{doc-tests-file}[{api}-response]
  34. --------------------------------------------------