Difference between revisions of "Rackspace Alias(Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
(Index)
(Show)
Line 106: Line 106:
 
''Remarks'':
 
''Remarks'':
  
The show operation only supports the GET HTTP verb. For .xml format refer to the following schema document: [http://api.emailsrvr.com/v0/Schemas/RSAliasInfo.xsd RSAliasInfo.xsd]
+
The show operation only supports the GET HTTP verb. For .xml format refer to the following schema document: [http://api.emailsrvr.com/Schemas/RSAliasInfo.xsd RSAliasInfo.xsd]
  
  

Revision as of 06:30, 25 July 2013

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:

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/v0/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: RSAliasInfo.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.

Bulk Modify Alias List

URL:

[PUT] https://api.emailsrvr.com/v0/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.