60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
[role="xpack"]
|
|
[[security-api-delete-role-mapping]]
|
|
=== Delete role mappings API
|
|
++++
|
|
<titleabbrev>Delete role mappings</titleabbrev>
|
|
++++
|
|
|
|
Removes role mappings.
|
|
|
|
[[security-api-delete-role-mapping-request]]
|
|
==== {api-request-title}
|
|
|
|
`DELETE /_security/role_mapping/<name>`
|
|
|
|
[[security-api-delete-role-mapping-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* To use this API, you must have at least the `manage_security` cluster privilege.
|
|
|
|
[[security-api-delete-role-mapping-desc]]
|
|
==== {api-description-title}
|
|
|
|
Role mappings define which roles are assigned to each user. For more information,
|
|
see <<mapping-roles>>.
|
|
|
|
The role mapping APIs are generally the preferred way to manage role mappings
|
|
rather than using <<mapping-roles-file,role mapping files>>.
|
|
The delete role mappings API cannot remove role mappings that are defined
|
|
in role mapping files.
|
|
|
|
[[security-api-delete-role-mapping-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`name`::
|
|
(string) The distinct name that identifies the role mapping. The name is
|
|
used solely as an identifier to facilitate interaction via the API; it does
|
|
not affect the behavior of the mapping in any way.
|
|
|
|
|
|
[[security-api-delete-role-mapping-example]]
|
|
==== {api-examples-title}
|
|
|
|
The following example delete a role mapping:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
DELETE /_security/role_mapping/mapping1
|
|
--------------------------------------------------
|
|
// TEST[setup:role_mapping]
|
|
|
|
If the mapping is successfully deleted, the request returns `{"found": true}`.
|
|
Otherwise, `found` is set to false.
|
|
|
|
[source,console-result]
|
|
--------------------------------------------------
|
|
{
|
|
"found" : true
|
|
}
|
|
--------------------------------------------------
|