Difference between revisions of "Exchange Distribution List (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
(update schema file link)
Line 1: Line 1:
== Exchange Distribution List ==
+
 
 +
 
 +
__TOC__
 +
 
  
 
=== Index ===
 
=== Index ===
  
 
''URL'':
 
''URL'':
  [GET] /customers/(customer account number)/domains/(domain name)/ex/distributionlists
+
  <nowiki>[GET] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
        /ex/distributionlists</nowiki>
  
  
Line 29: Line 33:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Format is invalid
 
| Format is invalid
 
| 406
 
| 406
 
| Invalid format
 
| Invalid format
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Distribution List is not found
 
| Distribution List is not found
 
| 404
 
| 404
Line 47: Line 51:
  
 
''URL'':
 
''URL'':
  [GET] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)
+
  [<nowiki>GET] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
        /ex/distributionlists/(distribution list name)</nowiki>
  
  
Line 66: Line 71:
  
  
''Errors'':  
+
''Errors'':
  
 
{| border=1 class="simple"
 
{| border=1 class="simple"
Line 72: Line 77:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Format is invalid
 
| Format is invalid
 
| 406
 
| 406
 
| Invalid format
 
| Invalid format
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Distribution list is not found
 
| Distribution list is not found
 
| 404
 
| 404
Line 91: Line 96:
  
 
''URL'':
 
''URL'':
  Add: [POST] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)
+
  <nowiki>Add: [POST] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
Edit: [PUT] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)
+
                /ex/distributionlists/(distribution list name)
 +
Edit: [PUT] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
                /ex/distributionlists/(distribution list name)</nowiki>
  
  
Line 104: Line 111:
 
!''Data Type''
 
!''Data Type''
 
!''Description''
 
!''Description''
|-  
+
|-
 
| name
 
| name
 
| string
 
| string
 
| Distribution list name (Required for Add, not available for Edit)
 
| Distribution list name (Required for Add, not available for Edit)
|-  
+
|-
 
| displayName
 
| displayName
 
| string
 
| string
 
| Distribution list display name (Required)
 
| Distribution list display name (Required)
|-  
+
|-
 
| isHidden
 
| isHidden
 
| boolean
 
| boolean
Line 122: Line 129:
 
<pre>
 
<pre>
 
post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees',
 
post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees',
{  
+
{
   'name' => 'all.employees',  
+
   'name' => 'all.employees',
   'displayName' => 'Employees'  
+
   'displayName' => 'Employees'
 
},
 
},
 
'text/xml'
 
'text/xml'
Line 131: Line 138:
 
<pre>
 
<pre>
 
put '/customers/12345678/domains/example.com/ex/distributionlists/all.employees',
 
put '/customers/12345678/domains/example.com/ex/distributionlists/all.employees',
{  
+
{
   'displayName' => 'Example.com Employees'  
+
   'displayName' => 'Example.com Employees'
 
},
 
},
 
'text/xml',
 
'text/xml',
 
</pre>
 
</pre>
  
