2018-08-18 02:17:33 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[[security-api-enable-user]]
|
|
|
|
=== Enable users API
|
2018-12-20 13:23:28 -05:00
|
|
|
++++
|
|
|
|
<titleabbrev>Enable users</titleabbrev>
|
|
|
|
++++
|
2018-08-18 02:17:33 -04:00
|
|
|
|
|
|
|
Enables users in the native realm.
|
|
|
|
|
|
|
|
|
2019-08-02 13:56:05 -04:00
|
|
|
[[security-api-enable-user-request]]
|
|
|
|
==== {api-request-title}
|
2018-08-18 02:17:33 -04:00
|
|
|
|
2018-12-11 04:13:10 -05:00
|
|
|
`PUT /_security/user/<username>/_enable`
|
2018-08-18 02:17:33 -04:00
|
|
|
|
|
|
|
|
2019-08-02 13:56:05 -04:00
|
|
|
[[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}
|
2018-08-18 02:17:33 -04:00
|
|
|
|
|
|
|
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
|
2019-11-15 18:33:12 -05:00
|
|
|
<<realms>> and <<native-realm>>.
|
2018-08-18 02:17:33 -04:00
|
|
|
|
2019-08-02 13:56:05 -04:00
|
|
|
[[security-api-enable-user-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
2018-08-18 02:17:33 -04:00
|
|
|
|
2019-08-02 13:56:05 -04:00
|
|
|
`username`::
|
|
|
|
(Required, string) An identifier for the user.
|
2018-08-18 02:17:33 -04:00
|
|
|
|
|
|
|
|
2019-08-02 13:56:05 -04:00
|
|
|
[[security-api-enable-user-example]]
|
|
|
|
==== {api-examples-title}
|
2018-08-18 02:17:33 -04:00
|
|
|
|
|
|
|
The following example enables the user `jacknich`:
|
|
|
|
|
2019-09-05 14:12:39 -04:00
|
|
|
[source,console]
|
2018-08-18 02:17:33 -04:00
|
|
|
--------------------------------------------------
|
2018-12-11 04:13:10 -05:00
|
|
|
PUT /_security/user/jacknich/_enable
|
2018-08-18 02:17:33 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[setup:jacknich_user]
|