delete-app-privileges.asciidoc 1.6 KB

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