Update User

Updates an existing user.

You can only update your user properties. Only Admin can update any user.

  • You cannot update User ID.
  • User Subject property is auto generated. Do not pass it in the user object.
  • User Credentials property is auto generated based on the user password. Do not pass them in the user object.
  • User Meta data is auto generated. Do not pass it in the user object.

URL

https://{{HOST}}/security/user?v={version}&userId={userId}

Method

PUT

Required IMS Scopes

  • securityapi_all

Versions Supported

  • 2.0 (Default)

URL Query Parameters

Name Description Example Type
v
optional
Version of the api to use /user?v=2.0 number
userId
required
The ID of the user. /user?userId=testUser string

Request Header Parameters

Type Value Description
Authorization
required
Bearer {access_token} IMS access token
Content-Type
required
application/json Content Type

Request Body Parameters

Name Description Type
id
required
The username of the nw user string
identity
optional
Identity properties of the new user. Should include organization and could include things like address, name, phone number, etc. JSON Object
privilege
optional
Contains properties related to the user’s privilege, such as roles and permissions. JSON Object

Example

Request

curl -X PUT 
  'https://{{HOST}}/securityapi/user?v=2.0&userId=testUser' 
  -H 'Authorization: Bearer {access_token}'
  -H 'Content-Type: application/json' 
  -d '{
  "id": "testUser",
    "identity": {
      "organization": "testOrganization"
    },
    "privilege": {
    }
  }'

Response

{
  "success": true
}

Errors

Error Description
Error Name Description of Error

Response Body Parameters

Name Description Schema
Object Name Description object definition
success Description object definition