DELETE Exchange Mailing List Member

From Hostway API Documentation
Revision as of 23:59, 1 July 2014 by Mike.robski (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

DELETE /accounts/{account}/exchange/{domain}/malingLitsts/{mailing_list}/members/{member}

Remove a member from a given mailing list by the member's username

Contents


Request

DELETE /accounts/{account_number}/exchange/{domain_name}/malingLitsts/{list_username}/members/{member_username}

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

Response

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

Response Body

None - the response body is empty

Examples

Remove a member and check that the member has been removed successfully

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"
  } ]
}
 

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
 

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"
  } ]
}
 

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox