disable-users.asciidoc 976 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. [role="xpack"]
  2. [[security-api-disable-user]]
  3. === Disable users API
  4. Disables users in the native realm.
  5. ==== Request
  6. `PUT /_xpack/security/user/<username>/_disable`
  7. ==== Description
  8. By default, when you create users, they are enabled. You can use this API to
  9. revoke a user's access to {es}. To re-enable a user, there is an
  10. <<security-api-enable-user,enable users API>>.
  11. For more information about the native realm, see
  12. {stack-ov}/realms.html[Realms] and <<configuring-native-realm>>.
  13. ==== Path Parameters
  14. `username` (required)::
  15. (string) An identifier for the user.
  16. //==== Request Body
  17. ==== Authorization
  18. To use this API, you must have at least the `manage_security` cluster privilege.
  19. ==== Examples
  20. The following example disables the user `jacknich`:
  21. [source,js]
  22. --------------------------------------------------
  23. PUT /_xpack/security/user/jacknich/_disable
  24. --------------------------------------------------
  25. // CONSOLE
  26. // TEST[setup:jacknich_user]