''Errors'':  
+
''Errors'':
  
 
{| border=1 class="simple"
 
{| border=1 class="simple"
Line 143: Line 150:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Format is invalid
 
| Format is invalid
 
| 406
 
| 406
 
| Invalid format
 
| Invalid format
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Required form field is missing
 
| Required form field is missing
 
| 400
 
| 400
 
| Missing required field: name
 
| Missing required field: name
|-  
+
|-
 
| Required form field has null or empty string input
 
| Required form field has null or empty string input
 
| 400
 
| 400
 
| Required field displayName cannot be empty
 
| Required field displayName cannot be empty
|-  
+
|-
 
| Boolean form field has non-boolean input
 
| Boolean form field has non-boolean input
 
| 400
 
| 400
 
| Invalid format for isHidden, input must be True or False
 
| Invalid format for isHidden, input must be True or False
|-  
+
|-
 
| Form data has unrecognized field
 
| Form data has unrecognized field
 
| 400
 
| 400
 
| Unrecognized field: size
 
| Unrecognized field: size
|-  
+
|-
 
| New distribution list name already exists
 
| New distribution list name already exists
 
| 400
 
| 400
 
| The email address john.doe@abc.com is already in use
 
| The email address john.doe@abc.com is already in use
|-  
+
|-
 
| New distribution list name doesn't meet the naming requirements
 
| New distribution list name doesn't meet the naming requirements
 
| 400
 
| 400
 
| Invalid user name
 
| Invalid user name
|-  
+
|-
 
| New distribution list display name doesn't meet the naming requirements
 
| New distribution list display name doesn't meet the naming requirements
 
| 400
 
| 400
 
| Invalid display name
 
| Invalid display name
|-  
+
|-
 
| Distribution list is not found
 
| Distribution list is not found
 
| 404
 
| 404
 
| Distribution List not found
 
| Distribution List not found
|-  
+
|-
 
| Display name doesn't meet the naming requirements
 
| Display name doesn't meet the naming requirements
 
| 400
 
| 400
Line 193: Line 200:
  
 
''URL'':
 
''URL'':
  [DELETE] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)
+
  <nowiki>[DELETE] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
            /ex/distributionlists/(distribution list name)</nowiki>
  
  
Line 211: Line 219:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Distribution list is not found
 
| Distribution list is not found
 
| 404
 
| 404
Line 229: Line 237:
  
 
''URL'':
 
''URL'':
  [POST] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)/emailaddresses/(email address)
+
  <nowiki>[POST] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
        /ex/distributionlists/(distribution list name)/emailaddresses/(email address)</nowiki>
  
  
Line 242: Line 251:
 
</pre>
 
</pre>
  
''Errors'':  
+
''Errors'':
  
 
{| border=1 class="simple"
 
{| border=1 class="simple"
Line 248: Line 257:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Format is invalid
 
| Format is invalid
 
| 406
 
| 406
 
| Invalid format
 
| Invalid format
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Distribution list is not found
 
| Distribution list is not found
 
| 404
 
| 404
Line 266: Line 275:
  
 
''URL'':
 
''URL'':
  [DELETE] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)/emailaddresses/(email address)
+
  <nowiki>[DELETE] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
            /ex/distributionlists/(distribution list name)/emailaddresses/(email address)</nowiki>
  
  
Line 286: Line 296:
  
 
''URL'':
 
''URL'':
  [POST] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)/members/(member name)
+
  <nowiki>[POST] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
        /ex/distributionlists/(distribution list name)/members/(member name)</nowiki>
  
  
