GET Exchange Global Contacts list

From Hostway API Documentation
Jump to: navigation, search

Retrieve an Exchange Global contacts list by domain name

GET /accounts/account-number/exchange/domain-name/globalContacts

GET /accounts/account-number/exchange/domain-name/globalContacts?page=page-num&pageSize=page-size&sortField=sort-field&sortOrder=sort-order&filter-field=filter-value

Contents

Parameters

account-number - string
The account-number that the Exchange resource belongs to
domain-name - string
The domain-name that is associated with the Exchange resource
page-num- int
(OPTIONAL)
Request a specific page of data. If not set defaults to 1
page-size - int
(OPTIONAL)
Size used to paginate the request. If not set defaults to 100
sort-field - string
(OPTIONAL)
Specifies a field upon which to sort the data. If not set no sorting is preformed. Allowed values are specified by an OPTIONS request
sort-order - string
(OPTIONAL)
Specifies the order in which the data is sorted. If not set no sorting is preformed if sort-field is not set or defaults to asc otherwise. Allowed values are specified by an OPTIONS request
filter-field - string
(OPTIONAL)
Specifies a field upon which the data is filtered. If multiple filter-field are set all of them have to be true to pass the filter. If none are set no filtering is performed. Allowed values are specified by an OPTIONS request. Example: if we want to filter by field 'status' then the paramenter should look like 'filterStatus=value'. That way one can filter by more then one field. The filtering values can be also specified using wildcards(*).
filter-value - string
(OPTIONAL)
A value with which the filter-field is filtered. Values are either an exact match or a partial match using a wildcards(*). Additional restrictions may be specified by an OPTIONS request

Response Body

{
   "list" :
      [
         {
             "details" : "http://{server_name}/accounts/{account_number}/exchange/{domain_name}/globalContacts/{global_contact_id}/",
             "target" : "test@test.com",
             "name" : "display name of the contact"
         },
         {
             "details" : "http://{server_name}/accounts/{account-number}/exchange/{domain-name}/globalContacts/{global_contact_id}/",
             "target" : "test1@test1.com",
             "name" : "display name of the contact"
         }
      ]
   "links":
      [
         {
            "href" : "http://{server_name}/accounts/{account-number}/exchange/{domain-name}/globalContacts?page=2&pageSize=2",
            "rel" : "self"
         },
         {
            "href" : "http://{server_name}/accounts/{account-number}/exchange/{domain-name}/globalContacts?page=1&pageSize=2",
            "rel" : "first"
         },
         {
            "href" : "http://{server_name}/accounts/{account-number}/exchange/{domain-name}/globalContacts?page=1&pageSize=2",
            "rel" : "previous"
         },
         {
            "href" : "http://{server_name}/accounts/{account-number}/exchange/{domain-name}/globalContacts?page=1&pageSize=3",
            "rel" : "next"
         },
         {
            "href" : "http://{server_name}/accounts/{account-number}/exchange/{domain-name}/globalContacts?page=1&pageSize=3",
            "rel" : "last"
         }
      ]
}
  
list - list
List of the global contacts for the selected domain. Each element of the list has the following attributes:
name - string
The name of the contact
target - string
Email of the contact
details - string
Hyperlink to the contact
links - list
Hypermedia for this resource. Link to self will preserve filtering, sorting and pagination set by the request. Links to the first, last, previous and next pages will also be included if applicable

Expected Response Codes

200
Success
400
Bad request
404
Non-existent resource
405
Unsupported method
502
Internal server error

Examples

GET {server_name}/accounts/account300021/exchange/ng-test-hwus-120120b.com/globalContacts

- Request Headers:

   Content-Type:application/json
   Charset=UTF-8
   Authorization:Base64-encoded username & password string

- Response: OK (200):

 [
   {
     "details": "http://{server_name}/accounts/account300021/exchange/ng-test-hwus-120120b.com/globalContacts/00000136a0dc303df040b174000ae6fa2cb8a7d8/",
     "target": "name@domain.com", 
     "name": "My old descriptive name"}, 
   {
     "details": "http://{server_name}/accounts/account300021/exchange/ng-test-hwus-120120b.com/globalContacts/0000013659099524e2c12a99000a91275a05bc87/",     
     "target": "target3@domain.com", 
     "name": "new name"
   }
 ]
 
Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox