Enable users
Generally available
Enable users in the native realm. By default, when you create users, they are enabled.
Required authorization
- Cluster privileges:
manage_security
Path parameters
-
username
string Required An identifier for the user.
Query parameters
-
refresh
string If
true
(the default) then refresh the affected shards to make this operation visible to search, ifwait_for
then wait for a refresh to make this operation visible to search, iffalse
then do nothing with refreshes.Values are
true
,false
, orwait_for
.
PUT
/_security/user/{username}/_enable
Console
PUT _security/user/logstash_system/_enable
resp = client.security.enable_user(
username="logstash_system",
)
const response = await client.security.enableUser({
username: "logstash_system",
});
response = client.security.enable_user(
username: "logstash_system"
)
$resp = $client->security()->enableUser([
"username" => "logstash_system",
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/user/logstash_system/_enable"