Line 300: Line 311:
  
  
''Errors'':  
+
''Errors'':
  
 
{| border=1 class="simple"
 
{| border=1 class="simple"
Line 306: Line 317:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Format is invalid
 
| Format is invalid
 
| 406
 
| 406
 
| Invalid format
 
| Invalid format
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Distribution list is not found
 
| Distribution list is not found
 
| 404
 
| 404
 
| Distribution list not found
 
| Distribution list not found
|-  
+
|-
 
| Required form field is missing
 
| Required form field is missing
 
| 400
 
| 400
 
| Missing field: addmember
 
| Missing field: addmember
|-  
+
|-
 
| Form data has unrecognized field
 
| Form data has unrecognized field
 
| 400
 
| 400
 
| Unrecognized field: deletemember
 
| Unrecognized field: deletemember
|-  
+
|-
 
| New member is not found
 
| New member is not found
 
| 400
 
| 400
Line 336: Line 347:
  
 
''URL'':
 
''URL'':
  [DELETE] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)/members/(member name)
+
  <nowiki>[DELETE] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
            /ex/distributionlists/(distribution list name)/members/(member name)</nowiki>
  
  
Line 350: Line 362:
  
  
''Errors'':  
+
''Errors'':
  
 
{| border=1 class="simple"
 
{| border=1 class="simple"
Line 356: Line 368:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Format is invalid
 
| Format is invalid
 
| 406
 
| 406
 
| Invalid format
 
| Invalid format
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Distribution list is not found
 
| Distribution list is not found
 
| 404
 
| 404
 
| Distribution list not found
 
| Distribution list not found
|-  
+
|-
 
| Member is not found
 
| Member is not found
 
| 400
 
| 400
 
| Invalid group member name
 
| Invalid group member name
 
|}
 
|}

Revision as of 12:15, 2 September 2009



Index

URL:

[GET] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /ex/distributionlists


Description:

This operation returns a list of distribution lists associated with the domain.


Remarks:

The Index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: DistributionlistList.xsd


Example:

get '/customers/12345678/domains/example.com/ex/distributionlists?size=100&page=1&contains=mailing', 'text/xml'


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found
Distribution List is not found 404 Distribution List not found


Show

URL:

[GET] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /ex/distributionlists/(distribution list name)


Description:

Returns the distribution list's details.


Remarks:

The show operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: Distributionlist.xsd


Example:

get '/customers/12345678/domains/example.com/ex/distributionlists/all.employees', 'text/xml'


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found
Distribution list is not found 404 Distribution List not found


Add/Edit

URL:

Add: [POST] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
                /ex/distributionlists/(distribution list name)
Edit: [PUT] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
                /ex/distributionlists/(distribution list name)


Description:

Adds/edits the distribution list with the specified information. Required fields must be supplied when adding. Others are optional.


Field Name Data Type Description
name string Distribution list name (Required for Add, not available for Edit)
displayName string Distribution list display name (Required)
isHidden boolean Whether or not the distribution list is hidden from the Global Address List (Defaults to false)


Example:

post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees',
{
  'name' => 'all.employees',
  'displayName' => 'Employees'
},
'text/xml'
put '/customers/12345678/domains/example.com/ex/distributionlists/all.employees',
{
  'displayName' => 'Example.com Employees'
},
'text/xml',

Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found
Required form field is missing 400 Missing required field: name
Required form field has null or empty string input 400 Required field displayName cannot be empty
Boolean form field has non-boolean input 400 Invalid format for isHidden, input must be True or False
Form data has unrecognized field 400 Unrecognized field: size
New distribution list name already exists 400 The email address john.doe@abc.com is already in use
New distribution list name doesn't meet the naming requirements 400 Invalid user name
New distribution list display name doesn't meet the naming requirements 400 Invalid display name
Distribution list is not found 404 Distribution List not found
Display name doesn't meet the naming requirements 400 Invalid display name


Delete

URL:

[DELETE] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
            /ex/distributionlists/(distribution list name)


Description:

Deletes the distribution list.


Example:

delete '/customers/12345678/domains/example.com/ex/distributionlists/all.employees', 'text/xml'


Description HTTP Response Code Sample Message
Domain is not found 404 abc.com not found
Distribution list is not found 404 Distribution List not found


Email Addresses

This refers to the email addresses a distribution list can appear as.

Add Email Address

URL:

[POST] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /ex/distributionlists/(distribution list name)/emailaddresses/(email address)


Description:

Adds an email address that the distribution list is associated with to the list. This address' domain name must be the same as the domain the distribution list is under.


Example:

post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/emailaddresses/alex@example.com', {}, 'text/xml'

Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found
Distribution list is not found 404 Distribution list not found


Delete Email Address

URL:

[DELETE] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
            /ex/distributionlists/(distribution list name)/emailaddresses/(email address)


Description:

Deletes the email address that is tied to the distribution list.


Example:

delete '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/emailaddresses/alex@example.com', 'text/xml'

Member

This refers to the recipients of the distribution list.

Add Member

URL:

[POST] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /ex/distributionlists/(distribution list name)/members/(member name)


Description:

Adds an email address to the distribution list.


Example:

post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/members/john.smith', {}, 'text/xml'


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found
Distribution list is not found 404 Distribution list not found
Required form field is missing 400 Missing field: addmember
Form data has unrecognized field 400 Unrecognized field: deletemember
New member is not found 400 No user with the email address jane.doe exists


Delete Member

URL:

[DELETE] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
            /ex/distributionlists/(distribution list name)/members/(member name)


Description:

Delete an email address from the distribution list.


Example:

delete '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/members/john.smith', {}, 'text/xml'


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found
Distribution list is not found 404 Distribution list not found
Member is not found 400 Invalid group member name