delete-app-privileges.asciidoc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [role="xpack"]
  2. [[security-api-delete-privilege]]
  3. === Delete application privileges API
  4. ++++
  5. <titleabbrev>Delete application 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. Removes <<application-privileges,application privileges>>.
  13. [[security-api-delete-privilege-request]]
  14. ==== {api-request-title}
  15. `DELETE /_security/privilege/<application>/<privilege>`
  16. [[security-api-delete-privilege-prereqs]]
  17. ==== {api-prereq-title}
  18. To use this API, you must have either:
  19. - the `manage_security` cluster privilege (or a greater privilege such as `all`); _or_
  20. - the _"Manage Application Privileges"_ global privilege for the application being referenced
  21. in the request
  22. [[security-api-delete-privilege-path-params]]
  23. ==== {api-path-parms-title}
  24. `application`::
  25. (Required, string) The name of the application. Application privileges are
  26. always associated with exactly one application.
  27. `privilege`::
  28. (Required, string) The name of the privilege.
  29. [[security-api-delete-privilege-example]]
  30. ==== {api-examples-title}
  31. The following example deletes the `read` application privilege from the
  32. `myapp` application:
  33. [source,console]
  34. --------------------------------------------------
  35. DELETE /_security/privilege/myapp/read
  36. --------------------------------------------------
  37. // TEST[setup:app0102_privileges]
  38. If the privilege is successfully deleted, the request returns `{"found": true}`.
  39. Otherwise, `found` is set to false.
  40. [source,console-result]
  41. --------------------------------------------------
  42. {
  43. "myapp": {
  44. "read": {
  45. "found" : true
  46. }
  47. }
  48. }
  49. --------------------------------------------------