Body Required
All changes in the specified object are applied to the current 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.
string
string
Responses
-
User successfully updated
-
- 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
)
- Some of the provided roles are invalid. (code:
-
User not found. (code:
user.not_found
)
PATCH /user
curl \
-X PATCH https://{{hostname}}/api/v1/user \
-d '"string"'
Request examples
string
Response examples (200)
{
"user_name": "string",
"security": {
"roles": [
"string"
],
"permissions": [
"string"
],
"elevated_permissions": {
"enabled": true,
"expires_at": "2024-05-04T09:42:00+00:00"
},
"password": "string",
"enabled": true,
"security_realm": {
"type": "native",
"id": "string"
}
},
"metadata": {
"created_by": "string",
"created_at": "2024-05-04T09:42:00+00:00",
"updated_by": "string",
"updated_at": "2024-05-04T09:42:00+00:00",
"first_login_at": "2024-05-04T09:42:00+00:00",
"last_login_at": "2024-05-04T09:42:00+00:00"
},
"full_name": "string",
"email": "string",
"builtin": true
}
Response examples (400)
# Headers
x-cloud-error-codes: user.roles.invalid
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (404)
# Headers
x-cloud-error-codes: user.not_found
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}