Update user - Update user v1
OVERVIEW
This method provides the capability to update an existing user details. User object is required in the body of the PUT request.
Note: We do not support adding and updating location information in the User API, only the get operation returns location information.
Request
PUT /Users/{id}
Parameters
Parameter Name | Value | Description |
---|---|---|
id | Int | The ID for the user in question |
Request Body
<user >
<firstname>Joe</firstname>
<lastname>Blow</lastname>
<email> joe.blow@domain.com</email>
<phone>+44 (0) 207 1111 0000</phone>
<department>marketing</department>
<org>ORG001</org>
<sociallinks>
<link>
<name>LinkedIn</name>
<value>http://www.linkin.com/tom.chick</value>
</link>
</sociallinks>
<customlink>
<link>
<name>My Web</name>
<value>http://www.mywebsite.com</value>
</link>
</customlink>
<messaginglink>
<link>
<name>Skype</name>
<value>tom.chick.skype</value>
</link>
</messaginglink>
<img>http://imageurl.com/img</img>
<jobtitle>software engineer</jobtitle>
<secretaryname>time of india</secretaryname>
<secretarymail>times@india.com</secretarymail>
<title>Title</title>
<bio>I am from HighQ</bio>
<sourcetype>System</sourcetype>
<specialities>java,dotNet</specialities>
<status>active</status>
<goesby>alpesh.lodhari</goesby>
</user>
Response
If the request is successful an error object is returned with the information similar to the Add User interface otherwise an error object is returned.
<error>
<ref> Error reference code in at which full stack trace can be obtained</ref>
<summery> Details for the error </summery>
<atom:link rel="self" href="…/errors/user002" /> // returns the full strack trace and other details for why the error happened
</error>
Code | Meaning |
---|---|
200 | User updated successfully |
400 | Problem with parsing XML or JSON object (Bad Request) |
401 | Unauthorized |
403 | Validation failed/ Forbidden |
405 | Method not allowed (calling api with wrong method) |
500 | Internal error occured while creating folder |
Digby Field I am afraid we do not support adding and updating the location information in the user API, so I have updated the documentation accordingly. I have also added this improvement to our API backlog as the team is working on User, group, organisation and domain API in the next major release of Collaborate.
Digby Field I have raised this issue with the technical team to investigate and the team will come back to the support ticket raised for this issue.
When I update a user, everything updates fine except the location doesn't save. I am passing the following data (as shown in your example).
Is there something extra I need to do for this to work?
<location>
<addressline1>New London House</addressline1>
<addressline2>6 London Street</addressline2>
<city>London</city>
<country>United Kingdom</country>
<postCode>EC3R 7LP</postCode>
</location>
Comments
3 Comments