2018-08-20 17:30:42 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[[security-api-delete-role-mapping]]
|
|
|
|
=== Delete role mappings API
|
2018-12-20 13:23:28 -05:00
|
|
|
++++
|
|
|
|
<titleabbrev>Delete role mappings</titleabbrev>
|
|
|
|
++++
|
2018-08-20 17:30:42 -04:00
|
|
|
|
|
|
|
Removes role mappings.
|
|
|
|
|
|
|
|
==== Request
|
|
|
|
|
2018-12-11 04:13:10 -05:00
|
|
|
`DELETE /_security/role_mapping/<name>`
|
2018-08-20 17:30:42 -04:00
|
|
|
|
|
|
|
==== Description
|
|
|
|
|
|
|
|
Role mappings define which roles are assigned to each user. For more information,
|
|
|
|
see {stack-ov}/mapping-roles.html[Mapping users and groups to roles].
|
|
|
|
|
|
|
|
==== Path Parameters
|
|
|
|
|
|
|
|
`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.
|
|
|
|
|
|
|
|
//==== Request Body
|
|
|
|
|
|
|
|
==== Authorization
|
|
|
|
|
|
|
|
To use this API, you must have at least the `manage_security` cluster privilege.
|
|
|
|
|
|
|
|
|
|
|
|
==== Examples
|
|
|
|
|
|
|
|
The following example delete a role mapping:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2018-12-11 04:13:10 -05:00
|
|
|
DELETE /_security/role_mapping/mapping1
|
2018-08-20 17:30:42 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:role_mapping]
|
|
|
|
|
|
|
|
If the mapping is successfully deleted, the request returns `{"found": true}`.
|
|
|
|
Otherwise, `found` is set to false.
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"found" : true
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// TESTRESPONSE
|