delete-role-mappings.asciidoc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. [role="xpack"]
  2. [[security-api-delete-role-mapping]]
  3. === Delete role mappings API
  4. Removes role mappings.
  5. ==== Request
  6. `DELETE /_xpack/security/role_mapping/<name>`
  7. ==== Description
  8. Role mappings define which roles are assigned to each user. For more information,
  9. see {stack-ov}/mapping-roles.html[Mapping users and groups to roles].
  10. ==== Path Parameters
  11. `name`::
  12. (string) The distinct name that identifies the role mapping. The name is
  13. used solely as an identifier to facilitate interaction via the API; it does
  14. not affect the behavior of the mapping in any way.
  15. //==== Request Body
  16. ==== Authorization
  17. To use this API, you must have at least the `manage_security` cluster privilege.
  18. ==== Examples
  19. The following example delete a role mapping:
  20. [source,js]
  21. --------------------------------------------------
  22. DELETE /_xpack/security/role_mapping/mapping1
  23. --------------------------------------------------
  24. // CONSOLE
  25. // TEST[setup:role_mapping]
  26. If the mapping is successfully deleted, the request returns `{"found": true}`.
  27. Otherwise, `found` is set to false.
  28. [source,js]
  29. --------------------------------------------------
  30. {
  31. "found" : true
  32. }
  33. --------------------------------------------------
  34. // TESTRESPONSE