Domain (Rest API)

From Rackspace Email & Apps API
Revision as of 11:45, 25 August 2009 by Zhen.wei (talk | contribs) (add Rest API Domains page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PageOutline

Domain

Index

URL:

[GET] /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:

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

Example:

get '/customers/999999/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] /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] /customers/(customer account number)/domains/(domain name)
Edit: [PUT] /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
maxNumMailboxes string Maximum number of mailboxes allowed under the domain (Required for Add)
extraStorage string Extra storage in megabytes
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] /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] /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] /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