1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- [role="xpack"]
- [[security-api-enable-user]]
- === Enable users API
- ++++
- <titleabbrev>Enable users</titleabbrev>
- ++++
- .New API reference
- [sidebar]
- --
- For the most up-to-date API details, refer to {api-es}/group/endpoint-security[Security APIs].
- --
- Enables users in the native realm.
- [[security-api-enable-user-request]]
- ==== {api-request-title}
- `PUT /_security/user/<username>/_enable`
- [[security-api-enable-user-prereqs]]
- ==== {api-prereq-title}
- * To use this API, you must have at least the `manage_security` cluster privilege.
- [[security-api-enable-user-desc]]
- ==== {api-description-title}
- By default, when you create users, they are enabled. You can use this enable
- users API and the <<security-api-disable-user,disable users API>> to change that attribute.
- For more information about the native realm, see
- <<realms>> and <<native-realm>>.
- [[security-api-enable-user-path-params]]
- ==== {api-path-parms-title}
- `username`::
- (Required, string) An identifier for the user.
- [[security-api-enable-user-example]]
- ==== {api-examples-title}
- The following example enables the user `jacknich`:
- [source,console]
- --------------------------------------------------
- PUT /_security/user/jacknich/_enable
- --------------------------------------------------
- // TEST[setup:jacknich_user]
|