Difference between revisions of "Exchange Contact (Rest API)"
From Rackspace Email & Apps API
(add Rest API Contact page) |
m |
||
Line 6: | Line 6: | ||
''URL'': | ''URL'': | ||
+ | [GET] /customers/(customer account number)/domains/(domain name)/ex/contacts | ||
− | |||
''Description'': | ''Description'': | ||
− | + | Returns a list of contacts under the domain. | |
+ | |||
''Remarks'': | ''Remarks'': | ||
− | + | For the text/xml format, refer to the following schema document: [https://trac.iad.mlsrvr.com/trac/controlpanel3/browser/Api/trunk/lib/ControlPanel.Api/Schemas/Contacts.xsd Contacts.xsd] | |
+ | |||
''Example'': | ''Example'': | ||
− | |||
<pre> | <pre> | ||
get '/customers/12345678/domains/example.com/ex/contacts?size=100&page=1&contains=john', 'text/xml' | get '/customers/12345678/domains/example.com/ex/contacts?size=100&page=1&contains=john', 'text/xml' | ||
</pre> | </pre> | ||
+ | |||
''Errors'': | ''Errors'': | ||
Line 43: | Line 45: | ||
''URL'': | ''URL'': | ||
+ | [GET] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name) | ||
− | |||
''Description'': | ''Description'': | ||
− | + | Returns the contact's details. | |
+ | |||
''Remarks'': | ''Remarks'': | ||
− | + | For the text/xml format, refer to the following schema document: [https://trac.iad.mlsrvr.com/trac/controlpanel3/browser/Api/trunk/lib/ControlPanel.Api/Schemas/Contact.xsd Contact.xsd] | |
+ | |||
''Example'': | ''Example'': | ||
− | |||
<pre> | <pre> | ||
get '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml' | get '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml' | ||
</pre> | </pre> | ||
+ | |||
''Errors'': | ''Errors'': | ||
Line 84: | Line 88: | ||
''URL'': | ''URL'': | ||
− | |||
Add: [POST] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)<br> | Add: [POST] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)<br> | ||
Edit: [PUT] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name) | Edit: [PUT] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name) | ||
+ | |||
''Description'': | ''Description'': | ||
− | + | Adds or edits the contact's details as specified. If the contact does not exist, use Add, if it does, use Edit. | |
+ | |||
{| border=1 class="simple" | {| border=1 class="simple" | ||
Line 176: | Line 181: | ||
''Example'': | ''Example'': | ||
− | |||
<pre> | <pre> | ||
post '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml', | post '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml', | ||
Line 193: | Line 197: | ||
} | } | ||
</pre> | </pre> | ||
+ | |||
''Errors'': | ''Errors'': | ||
Line 250: | Line 255: | ||
''URL'': | ''URL'': | ||
+ | [DELETE] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name) | ||
− | |||
''Description'': | ''Description'': | ||
− | + | Deletes the contact. | |
+ | |||
''Remarks'': | ''Remarks'': | ||
− | + | ||
+ | Contact is deleted immediately without verification and data is lost permanently. | ||
+ | |||
''Example'': | ''Example'': | ||
− | |||
<pre> | <pre> | ||
delete '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml' | delete '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml' |
Revision as of 14:09, 25 August 2009
Contents
Contact
Index
URL:
[GET] /customers/(customer account number)/domains/(domain name)/ex/contacts
Description:
Returns a list of contacts under the domain.
Remarks:
For the text/xml format, refer to the following schema document: Contacts.xsd
Example:
get '/customers/12345678/domains/example.com/ex/contacts?size=100&page=1&contains=john', 'text/xml'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Format is invalid | 406 | Invalid format |
Domain is not found | 404 | abc.com not found |
Show
URL:
[GET] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)
Description:
Returns the contact's details.
Remarks:
For the text/xml format, refer to the following schema document: Contact.xsd
Example:
get '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Format is invalid | 406 | Invalid format |
Domain is not found | 404 | abc.com not found |
Contact is not found | 404 | Contact not found |
Add/Edit
URL:
Add: [POST] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)
Edit: [PUT] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)
Description:
Adds or edits the contact's details as specified. If the contact does not exist, use Add, if it does, use Edit.
Field Name | Data Type | Description |
---|---|---|
displayName | string | Name of contact when displayed (Required for add) |
externalEmail | string | Email address (Required for add) |
isHidden | boolean | Whether the contact is hidden from the Global List |
firstName | string | First name |
lastName | string | Last name |
jobTitle | string | Job title |
company | string | Company |
department | string | Department |
businessnumber | string | Business phone number |
homenumber | string | Home phone number |
mobilenumber | string | Mobile phone number |
faxnumber | string | Fax number |
pagernumber | string | Pager number |
addressLine1 | string | Street address |
city | string | City |
state | string | State |
zip | string | Zip or postal code |
country | string | Country |
notes | string | Notes field |
Example:
post '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml', { 'displayName' => 'Johnny Customer', 'externalEmail' => 'jonny@apple.com' }
put '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml', { 'externalEmail' => 'jonnysNewEmail@microsoft.com', 'company' => 'Microsoft', 'businessnumber' => '425 555 5555' }
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Format is invalid | 406 | Invalid format |
Domain is not found | 404 | abc.com not found |
Contact is not found | 404 | No user with the email address jane.doe@abc.com exists |
New display name doesn't meet the naming requirements | 400 | Invalid display name |
Boolean form field has non-boolean input | 400 | Invalid format for Enabled, input must be True or False |
Form data has unrecognized field | 400 | Unrecognized field: size |
Required form field is missing | 400 | Missing required field: displayName |
Required form field has null or empty string input | 400 | Required field displayName cannot be empty |
New display name doesn't meet the naming requirements | 400 | Invalid display name |
New contact name (user name) already exists | 400 | The email address john.doe@abc.com is already in use |
New contact name (user name) is reserved by Exchange | 400 | user name reserved |
Delete
URL:
[DELETE] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)
Description:
Deletes the contact.
Remarks:
Contact is deleted immediately without verification and data is lost permanently.
Example:
delete '/customers/12345678/domains/example.com/ex/contacts/alex.smith', 'text/xml'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Domain is not found | 404 | abc.com not found |
Contact is not found | 404 | No user with the email address jane.doe@abc.com exists |