Difference between revisions of "Rackspace Alias(Rest API)"
(→Show) |
(remove accept header from examples to avoid confusion) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
− | == Index == | + | == v1 - Current == |
+ | |||
+ | === Index === | ||
''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 16: | Line 18: | ||
''Remarks'': | ''Remarks'': | ||
− | The show operation only supports the GET HTTP verb. | + | The show operation only supports the GET HTTP verb. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | get '/customers/12345678/domains/example.com/rs/aliases | + | get '/customers/12345678/domains/example.com/rs/aliases' |
</pre> | </pre> | ||
Line 43: | Line 45: | ||
</pre> | </pre> | ||
− | == Add == | + | === Add === |
''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 66: | Line 68: | ||
post '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1', | post '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1', | ||
{'aliasEmails'=>'jane.doe@resellerallservices.net, joe.schmoe@resellerallservices.net,e1@yahoo.com, e2@gmail.com' | {'aliasEmails'=>'jane.doe@resellerallservices.net, joe.schmoe@resellerallservices.net,e1@yahoo.com, e2@gmail.com' | ||
− | } | + | } |
− | |||
</pre> | </pre> | ||
Line 94: | Line 95: | ||
|} | |} | ||
− | == Show == | + | === Show === |
''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 106: | Line 107: | ||
''Remarks'': | ''Remarks'': | ||
− | The show operation only supports the GET HTTP verb. | + | The show operation only supports the GET HTTP verb. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | get '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1' | + | get '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1' |
</pre> | </pre> | ||
Line 145: | Line 146: | ||
|} | |} | ||
− | == Delete == | + | === Delete === |
''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 157: | Line 158: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | delete '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1' | + | delete '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1' |
</pre> | </pre> | ||
Line 173: | Line 174: | ||
|} | |} | ||
− | == Add Email Address to Alias List == | + | === Add Email Address to Alias List === |
''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 187: | Line 188: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | post '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1/joe.schmoe@resellerallservices.net', {} | + | post '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1/joe.schmoe@resellerallservices.net', {} |
</pre> | </pre> | ||
Line 212: | Line 213: | ||
|} | |} | ||
− | == Delete Email Address From Alias List == | + | === Delete Email Address From Alias List === |
''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 226: | Line 227: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | delete '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1/joe.schmoe@resellerallservices.net', {} | + | delete '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1/joe.schmoe@resellerallservices.net', {} |
</pre> | </pre> | ||
Line 246: | Line 247: | ||
|} | |} | ||
− | == Bulk Modify Alias List == | + | === Bulk Modify Alias List === |
''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 280: | Line 281: | ||
<pre> | <pre> | ||
put '/customers/100487/domains/testdomain.com/rs/aliases/alias_name', | put '/customers/100487/domains/testdomain.com/rs/aliases/alias_name', | ||
− | { aliasEmails=email@outsider.com,abc@yahoo.com,user1@domain.com, user2@domain.com } | + | { aliasEmails=email@outsider.com,abc@yahoo.com,user1@domain.com, user2@domain.com } |
− | |||
</pre> | </pre> | ||
Latest revision as of 13:46, 12 January 2017
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.
Example:
get '/customers/12345678/domains/example.com/rs/aliases'
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' }
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.
Example:
get '/customers/100018/domains/resellerallservices.net/rs/aliases/alias1'
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'
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', {}
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', {}
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 }
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. |