IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Updates an existing user
editUpdates an existing user
editUpdates an existing user.
Request
editPATCH /api/v1/users/{user_name}
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the user |
Request body
edit(string
) (required) All changes in the specified object are applied to the user according to the JSON Merge Patch processing rules. Omitting existing fields causes the same values to be reapplied. Specifying a null
value reverts the field to the default value, or removes the field when no default value exists.
Responses
edit-
200
-
(
User
)User successfully updated
-
400
-
-
Some of the provided roles are invalid. (code:
user.roles.invalid
) -
Some of the provided roles are forbidden. (code:
user.roles.forbidden
) -
Trying to set a restricted field. (code:
user.restricted_field
) -
External users cannot be modified. (code:
user.cannot_modify_external
) -
Built-in users cannot be modified. (code:
user.cannot_modify
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [user.roles.invalid
,user.roles.forbidden
,user.restricted_field
,user.cannot_modify_external
,user.cannot_modify
]) - The error codes associated with the response
-
Some of the provided roles are invalid. (code:
-
404
-
User not found. (code:
user.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [user.not_found
]) - The error codes associated with the response
-
-
449
-
Elevated permissions are required. (code:
root.unauthorized.rbac.elevated_permissions_required
)Headers
-
x-cloud-error-codes
(string
; allowed values: [root.unauthorized.rbac.elevated_permissions_required
]) - The error codes associated with the response
-
Request example
editcurl -XPATCH https://{{hostname}}/api/v1/users/{user_name} \ -H "Authorization: ApiKey $ECE_API_KEY" \ -H 'Content-Type: application/json'