Update User
OVERVIEW
Overview
Update an existing user in Publisher
This API call is used to update an existing user in the system, by replacing the user with the provided user object.
Since v4.6
HTTP Request
PUT /api/2/users/<ID>
OR
PUT /api/2/users/<EMAIL>
HTTP Request Object
User Object, either in JSON or XML format.
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the user to update |
The email address of the user to update |
HTTP Headers
HTTP Request Header | Description | Example |
---|---|---|
Authorization | The API Authorisation token. | "Bearer XXXXXXXXXXXXX" |
Accept |
The format of the expected response.
If no parameter is set, JSON is the default response given. |
"application/xml" |
Content-Type |
The format of the provided content.
If no parameter is set, JSON is the expected content by default. |
"application/json" |
HTTP Response
Success
HTTP response 200 with User summary Object
(Example below)
Error
Example HTTP Request & Response
PUT
http://example.com/context/api/2/users/3
JSON Request
{
"user": {
"id": 3,
"name": {
"firstname": "User",
"lastname": "Name",
"title": "Dr"
},
"externalid": "456",
"email": "user@domain.com",
"phone": "44156680000",
"jobtitle": "Senior Solution Architect",
"mobile": "441561510000",
"department": "Development",
"status": "active",
"organisation": {
"orgname": "Organisation Pty Ltd",
"orgid": 75,
"orgaddressid": 98
},
"location": {
"addressline1": "New London House",
"addressline2": "6 London Street",
"city": "London",
"country": "United Kingdom",
"postcode": "EC3R 7LP"
},
"img": "http://blog.newrelic.com/wp-content/uploads/java-logo.jpg",
"sociallinks": {
"link": {
"name": "LinkedIn",
"value": "http://www.linkedin.com/in/user.name"
}
},
"customlinks": {
"link": {
"name": "My Web",
"value": "http://www.mywebsite.com"
}
},
"messaginglinks": {
"link": {
"name": "Skype",
"value": "user.name.skype"
}
},
"secretaryname": "Secretary Name",
"secretarymail": "secretary@domain.com",
"bio": "Development manager",
"sourcetype": "AD",
"specialities": "java,dotNet",
}
}
JSON Response
{
"user": {
"id": 3,
"email": "user@domain.com",
"link": "http://example.com/context/api/2/user/3"
}
}
Comments
0 Comments