Difference between revisions of "Rackspace Alias(Rest API)"
(→Bulk Modify Alias List) |
|||
Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
− | == | + | == v1 - Current == |
=== Index === | === Index === | ||
Line 7: | Line 7: | ||
''URL'': | ''URL'': | ||
− | <nowiki>[GET] http://api.emailsrvr.com/ | + | <nowiki>[GET] http://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/aliases/</nowiki> | /rs/aliases/</nowiki> | ||
Line 49: | Line 49: | ||
''URL'': | ''URL'': | ||
− | <nowiki>[POST] http://api.emailsrvr.com/ | + | <nowiki>[POST] http://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/aliases/(alias name)</nowiki> | /rs/aliases/(alias name)</nowiki> | ||
Line 99: | Line 99: | ||
''URL'': | ''URL'': | ||
− | <nowiki>[GET] https://api.emailsrvr.com/ | + | <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/alias/(alias name)</nowiki> | /rs/mailboxes/(mailbox name)/alias/(alias name)</nowiki> | ||
Line 150: | Line 150: | ||
''URL'': | ''URL'': | ||
− | <nowiki>[DELETE] https://api.emailsrvr.com/ | + | <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/aliases/(alias name)</nowiki> | /rs/aliases/(alias name)</nowiki> | ||
Line 179: | Line 179: | ||
''URL'': | ''URL'': | ||
<nowiki>Adding an email address to a alias. | <nowiki>Adding an email address to a alias. | ||
− | [POST] https://api.emailsrvr.com/ | + | [POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/aliases/(alias name)/(email address) | /rs/aliases/(alias name)/(email address) | ||
</nowiki> | </nowiki> | ||
Line 218: | Line 218: | ||
''URL'': | ''URL'': | ||
<nowiki>Deleting an email address from an alias. | <nowiki>Deleting an email address from an alias. | ||
− | [DELETE] https://api.emailsrvr.com/ | + | [DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/aliases/(alias name)/(email address) | /rs/aliases/(alias name)/(email address) | ||
</nowiki> | </nowiki> | ||
Line 252: | Line 252: | ||
''URL'': | ''URL'': | ||
<nowiki> | <nowiki> | ||
− | [PUT] https://api.emailsrvr.com/ | + | [PUT] https://api.emailsrvr.com/v1/customers/(account number)/domains/(domain name)/rs/aliases/(alias name) |
</nowiki> | </nowiki> | ||
Line 273: | Line 273: | ||
!''Description'' | !''Description'' | ||
|- | |- | ||
− | | | + | | aliasEmail |
| string | | string | ||
| A comma separated list of email addresses. | | A comma separated list of email addresses. |
Revision as of 10:48, 23 September 2014
Contents
v1 - Current
Index
URL:
[GET] http://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/aliases/
Description:
Shows a list of aliases for the Rackspace domain.
Remarks:
The show operation only supports the GET HTTP verb. For .xml format refer to the following schema document: RSAliasList.xsd
Example:
get '/customers/12345678/domains/example.com/rs/aliases', 'text/xml'
XML Result Example:
<?xml version="1.0" encoding="utf-8"?> <aliasList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:aliasList"> <aliases> <alias> <name>alias1</name> <numberOfMembers>3</numberOfMembers> </alias> </aliases> </aliasList>
Json Result Example:
{"aliases":[{"name":"alias1","numberOfMembers":3}]}
Add
URL:
[POST] http://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/aliases/(alias name)
Description:
Creates an alias.
Field Name | Description |
---|---|
aliasEmails | Comma separated list of domain and non-domain emails. |
Example:
post '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1', {'aliasEmails'=>'jane.doe@resellerallservices.net, joe.schmoe@resellerallservices.net,e1@yahoo.com, e2@gmail.com' }, Formats.xml
Remarks: Currently there is a limit of 50 domain emails and 4 non-domain emails.
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Non-existent domain email address. | 400 | An alias must point to a valid email address. The following email addresses do not exist: a@resellerallservices.net |
Empty domain email list and non-domain email list. | 400 | An alias must point to a valid email address. |
More than four non-domain email addresses specified. | 400 | Max number of non-local email recipients reached. |
Show
URL:
[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/alias/(alias name)
Description:
Returns detailed information about the specified alias.
Remarks:
The show operation only supports the GET HTTP verb. For .xml format refer to the following schema document: RSAlias.xsd
Example:
get '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1', Formats.xml
XML Result Example:
<?xml version="1.0" encoding="utf-8"?> <alias xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:alias"> <name>alias1</name> <emailAddressList> <emailAddress>jane.doe@resellerallservices.net</emailAddress> <emailAddress>e3@yahoo.com</emailAddress> </emailAddressList> </alias>
Json Result Example:
{"emailAddressList":{"emailAddress":["jane.doe@resellerallservices.net","e3@yahoo.com"]},"name":"alias3"}
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Non-existent alias. | 404 | Resource not found. |
Delete
URL:
[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/aliases/(alias name)
Description:
Deletes the alias.
Example:
delete '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1', Formats.xml
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Non-existent alias. | 404 | Resource not found. |
Add Email Address to Alias List
URL:
Adding an email address to a alias. [POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/aliases/(alias name)/(email address)
Description:
Adds an email address to the domain email list or to the non-domain email list.
Example:
post '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1/joe.schmoe@resellerallservices.net', {}, Formats.xml
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Non-existent email address in the alias. | 400 | An alias must point to a valid email address. The following email addresses do not exist: a@resellerallservices.net |
More than four non-domain email addresses specified. | 400 | Max number of non-local email recipients reached. |
Non existent alias. | 404 | Resource not found. |
Delete Email Address From Alias List
URL:
Deleting an email address from an alias. [DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/aliases/(alias name)/(email address)
Description:
Deletes an email address from the domain email list or from the non-domain email list.
Example:
delete '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1/joe.schmoe@resellerallservices.net', {}, Formats.xml
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Non existent alias. | 404 | Resource not found. |
Non existent email address in the alias. | 404 | Email address jane.doe@resellerallservices.net does not exist in alias alias1. |
Bulk Modify Alias List
URL:
[PUT] https://api.emailsrvr.com/v1/customers/(account number)/domains/(domain name)/rs/aliases/(alias name)
Description:
You can modify an existing alias by replacing its contents with the new email addresses specified in the field aliasEmails. The following list shows the number of email addresses you can specify:
- 1 - 50 domain email addresses
- 1 - 4 non-domain addresses
You must specify at least one email address. By default, the maximum combined total of email addresses you can specify is 50.
You cannot delete a specific email address using DELETE. If you use DELETE with this operation, the entire alias is deleted.
Form Fields:
Field Name | Data Type | Description |
---|---|---|
aliasEmail | string | A comma separated list of email addresses. |
Example:
put '/customers/100487/domains/testdomain.com/rs/aliases/alias_name', { aliasEmails=email@outsider.com,abc@yahoo.com,user1@domain.com, user2@domain.com }, 'text/xml'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Modify Invalid Alias | 404 | Entity of type Alias identified by user3@domain.com was not found. |
Modify Valid Alias With No Email Address | 400 | An alias must point to a valid email address. |
Modify Valid Alias With Non Existing Email Address(es) | 404 | An alias must point to a valid email address. The following email addresses do not exist: user@domain.com. |