Delete users
Generally available
Delete users from the native realm.
highlight#highlightFromAnchor" href="#topic-required-authorization"> Required authorization
- Cluster privileges:
manage_security
DELETE
/_security/user/{username}
dropdown#toggle click@window->dropdown#hide touchend@window->dropdown#hide"
data-dropdown-target="button"
data-scrollable="false"
data-headings="false"
aria-expanded="false"
aria-haspopup="true"
role="menu"
tabindex="0">
Console
DELETE /_security/user/jacknich
resp = client.security.delete_user(
username="jacknich",
)
const response = await client.security.deleteUser({
username: "jacknich",
});
response = client.security.delete_user(
username: "jacknich"
)
$resp = $client->security()->deleteUser([
"username" => "jacknich",
]);
curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/user/jacknich"
client.security().deleteUser(d -> d
.username("jacknich")
);
Response examples (200)
A successful response from `DELETE /_security/user/jacknich`.
{
"found" : true
}