disable-users.asciidoc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. [role="xpack"]
  2. [[security-api-disable-user]]
  3. === Disable users API
  4. ++++
  5. <titleabbrev>Disable users</titleabbrev>
  6. ++++
  7. Disables users in the native realm.
  8. [[security-api-disable-user-request]]
  9. ==== {api-request-title}
  10. `PUT /_security/user/<username>/_disable`
  11. [[security-api-disable-user-prereqs]]
  12. ==== {api-prereq-title}
  13. * To use this API, you must have at least the `manage_security` cluster privilege.
  14. [[security-api-disable-user-desc]]
  15. ==== {api-description-title}
  16. By default, when you create users, they are enabled. You can use this API to
  17. revoke a user's access to {es}. To re-enable a user, there is an
  18. <<security-api-enable-user,enable users API>>.
  19. For more information about the native realm, see
  20. <<realms>> and <<native-realm>>.
  21. [[security-api-disable-user-path-params]]
  22. ==== {api-path-parms-title}
  23. `username`::
  24. (Required, string) An identifier for the user.
  25. [[security-api-disable-user-example]]
  26. ==== {api-examples-title}
  27. The following example disables the user `jacknich`:
  28. [source,console]
  29. --------------------------------------------------
  30. PUT /_security/user/jacknich/_disable
  31. --------------------------------------------------
  32. // TEST[setup:jacknich_user]