elasticsearch/docs/reference/rest-api/security/delete-users.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

52 lines
1.2 KiB
Text

[role="xpack"]
[[security-api-delete-user]]
=== Delete users API
++++
<titleabbrev>Delete users</titleabbrev>
++++
Deletes users from the native realm.
[[security-api-delete-user-request]]
==== {api-request-title}
`DELETE /_security/user/<username>`
[[security-api-delete-user-prereqs]]
==== {api-prereq-title}
* To use this API, you must have at least the `manage_security` cluster privilege.
[[security-api-delete-user-desc]]
==== {api-description-title}
For more information about the native realm, see
<<realms>> and <<native-realm>>.
[[security-api-delete-user-path-params]]
==== {api-path-parms-title}
`username`::
(Required, string) An identifier for the user.
[[security-api-delete-user-example]]
==== {api-examples-title}
The following example deletes the user `jacknich`:
[source,console]
--------------------------------------------------
DELETE /_security/user/jacknich
--------------------------------------------------
// TEST[setup:jacknich_user]
If the user is successfully deleted, the request returns `{"found": true}`.
Otherwise, `found` is set to false.
[source,console-result]
--------------------------------------------------
{
"found" : true
}
--------------------------------------------------