49 lines
1.0 KiB
Plaintext
49 lines
1.0 KiB
Plaintext
|
[role="xpack"]
|
||
|
[[security-api-delete-user]]
|
||
|
=== Delete users API
|
||
|
|
||
|
Deletes users from the native realm.
|
||
|
|
||
|
==== Request
|
||
|
|
||
|
`DELETE /_xpack/security/user/<username>`
|
||
|
|
||
|
==== Description
|
||
|
|
||
|
For more information about the native realm, see
|
||
|
{stack-ov}/realms.html[Realms] and <<configuring-native-realm>>.
|
||
|
|
||
|
==== Path Parameters
|
||
|
|
||
|
`username` (required)::
|
||
|
(string) An identifier for the user.
|
||
|
|
||
|
//==== Request Body
|
||
|
|
||
|
==== Authorization
|
||
|
|
||
|
To use this API, you must have at least the `manage_security` cluster privilege.
|
||
|
|
||
|
|
||
|
==== Examples
|
||
|
|
||
|
The following example deletes the user `jacknich`:
|
||
|
|
||
|
[source,js]
|
||
|
--------------------------------------------------
|
||
|
DELETE /_xpack/security/user/jacknich
|
||
|
--------------------------------------------------
|
||
|
// CONSOLE
|
||
|
// TEST[setup:jacknich_user]
|
||
|
|
||
|
If the user is successfully deleted, the request returns `{"found": true}`.
|
||
|
Otherwise, `found` is set to false.
|
||
|
|
||
|
[source,js]
|
||
|
--------------------------------------------------
|
||
|
{
|
||
|
"found" : true
|
||
|
}
|
||
|
--------------------------------------------------
|
||
|
// TESTRESPONSE
|