Contacts
Get a list of module sites.
Resource URL
GET: http://<ServerIP>/unifiedgui/webapi/Contacts
Example Request with Filter
GET: http://<ServerIP>/unifiedgui/webapi/Contacts?$filter=LastName eq 'Robinson'
Example Response
{
"Id": "6f75556a-07c2-ea11-84cb-54bf64846080",
"LastName": " Robinson",
"FirstName": "Derek",
"JobTitle": "developer",
"Department": "Eng Dept.",
"CompanyOrOrganization": "CattleProd USA, Inc.",
"Address":{
"AddressLine1": "5050 N 22nd Ave",
"AddressLine2": "",
"City": "LO",
"StateOrProvince": "Arizona",
"Country": "USA",
"PostalCode": "85016",
"Note": ""
},
"AssociatedEndpoints":[
"32d88295-4cc8-e911-80ea-0050568f18f4",
"34d88295-4cc8-e911-80ea-0050568f18f4"
],
"EmailAddresses":[{
"Email": "derek@webapi.com",
"Label": "Work",
"PreferenceOrder": 0
}],
"Phones":[{"Number": "+16235940000", "Label": "Work", "CanReceiveSMS": false, "PreferenceOrder": 0…}],
"AllowMobile": true,
"AllowSelfManagement": true,
"Site": "Lincoln",
"ProviderBy": "Web Api",
"Category": "webapi Sales",
"ContactState": "Active"
}
Create a Contact
POST: http://<ServerIP>/unifiedgui/webapi/Contacts
Example Request
{
"LastName": "Doe",
"FirstName": "John",
"JobTitle": "Developer",
"Department": "Eng Dept.",
"CompanyOrOrganization": "CattleProd USA, Inc.",
"Address": {
"AddressLine1": "5050 N 22nd Ave",
"City": "LO",
"StateOrProvince": "Arizona",
"Country": "USA",
"PostalCode": "85016"
},
"AssociatedEndpoints": ["@Cisco:SEP58BC27757880", "@Cisco:SEP2834A283EE79"],
"EmailAddresses": [
{
"Email": "smith@webapi.com",
"Label": "Work",
"PreferenceOrder": 0
}
],
"Phones": [
{
"Number": "+16235940000",
"Label": "Work",
"CanReceiveSMS": false,
"PreferenceOrder": 0
}
],
"AllowMobile": true,
"AllowSelfManagement": true,
"Site": "Lincoln",
"Category": "webapi Sales",
"ContactState": "Active"
}
Example Response
HttpStatus – 201 Created. The API also returns the Contact object that was created along with Id. If there was an error during Contact creation, then a HttpStatus - 500 Internal Server Error along with exception message is returned.
Update a Contact
PUT: http://<ServerIP>/unifiedgui/webapi/Contacts(6f75556a-07c2-ea11-84cb-54bf64846080)
OR
PATCH: http://<ServerIP>/unifiedgui/webapi/Contacts(6f75556a-07c2-ea11-84cb-54bf64846080)
Either PUT or PATCH can be used to update existing Contact record. A successful update will return a HttpStatus – 200 OK and no return content
Delete a Contact
DELETE: http://<ServerIP>/unifiedgui/webapi/Contacts(6f75556a-07c2-ea11-84cb-54bf64846080)
A successful delete will return a HttpStatus 204 No Content. If the contact was not found in the system, the API will return HttpStatus 404 Not Found