Rackspace Mailbox (Rest API)

From Rackspace Email & Apps API
Revision as of 19:40, 11 June 2010 by Zhen.wei (talk | contribs) (update rs mailbox)
Jump to: navigation, search

Index

URL:

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


Description:

Shows a list of mailboxes under the domain


Remarks:

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


Example:

get '/customers/12345678/domains/example.com/rs/mailboxes', 'text/xml'


XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<rsMailboxList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:rsMailboxList">
  <offset>0</offset>
  <size>50</size>
  <total>2</total>
  <rsMailboxes>
    <rsMailbox>
      <name>apirsmailbox37</name>
    </rsMailbox>
    <rsMailbox>
      <name>apirsmailbox91</name>
    </rsMailbox>
  </rsMailboxes>
</rsMailboxList>


Json Result Example:

{"offset":0,"size":50,"total":2,"rsMailboxes":[{"name":"apirsmailbox37"},{"name":"apirsmailbox91"}]}


Show

URL:

[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /rs/mailboxes/(mailbox name)


Description:

The show operation will return detailed information about the specified mailbox.


Remarks:

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


Example:

get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith', 'text/xml'


XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<rsMailbox xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:rsMailbox">
  <name>apirsmailbox37</name>
  <size>10240</size>
  <vacationMessage>My Test Vacation Message</vacationMessage>
  <enableVacationMessage>true</enableVacationMessage>
  <emailForwardingAddressList>
    <emailAddress>notreal0@apidomain.net</emailAddress>
    <emailAddress>notreal1@apidomain.net</emailAddress>
  </emailForwardingAddressList>
  <saveForwardedEmail>false</saveForwardedEmail>
</rsMailbox>


Json Result Example: {"emailForwardingAddresses":"notreal0@apidomain0.com","enableVacationMessage":true,"name":"apirsmailbox0","saveForwardedEmail":false,"size":2048,"vacationMessage":"My Test Vacation Message"}

Add/Edit

URL:

Add: [POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /rs/mailboxes/(mailbox name)
Edit: [PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /rs/mailboxes/(mailbox name)

Description:

Adds/edits a noteworthy mailbox using the following form fields.

Field Name Data Type Description
password string Password (Required for Add)
size positive integer Mailbox size in megabytes (Required for Add)
enableVacationMessage boolean indicates whether vacation message has been enabled
vacationMessage string A mailbox's vacation message
emailForwardingAddresses string A comma delimited list, Maximum 15 addresses, 4 of which can be outside of this domain
saveForwardedEmail boolean Indicates whether to save a copy of any forwarded email

Example:

post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith', 'text/xml',
{ 
  'password' => 'Secret13!@#',
  'size' => '2048',
  'enableVacationMessage' => 'true',
  'vacationMessage' => 'My Vacation Message',
  'emailForwardingAddresses' => 'sampletest@example.com,sampletest2@example.com',
  'saveForwardedEmail' => 'false'
  
} 

Delete

URL:

[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
            /rs/mailboxes/(mailbox name)

Description:

Deletes the mailbox.


Remarks:

The mailbox and mailbox contents are deleted permanently.


Example:

delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith', 'text/xml'