Spec-Zone.ru › Elasticsearch 7
›Elasticsearch Guide [7.17] ›REST APIs ›Security APIs

Delete roles API

Removes roles in the native realm.

Request

DELETE /_security/role/<name>

Prerequisites

  • To use this API, you must have at least the manage_security cluster privilege.

Description

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

Path parameters

name
(string) The name of the role.

Examples

The following example deletes a my_admin_role role:

DELETE /_security/role/my_admin_role

If the role is successfully deleted, the request returns {"found": true}. Otherwise, found is set to false.

{
  "found" : true
}

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-api-delete-role.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API