Rackspace Alias(Rest API)

From Rackspace Email & Apps API
Revision as of 18:16, 20 June 2010 by Zhen.wei (talk | contribs) (add rsemail alias page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Index

URL:

[GET] http://api.emailsrvr.com/v0/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/v0/customers/(customer account number)/domains/(domain name)
        /rs/aliases/(alias name)

Description:

Create 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 on domain emails and 4 on 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/v0/customers/(customer account number)/domains/(domain name)
        /rs/mailboxes/(mailbox name)/alias/(alias name)

Description:

The show operation will return 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/v0/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/v0/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/v0/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.