1
0

disable-users.asciidoc 1.3 KB

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