1
0

put-privileges.asciidoc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --
  2. :api: put-privileges
  3. :request: PutPrivilegesRequest
  4. :response: PutPrivilegesResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Put Privileges API
  9. Application privileges can be created or updated using this API.
  10. [id="{upid}-{api}-request"]
  11. ==== Put Privileges Request
  12. A +{request}+ contains list of application privileges that
  13. need to be created or updated. Each application privilege
  14. consists of an application name, application privilege,
  15. set of actions and optional metadata.
  16. ["source","java",subs="attributes,callouts,macros"]
  17. --------------------------------------------------
  18. include-tagged::{doc-tests-file}[{api}-request]
  19. --------------------------------------------------
  20. include::../execution.asciidoc[]
  21. [id="{upid}-{api}-response"]
  22. ==== Put Privileges Response
  23. The returned +{response}+ contains the information about the status
  24. for each privilege present in the +{request}+. The status would be
  25. `true` if the privilege was created, `false` if the privilege was updated.
  26. ["source","java",subs="attributes,callouts,macros"]
  27. --------------------------------------------------
  28. include-tagged::{doc-tests-file}[{api}-response]
  29. --------------------------------------------------
  30. <1> The response contains the status for given application name and
  31. privilege name. The status would be `true` if the privilege was created,
  32. `false` if the privilege was updated.