elasticsearch/docs/reference/rest-api/security/delete-app-privileges.asciidoc
James Rodewig 255c9a7f95
[DOCS] Move x-pack docs to docs/reference dir (#99209)
**Problem:**
For historical reasons, source files for the Elasticsearch Guide's security, watcher, and Logstash API docs are housed in the `x-pack/docs` directory. This can confuse new contributors who expect Elasticsearch Guide docs to be located in `docs/reference`. 

**Solution:**
- Move the security, watcher, and Logstash API doc source files to the `docs/reference` directory
- Update doc snippet tests to use security

Rel: https://github.com/elastic/platform-docs-team/issues/208
2023-09-12 14:53:41 -04:00

59 lines
1.6 KiB
Text

[role="xpack"]
[[security-api-delete-privilege]]
=== Delete application privileges API
++++
<titleabbrev>Delete application privileges</titleabbrev>
++++
Removes <<application-privileges,application privileges>>.
[[security-api-delete-privilege-request]]
==== {api-request-title}
`DELETE /_security/privilege/<application>/<privilege>`
[[security-api-delete-privilege-prereqs]]
==== {api-prereq-title}
To use this API, you must have either:
- the `manage_security` cluster privilege (or a greater privilege such as `all`); _or_
- the _"Manage Application Privileges"_ global privilege for the application being referenced
in the request
[[security-api-delete-privilege-path-params]]
==== {api-path-parms-title}
`application`::
(Required, string) The name of the application. Application privileges are
always associated with exactly one application.
`privilege`::
(Required, string) The name of the privilege.
[[security-api-delete-privilege-example]]
==== {api-examples-title}
The following example deletes the `read` application privilege from the
`myapp` application:
[source,console]
--------------------------------------------------
DELETE /_security/privilege/myapp/read
--------------------------------------------------
// TEST[setup:app0102_privileges]
If the privilege is successfully deleted, the request returns `{"found": true}`.
Otherwise, `found` is set to false.
[source,console-result]
--------------------------------------------------
{
"myapp": {
"read": {
"found" : true
}
}
}
--------------------------------------------------