Search + K

Command Palette

Search for a command to run...

Sign In

Bulk delete roles

DELETE /_security/role
Copy endpoint

The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk delete roles API cannot delete roles that are defined in roles files.

Required authorization

  • Cluster privileges: manage_security

Parameters

query Query Parameters

Name Type
refresh

If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.

type TypesRefresh = "true" | "false" | "wait_for"

Request Body

application/json required
{ names: string[]; }

Responses

200 application/json
{ deleted?: string[];not_found?: string[];errors?: SecurityTypesBulkError
interface SecurityTypesBulkError {
count: number;
details: { };
}
; }