enable-users.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. [role="xpack"]
  2. [[security-api-enable-user]]
  3. === Enable users API
  4. ++++
  5. <titleabbrev>Enable 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. Enables users in the native realm.
  13. [[security-api-enable-user-request]]
  14. ==== {api-request-title}
  15. `PUT /_security/user/<username>/_enable`
  16. [[security-api-enable-user-prereqs]]
  17. ==== {api-prereq-title}
  18. * To use this API, you must have at least the `manage_security` cluster privilege.
  19. [[security-api-enable-user-desc]]
  20. ==== {api-description-title}
  21. By default, when you create users, they are enabled. You can use this enable
  22. users API and the <<security-api-disable-user,disable users API>> to change that attribute.
  23. For more information about the native realm, see
  24. <<realms>> and <<native-realm>>.
  25. [[security-api-enable-user-path-params]]
  26. ==== {api-path-parms-title}
  27. `username`::
  28. (Required, string) An identifier for the user.
  29. [[security-api-enable-user-example]]
  30. ==== {api-examples-title}
  31. The following example enables the user `jacknich`:
  32. [source,console]
  33. --------------------------------------------------
  34. PUT /_security/user/jacknich/_enable
  35. --------------------------------------------------
  36. // TEST[setup:jacknich_user]