DELETE Exchange Mailing List Member
From Hostway API Documentation
(Difference between revisions)
(→Remove a member and check that the member has been removed successfully) |
Mike.robski (Talk | contribs) m (1 revision: Release 95) |
Latest revision as of 23:59, 1 July 2014
[edit] DELETE /accounts/{account}/exchange/{domain}/malingLitsts/{mailing_list}/members/{member}
Remove a member from a given mailing list by the member's username
Contents |
[edit] Request
DELETE /accounts/{account_number}/exchange/{domain_name}/malingLitsts/{list_username}/members/{member_username}
[edit] 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 resource
- list_username - string
- The username that is associated with the Mailing List resource
- member_username - string
- The username that is associated with the Mailing List Member resource
[edit] Response
[edit] Status Code
- 204
- Success
- 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
- - the provided member_username is not a member of the mailing list
- 502
- Internal server error
[edit] Response Body
None - the response body is empty
[edit] Examples
[edit] Remove a member and check that the member has been removed successfully
[edit] Get a members list before removing
Request
GET http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/members
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/mailingLists/test_list/members/test_mail3", "rel" : "self" }, { "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/mailingLists/test_list/members/test_mail", "rel" : "self" }, { "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/mailingLists/test_list/members/00000140538bfdc52362a80b007f000000010001", "rel" : "self" }, { "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/members/", "rel" : "self" } ] }
[edit] Remove a member
Request
DELETE http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/members/test_mail
Response
HTTP/1.0 204 No Content
[edit] Get a members list after removing
Request
GET http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/members
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/mailingLists/test_list/members/test_mail3", "rel" : "self" }, { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailboxes/test_mail3", "rel" : "related" } ] }, { "username" : "00000140538bfdc52362a80b007f000000010001", "type" : "globalContact", "name" : "Anh Hostway", "links" : [ { "href" : "http://localhost:6543/accounts/anh74902/exchange/ng-test-anh-080613.com/mailingLists/test_list/members/00000140538bfdc52362a80b007f000000010001", "rel" : "self" }, { "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/members/", "rel" : "self" } ] }
[edit] See also