Difference between revisions of "Rackspace Mailbox (Rest API)"
(add rsmailbox page) |
(No difference)
|
Revision as of 22:27, 15 May 2010
Contents
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> </rsMailbox>
Json Result Example:
{"name":"apirsmailbox37","size":10240}
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) |
Example:
post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith', 'text/xml',
{
'password' => 'Secret123!@#',
'size' => '2048'
}
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'