Updating Details of a User
Description | There will be situations where you will want to update the user details. In such situation you can update the user details using the REST API given below. | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
URL | /mdm-admin/users?username={username} | ||||||||||||||||||
HTTP Method | PUT | ||||||||||||||||||
Request/Response Format | application/json | ||||||||||||||||||
cURL command | curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-admin/users?username={username}
Example: curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer 33392fb365b3ac693b405b565ddc8a3a" -d @'user.json' -k -v https://localhost:9443/mdm-admin/users?username=kim | ||||||||||||||||||
 Sample output | > PUT /mdm-admin/users?username=kim HTTP/1.1 > Host: localhost:9443 > User-Agent: curl/7.43.0 > Accept: */* > Content-Type: application/json > Authorization: Bearer 33392fb365b3ac693b405b565ddc8a3a > Content-Length: 125 < HTTP/1.1 201 Created < Cache-Control: private < Expires: Thu, 01 Jan 1970 05:30:00 IST < Date: Sat, 05 Mar 2016 09:17:09 GMT < Content-Type: application/json < Content-Length: 88 < Server: WSO2 Carbon Server {"statusCode":201,"messageFromServer":"User by username: kim was successfully updated."} | ||||||||||||||||||
Sample JSON Definition | { "username":"kim", "firstname":"Kim", "lastname":"Foo", "emailAddress":"kim@gmail.com", "roles":[ "admin" ] }
|