Create or update users | Elasticsearch API documentation (original) (raw)
Dismiss highlight Show more
Path parameters
- An identifier for the user.
NOTE: Usernames must be at least 1 and no more than 507 characters. They can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block. Leading or trailing whitespace is not allowed.
Query parameters
- Valid values are
true
,false
, andwait_for
. These values have the same meaning as in the index API, but the default value for this API is true.
Values aretrue
,false
, orwait_for
.
application/json
Body Required
email string | null
The email of the user.
full_name string | null
The full name of the user.
- Hide metadata attribute Show metadata attribute object
- *
object Additional properties
- *
- A hash of the user's password. This must be produced using the same hashing algorithm as has been configured for password storage. For more details, see the explanation of the
xpack.security.authc.password_hashing.algorithm
setting in the user cache and password hash algorithm documentation. Using this parameter allows the client to pre-hash the password for performance and/or confidentiality reasons. Thepassword
parameter and thepassword_hash
parameter cannot be used in the same request.
External documentation - A set of roles the user has. The roles determine the user's access permissions. To create a user without any roles, specify an empty list (
[]
). - Specifies whether the user is enabled.
Responses
- 200 application/json
Hide response attribute Show response attribute object- A successful call returns a JSON structure that shows whether the user has been created or updated. When an existing user is updated,
created
is set tofalse
.
- A successful call returns a JSON structure that shows whether the user has been created or updated. When an existing user is updated,