Domain (Rest API)

From Rackspace Email & Apps API
Revision as of 10:44, 2 September 2009 by Kevin.lin (talk | contribs)
Jump to: navigation, search


Index

URL:

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


Description:

This operation returns a list of domains under the account. If a customer account is specified, then a list of domains under that specific account will be returned.


Remarks:

Keyword "me" can be used as customer account number to retrieve reseller's own domain list. Similarly, keyword "all" can be used retrieve the reseller's own domains and all sub-accounts' domains.

The index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: DomainList.xsd


Example:

get '/customers/all/domains?size=100&page=1', 'text/xml'


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Customer account number is invalid 404 Invalid account number


Show

URL:

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


Description:

The show operation will return detailed information about the specified domain name.


Remarks:

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


Example:

get '/customers/999999/domains/example.com', 'text/xml'


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found


Add/Edit

URL:

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


Description:

Adds/edits a new domain to the account with the data specified. To add a domain to your own account, use your own account id.


Field Name Data Type Description
serviceType string Domain service type. "rsemail" = "Rackspace Email Only". "exchange" = "Exchange Only". "both" = "Rackspace Email and Exchange"
exchangeExtraStorage int Exchange service extra storage in megabytes
exchangeMaxNumMailboxes int Maximum number of mailboxes allowed under the domain Exchange service. Required for Adding Exchange service
rsEmailBaseMailboxSize int Rackspace Email base mailbox size in megabytes
rsEmailMaxNumberMailboxes int Maximum number of mailboxes allowed under the domain Rackspace Email service. Required for Adding Rackspace Email service
rsEmailExtraStorage int Rackspace Email service extra storage in megabytes
blackberry boolean Enable or disable domain BlackBerryMobile service
blackberryLicenses int Maximum number of mailboxes allowed to have BlackBerryMobile service. 0 means unlimited
activesync boolean Enable or disable domain ActiveSyncMobile service
activesyncLicenses int Maximum number of mailboxes allowed to have ActiveSyncMobile service. 0 means unlimited
goodmobile boolean Enable or disable domain GoodMobile service
goodmobileLicenses int Maximum number of mailboxes allowed to have GoodMobile service. 0 means unlimited
hasArchivingService boolean Enable or disable domain archiving service


Example:

post '/customers/123455/domains/newcompany.com', 'text/xml',
{
  'maxNumMailboxes' => '5',
  'extraStorage' => '1024'  
}
put '/customers/123455/domains/newcompany.com', 'text/xml',
{
  'maxNumMailboxes' => '25',
  'extraStorage' => '2048'  
}


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Customer account number is invalid 404 Invalid account number
Form data has unrecognized field 400 Unrecognized field: size
Required form field is missing 400 Missing required field: maxNumMailboxes
Required form field has null or empty string input 400 Required field name cannot be empty
Integer form field has non-integer input 400 Invalid format for maxNumMailboxes, input must be an integer
New domain name doesn't meet the naming requirements 400 Invalid domain name
New domain name already exists 400 abc.com already exists as a domain or alternate domain


Move

URL:

[PUT] http://api.emailsrvr.com/v0/customers/(new customer account number)/domains/(domain name)


Description:

Moves the domain to another customer account.


Field Name Data Type Description
moveDomain boolean Indicate whether or not moving the domain


Remarks:

Note 'Move Domain' and 'Edit Domain' share the same URI and HTTP verb. When the domain doesn't belong to the customer and 'moveDomain' is set to 'true', API will take the request as a 'Move Domain' call.


Example:

put '/customers/123456/domains/newcompany.com', 'text/xml',
{
  'moveDomain' => 'true'
}


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found
Customer is not found 404 Customer not found


Delete

URL:

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


Description:

Deletes the domain.


Remarks:

The domain and all the mailboxes, mailbox contents, groups, and contacts are deleted permanently.


Example:

delete '/customers/12345678/domains/newcompany.com', 'text/xml'


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found


Archiving SSO Login URL

URL:

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


Description:

Gets the domain archiving service SSO login URL.


Remarks:

The retrieved URL can be used in browser to access the domain archiving control panel.


Example:

get '/customers/12345678/domains/company.com/archivingSSOLoginURL', 'text/xml'


Errors:

Description HTTP Response Code Sample Message
Format is invalid 406 Invalid format
Domain is not found 404 abc.com not found
No archiving service 404 Domain abc.com has no archiving service enabled