It is time to say goodbye: This version of Elastic Cloud Enterprise has reached end-of-life (EOL) and is no longer supported.
The documentation for this version is no longer being maintained. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Creates a new user
editCreates a new user
editCreates a new user.
Request
editPOST /api/v1/users
Responses
edit-
200
-
(
User
) User successfully created -
400
-
(
BasicFailedReply
) Invalid request. (code: 'user.bad_request') -
403
-
(
BasicFailedReply
) Invalid permissions -
409
-
(
BasicFailedReply
) User name already in use. (code: 'user.user_name.conflict') -
449
-
(
BasicFailedReply
) Elevated permissions are required. (code: 'root.unauthorized.rbac.elevated_permissions_required')
To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.
Request example
editcurl -XPOST {{hostname}}/api/v1/users \ -H "Authorization: ApiKey $ECE_API_KEY" \ -H 'Content-Type: application/json' \ -d ' { "builtin" : true, "email" : "string", "full_name" : "string", "metadata" : { "created_at" : "2019-01-01T00:00:00Z", "created_by" : "string", "first_login_at" : "2019-01-01T00:00:00Z", "last_login_at" : "2019-01-01T00:00:00Z", "updated_at" : "2019-01-01T00:00:00Z", "updated_by" : "string" }, "security" : { "elevated_permissions" : { "enabled" : true, "expires_at" : "2019-01-01T00:00:00Z" }, "enabled" : true, "password" : "string", "permissions" : [ "string" ], "roles" : [ "string" ], "security_realm" : { "id" : "string", "type" : "string" } }, "user_name" : "string" } '