GET Exchange Mailing List Non-members List
From Hostway API Documentation
GET /accounts/{account_number}/exchange/{domain_name}/mailingLitsts/{username}/nonMembers
Retrieve a mixture of Exchange mailboxes and global contacts that are not members of a particular Exchange mailing list. The non-members list is limited to the mailing list's domain name only.
Contents |
Request
GET {server_name}/accounts/{account_number}/exchange/{domain_name}/mailingLitsts/{username}/nonMembers?page=page-num&pageSize=page-size&sortField=sort-field&sortOrder=sort-order&filter-field=filter-value
Request 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 resources
- username - string
- The username that is associated with the Mailing List resource
URI Parameters
- 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 can be obtained by an OPTIONS call
- 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 can be obtained by an OPTIONS call
- 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 can be obtained by an OPTIONS call.
- filter-value - string
- (OPTIONAL)
- A value with which the filter-field is filtered. Values are exact match or defined with Filter Values Wildcards. Additional restrictions may be specified in the an OPTIONS call
Response
Status Code
- 200
- Success
- 400
- Bad request
- This is usually a sign that the client attempted to use invalid filtering/sorting criteria
- 404
- Non-existent resource
- Returned if:
- - no Exchange service could be found for the given domain name OR
- - there is no mailing list with the given username for the given domain name
- 405
- Unsupported method
- 502
- Bad gateway
- There was a failure in an upstream service that caused a failure in the API.
Response Body
{ "list" : [ { "username" : {global_contact_username}, "type" : {type}, "name" : {display_name}, "links" : [ { "href" : "http://{server_name}/accounts/{account_number}/exchange/{domain_name}/globalContacts/{global_contact_username}", "rel" : "related" } ] }, { "username" : {mailbox_username}, "type" : {type}, "name" : {display_name}, "links" : [ { "href" : "http://{server_name}/accounts/{account_number}/exchange/{domain_name}/mailboxes/{mailbox_username}", "rel" : "related" } ] } ], "links" : [ { "href" : "http://{server_name}/accounts/{account_number}/exchange/{domain_name}/mailingLists/{list_username}/members/", "rel" : "self" } ] }
Parameters
- list - list
- List of the mailing list's non-members. Each element of the list has the following attributes:
- name - string
- The user-friendly display name of the mailing list non-member
- username - string
- The username of the mailing list's non-member
- type - type
- Type of the the mailing list non-member. Allowed values are globalContact or mailbox
- links - list
- Hypermedia for this resource
- 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
Examples
Get an unfiltered, unsorted, unpaginated non-members list
Request
http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/nonMembers
Response HTTP/1.0 200 OK
{ "list" : [ { "username" : "test_mail3", "type" : "mailbox", "name" : "Test Exchange2010 Mailbox 3", "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailboxes/test_mail3", "rel" : "related" } ] }, { "username" : "test_mail", "type" : "mailbox", "name" : "Test mail", "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailboxes/test_mail", "rel" : "related" } ] }, { "username" : "00000140538bfdc52362a80b007f000000010001", "type" : "globalContact", "name" : "Anh Hostway", "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/globalContacts/00000140538bfdc52362a80b007f000000010001", "rel" : "related" } ] } ], "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/nonMembers/", "rel" : "self" } ] }
Get a non-members list sorted by username and filtered by type
Request
http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/nonMembers?filterType=mailbox&sortField=username&sortOrder=desc
Response HTTP/1.0 200 OK
{ "list" : [ { "username" : "test_mail3", "type" : "mailbox", "name" : "Test Exchange2010 Mailbox 3", "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailboxes/test_mail3", "rel" : "related" } ] }, { "username" : "test_mail", "type" : "mailbox", "name" : "Test mail", "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailboxes/test_mail", "rel" : "related" } ] } ], "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/nonMembers?filterType=mailbox&sortField=username&sortOrder=desc", "rel" : "self" } ] }
Get a paginated non-members list
Request
http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/nonMembers?page=1&pageSize=2
Response HTTP/1.0 200 OK
{ "list" : [ { "username" : "test_mail3", "type" : "mailbox", "name" : "Test Exchange2010 Mailbox 3", "links" : [{ "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailboxes/test_mail3", "rel" : "related" } ] }, { "username" : "test_mail", "type" : "mailbox", "name" : "Test mail", "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailboxes/test_mail", "rel" : "related" } ] } ], "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/nonMembers?page=1&pageSize=2", "rel" : "self" }, { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/nonMembers?page=2&pageSize=2", "rel" : "next" }, { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/nonMembers?page=2&pageSize=2", "rel" : "last" } ] }
See also