Difference between revisions of "Domain (Rest API)"
m |
(update schema file link) |
||
Line 17: | Line 17: | ||
''Remarks'': | ''Remarks'': | ||
− | The index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [ | + | Keyword "me" can be used as customer account number to retrieve reseller's own domain list. Similarly, keyword "all" can be used retrieve 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: [http://api.emailsrvr.com/v0/Schemas/DomainList.xsd DomainList.xsd] | ||
Line 23: | Line 25: | ||
<pre> | <pre> | ||
− | get '/customers/ | + | get '/customers/all/domains?size=100&page=1', 'text/xml' |
</pre> | </pre> | ||
Line 58: | Line 60: | ||
''Remarks'': | ''Remarks'': | ||
− | The show operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [Domain.xsd] | + | The show operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [http://api.emailsrvr.com/v0/Schemas/Domain.xsd Domain.xsd] |
Line 103: | Line 105: | ||
!''Description'' | !''Description'' | ||
|- | |- | ||
− | | | + | | serviceType |
| string | | string | ||
− | | Maximum number of mailboxes allowed under the domain | + | | 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 | ||
|- | |- | ||
| hasArchivingService | | hasArchivingService | ||
| boolean | | boolean | ||
| Enable or disable domain archiving service | | Enable or disable domain archiving service | ||
+ | |- | ||
|} | |} | ||
Revision as of 22:18, 29 August 2009
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:
Keyword "me" can be used as customer account number to retrieve reseller's own domain list. Similarly, keyword "all" can be used retrieve 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] /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 |
---|---|---|
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 |
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 |