Updates an existing user

edit

Updates an existing user.

Request

edit

PATCH /api/v1/users/{user_name}

Path parameters

edit
Name Type Required Description

user_name

string

Y

Identifier for the user

Request body

edit

(User) (required) The user to update

Responses

edit
200

(User) User successfully updated

400

(BasicFailedReply) Invalid request

403

(BasicFailedReply) Invalid permissions

404

(BasicFailedReply) User not found

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

edit
curl -XPATCH {{hostname}}/api/v1/users/{user_name} \
-u $CLOUD_USER:$CLOUD_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"
}
'