Accounts-account-email-domain-contacts:GET
From Hostway API Documentation
Revision as of 16:24, 15 November 2013 by Mike.robski (Talk | contribs)
GET /accounts/{account}/email/{domain}/contacts?filter{FieldName}={FieldValue}[&filter{FieldName}={FieldValue}]
Filter domain's global address book contacts list
GET /accounts/{account}/email/{domain}/contacts?search{FieldName}={FieldValue}[&search{FieldName}={FieldValue}]
Search domain's global address book contacts list
Request
GET /accounts/{account}/email/{domain}/contacts?filter{FieldName}={FieldValue}[&filter{FieldName}={FieldValue}]
GET /accounts/{account}/email/{domain}/contacts?search{FieldName}={FieldValue}[&search{FieldName}={FieldValue}]
URI Parameters
- account - string
- domain - string
- filter{FieldName} - string
- Specifies fields to filter by, i.e. filterName, filterEmail, etc...
- search{FieldName} - string
- Specifies fields to search by, i.e. searchName, searchEmail, etc...
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
- Content-Type
- Required. Set this header to
application/json; charset=UTF-8
Status Code
- 200 Ok
- Success
- 404 Not Found
- The domain name does not exist.
Response Body
{
"count": {count},
"list": [
{
"name": "{name}",
"email": "{email}",
"firstName": "{firstName}",
"lastName": "{lastName}",
"displayName": "{displayName}"
"title": "{title}",
"homePhone": "{homePhone}",
"mobilePhone": "{mobilePhone}",
"businessPhone": "{businessPhone}",
"businessFax": "{businessFax}",
"isdnNumber": "{isdnNumber}",
"pager": "{pager}",
"telexNumber": "{telexNumber}",
"company": "{company}",
"department": "{department}",
"roomNumber": "{roomNumber}",
"streetAddress": "{streetAddress}",
"postalCode": "{postalCode}",
"city": "{city}",
"state": "{state}",
"country": "{country}",
"links": [{"href": "{APIBaseUrl}/accounts/{account}/email/{domain}/contacts/{name}", "rel": "self"}],
}
],
"links": [{"href": "{APIBaseUrl}/accounts/{account}/email/{domain}/contacts", "rel": "self"}],
}
Parameters
- count - int
- The count of global address book contacts matching the serch/filter condition.
- name - string
- The name of global address book contact.
- email - string
- The email of global address book contact.
- firstName - string
- The first name of global address book contact.
- lastName - string
- The last name of global address book contact.
- displayName - string
- The display name of global address book contact.
- title - string
- The title of global address book contact person.
- homePhone - string
- The home phone of global address book contact.
- mobilePhone - string
- The home phone of global address book contact.
- businessPhone - string
- The business phone of global address book contact.
- businessFax - string
- The business fax of global address book contact.
- isdnNumber - string
- The isdn number of global address book contact.
- pager - string
- The pager of global address book contact.
- telexNumber - string
- The telex number of global address book contact.
- company - string
- The company name of global address book contact.
- department - string
- The department name of global address book contact.
- roomNumber - string
- The room number of global address book contact.
- streetAddress - string
- The street address of global address book contact.
- postalCode - string
- The postal code of global address book contact.
- city - string
- The city name of global address book contact.
- state - string
- The state name of global address book contact.
- country - string
- The country name of global address book contact.
Examples
Success filtering global address book contacts with filterName and filterEmail parameters
Request
GET https://api.hostway.com/accounts/account007/email/test-domain.com/contacts?filterName=search-contact&filterEmail=new@test.com
Response
200 Ok
{
"count": 1,
"list": [
{
"city": "",
"businessPhone": "",
"displayName": "Display Name",
"mobilePhone": "",
"firstName": "First",
"title": "",
"roomNumber": "",
"lastName": "Last",
"company": "",
"pager": "",
"state": "",
"department": "",
"streetAddress": "",
"isdnNumber": "",
"postalCode": "",
"country": "",
"telexNumber": "",
"businessFax": "",
"email": "new@test.com",
"homePhone": "",
"name": "search-contact",
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts/search-contact", "rel": "self"}],
}
],
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts", "rel": "self"}],
}
Success filtering global address book contacts with only filterEmail parameter
Request
GET https://api.hostway.com/accounts/account007/email/test-domain.com/contacts?filterEmail=new@test.com
Response
200 Ok
{
"count": 2,
"list": [
{
"city": "",
"businessPhone": "",
"displayName": "Display Name",
"mobilePhone": "",
"firstName": "First",
"title": "",
"roomNumber": "",
"lastName": "Last",
"company": "",
"pager": "",
"state": "",
"department": "",
"streetAddress": "",
"isdnNumber": "",
"postalCode": "",
"country": "",
"telexNumber": "",
"businessFax": "",
"email": "new@test.com",
"homePhone": "",
"name": "search-contact",
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts/search-contact", "rel": "self"}],
},
{
"city": "",
"businessPhone": "",
"displayName": "Display Name",
"mobilePhone": "123456789",
"firstName": "First",
"title": "",
"roomNumber": "",
"lastName": "Last",
"company": "",
"pager": "",
"state": "",
"department": "",
"streetAddress": "",
"isdnNumber": "",
"postalCode": "",
"country": "",
"telexNumber": "",
"businessFax": "",
"email": "new@test.com",
"homePhone": "",
"name": "test-contact",
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts/test-contact", "rel": "self"}],
}
],
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts", "rel": "self"}],
}
Success searching global address book contacts with only searchName parameter
Request
GET https://api.hostway.com/accounts/account007/email/test-domain.com/contacts?searchName=contact
Response
200 Ok
{
"count": 2,
"list": [
{
"city": "",
"businessPhone": "",
"displayName": "Display Name",
"mobilePhone": "",
"firstName": "First",
"title": "",
"roomNumber": "",
"lastName": "Last",
"company": "",
"pager": "",
"state": "",
"department": "",
"streetAddress": "",
"isdnNumber": "",
"postalCode": "",
"country": "",
"telexNumber": "",
"businessFax": "",
"email": "new@test.com",
"homePhone": "",
"name": "search-contact",
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts/search-contact", "rel": "self"}],
},
{
"city": "",
"businessPhone": "",
"displayName": "Display Name",
"mobilePhone": "123456789",
"firstName": "First",
"title": "",
"roomNumber": "",
"lastName": "Last",
"company": "",
"pager": "",
"state": "",
"department": "",
"streetAddress": "",
"isdnNumber": "",
"postalCode": "",
"country": "",
"telexNumber": "",
"businessFax": "",
"email": "new@test.com",
"homePhone": "",
"name": "test-contact",
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts/test-contact", "rel": "self"}],
}
],
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts", "rel": "self"}],
}
Success filtering global address book contacts with non-existent filterName parameter
Request
GET https://api.hostway.com/accounts/account007/email/test-domain.com/contacts?filterName=notexisting
Response
200 Ok
{
"count": 0,
"list": [],
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts", "rel": "self"}],
}
Success searching global address book contacts with non-existent searchName parameter
Request
GET https://api.hostway.com/accounts/account007/email/test-domain.com/contacts?searchName=notexisting
Response
200 Ok
{
"count": 0,
"list": [],
"links": [{"href": "https://api.hostway.com/accounts/account007/email/test-domain.com/contacts", "rel": "self"}],
}