Difference between revisions of "Domain (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
(add Rest API Domains page)
 
m
Line 8: Line 8:
  
 
  [GET] /customers/(customer account number)/domains
 
  [GET] /customers/(customer account number)/domains
+
 
 +
 
 
''Description'':
 
''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.
+
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'':
 
''Remarks'':
  
The index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [https://trac.iad.mlsrvr.com/trac/controlpanel3/browser/Api/trunk/lib/ControlPanel.Api/Schemas/Domains.xsd Domains.xsd]
+
The index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [https://trac.iad.mlsrvr.com/trac/controlpanel3/browser/Api/trunk/lib/ControlPanel.Api/Schemas/Domains.xsd Domains.xsd]
 +
 
  
 
''Example'':
 
''Example'':
Line 22: Line 25:
 
get '/customers/999999/domains?size=100&page=1', 'text/xml'
 
get '/customers/999999/domains?size=100&page=1', 'text/xml'
 
</pre>
 
</pre>
 +
  
 
''Errors'':
 
''Errors'':
Line 45: Line 49:
  
 
  [GET] /customers/(customer account number)/domains/(domain name)
 
  [GET] /customers/(customer account number)/domains/(domain name)
 +
  
 
''Description'':
 
''Description'':
  
The show operation will return detailed information about the specified domain name.
+
The show operation will return detailed information about the specified domain name.
 +
 
  
 
''Remarks'':
 
''Remarks'':
  
The show operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [https://trac.iad.mlsrvr.com/trac/controlpanel3/browser/Api/trunk/lib/ControlPanel.Api/Schemas/Domain.xsd Domain.xsd]
+
The show operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [https://trac.iad.mlsrvr.com/trac/controlpanel3/browser/Api/trunk/lib/ControlPanel.Api/Schemas/Domain.xsd Domain.xsd]
 +
 
  
 
''Example'':
 
''Example'':
Line 59: Line 66:
 
get '/customers/999999/domains/example.com', 'text/xml'
 
get '/customers/999999/domains/example.com', 'text/xml'
 
</pre>
 
</pre>
 +
  
 
''Errors'':
 
''Errors'':
Line 83: Line 91:
 
  Add: [POST] /customers/(customer account number)/domains/(domain name)<br>
 
  Add: [POST] /customers/(customer account number)/domains/(domain name)<br>
 
  Edit: [PUT] /customers/(customer account number)/domains/(domain name)
 
  Edit: [PUT] /customers/(customer account number)/domains/(domain name)
 +
 
   
 
   
 
''Description'':
 
''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.
 
  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.
 +
 
   
 
   
 
{| border=1 class="simple"
 
{| border=1 class="simple"
Line 124: Line 134:
 
}
 
}
 
</pre>
 
</pre>
 +
  
 
''Errors'':
 
''Errors'':
Line 171: Line 182:
  
 
  [PUT] /customers/(new customer account number)/domains/(domain name)
 
  [PUT] /customers/(new customer account number)/domains/(domain name)
 +
  
 
''Description'':
 
''Description'':
  
 
  Moves the domain to another customer account.
 
  Moves the domain to another customer account.
 +
 
   
 
   
 
{| border=1 class="simple"
 
{| border=1 class="simple"
Line 188: Line 201:
  
 
''Remarks'':
 
''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.
+
 
 +
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'':
 
''Example'':
Line 198: Line 213:
 
}
 
}
 
</pre>
 
</pre>
 +
  
 
''Errors'':
 
''Errors'':
Line 225: Line 241:
  
 
  [DELETE] /customers/(customer account number)/domains/(domain name)
 
  [DELETE] /customers/(customer account number)/domains/(domain name)
 +
  
 
''Description'':
 
''Description'':
  
Deletes the domain.
+
Deletes the domain.
 +
 
 
   
 
   
 
''Remarks'':
 
''Remarks'':
  
 +
The domain and all the mailboxes, mailbox contents, groups, and contacts are deleted permanently.
  
The domain and all the mailboxes, mailbox contents, groups, and contacts are deleted permanently.
 
 
   
 
   
 
''Example'':
 
''Example'':
Line 240: Line 258:
 
delete '/customers/12345678/domains/newcompany.com', 'text/xml'
 
delete '/customers/12345678/domains/newcompany.com', 'text/xml'
 
</pre>
 
</pre>
 +
  
 
''Errors'':
 
''Errors'':
Line 264: Line 283:
  
 
  [GET] /customers/(customer account number)/domains/(domain)/archivingSSOLoginURL
 
  [GET] /customers/(customer account number)/domains/(domain)/archivingSSOLoginURL
 +
  
 
''Description'':
 
''Description'':
  
Gets the domain archiving service SSO login URL.
+
Gets the domain archiving service SSO login URL.
 +
 
 
   
 
   
 
''Remarks'':
 
''Remarks'':
  
 +
The retrieved URL can be used in browser to access the domain archiving control panel.
  
The retrieved URL can be used in browser to access the domain archiving control panel.
 
 
   
 
   
 
''Example'':
 
''Example'':
Line 279: Line 300:
 
get '/customers/12345678/domains/company.com/archivingSSOLoginURL', 'text/xml'
 
get '/customers/12345678/domains/company.com/archivingSSOLoginURL', 'text/xml'
 
</pre>
 
</pre>
 +
  
 
''Errors'':
 
''Errors'':

Revision as of 12:24, 25 August 2009

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