Web Services API | User web services | Update user
Modified on: Thu, 13 Apr 2023 4:30 PMUpdate user
Updates a user by id or username.
- Url: /integration/ws/management/rest/users/<user_id_or_username>
- Method: PUT
-
Headers:
- Accept: version/format header
- X-Cloud-Auth-Token*: authorization header
- X-Cloud-Synchronization: synchronization header
- Content-Type*: application/json
-
Parameters:
-
user*: user to update:
- name*: user's new name
- surname*: user's new surname
- language*: user's new language code
- timezone*: user's new timezone code
- email*: user's new email
- username*: new username
- officePhone: user's new office phone number
- mobilePhone: user's new mobile phone number
- interests: user's new interests
- aboutMe: user's new information
- location: user's new location
- authSource: system where user credentials are validated
-
image: user's new image. Can be specified as:
- url: url in which the image is stored ({"url": "image_url"})
- base64: image data ({"base64Image": "image_data", "mimeType": "image_mimeType"})
- enabled: user's new activation status
-
roles: user's new roles. Specified as a map with the section as key and the role list as value. Allowed values are:
- management: mandatory at least one of the following: user, groupadmin, admin
- training: user, trainer, groupadmin, admin
- social: user, admin
- play: user, author, validator, admin, groupadmin
- talent: admin, employee
- content: author, manager, reviewer, projectowner
- extendedFields: Key/value map for customer extended field user values
- externalId: user's external id
- extra:
-
user*: user to update:
-
Responses:
-
200: OK. Content:
- status: generic status
- location: generic location of the resultant resource, if any
- message: generic success or error message, if any
-
responsePlatforms: response for every platform it concerns. Each one with the content:
- status: status in the platform
- location: location of the resultant resource in the platform, if any
- message: success or error message in the platform, if any
-
200: OK. Content:
-
Url example by user id:
http://netex.dev.learningcloud.me/integration/ws/management/rest/users/ff808181556ee70e015572136a250012
-
Url example by username:
http://netex.dev.learningcloud.me/integration/ws/management/rest/users/restuser.acme
- Response example (synchronous):
{ "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 200 }, "social": { "location": null, "message": null, "status": 204 }, "play": { "location": null, "message": null, "status": 204 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 }
Response example (asynchronous):
{ "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 202 }, "social": { "location": null, "message": null, "status": 202 }, "play": { "location": null, "message": null, "status": 204 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 }