Difference between revisions of "Exchange Contact (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
m
Line 1: Line 1:
== Exchange Contact ==
+
 
 +
 
 +
__TOC__
 +
 
  
 
=== Index ===
 
=== Index ===
  
 
''URL'':
 
''URL'':
  [GET] /customers/(customer account number)/domains/(domain name)/ex/contacts
+
  <nowiki>[GET] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
        /ex/contacts</nowiki>
  
  
Line 29: Line 33:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Format is invalid
 
| Format is invalid
 
| 406
 
| 406
 
| Invalid format
 
| Invalid format
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
Line 43: Line 47:
  
 
''URL'':
 
''URL'':
  [GET] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)
+
  <nowiki>[GET] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
        /ex/contacts/(contact name)</nowiki>
  
  
Line 68: Line 73:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Format is invalid
 
| Format is invalid
 
| 406
 
| 406
 
| Invalid format
 
| Invalid format
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Contact is not found
 
| Contact is not found
 
| 404
 
| 404
Line 86: Line 91:
  
 
''URL'':
 
''URL'':
  Add: [POST] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)<br>
+
  <nowiki>Add: [POST] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
Edit: [PUT] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)
+
                /ex/contacts/(contact name)
 +
 
 +
Edit: [PUT] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
                /ex/contacts/(contact name)</nowiki>
  
  
Line 99: Line 107:
 
!''Data Type''
 
!''Data Type''
 
!''Description''
 
!''Description''
|-  
+
|-
 
| displayName
 
| displayName
 
| string
 
| string
 
| Name of contact when displayed (Required for add)
 
| Name of contact when displayed (Required for add)
|-  
+
|-
 
| externalEmail
 
| externalEmail
 
| string
 
| string
 
| Email address (Required for add)
 
| Email address (Required for add)
|-  
+
|-
 
| isHidden
 
| isHidden
 
| boolean
 
| boolean
 
| Whether the contact is hidden from the Global List
 
| Whether the contact is hidden from the Global List
|-  
+
|-
 
| firstName
 
| firstName
 
| string
 
| string
 
| First name
 
| First name
|-  
+
|-
 
| lastName
 
| lastName
 
| string
 
| string
 
| Last name
 
| Last name
|-  
+
|-
 
| jobTitle
 
| jobTitle
 
| string
 
| string
 
| Job title
 
| Job title
|-  
+
|-
 
| company
 
| company
 
| string
 
| string
 
| Company
 
| Company
|-  
+
|-
 
| department
 
| department
 
| string
 
| string
 
| Department
 
| Department
|-  
+
|-
 
| businessnumber
 
| businessnumber
 
| string
 
| string
 
| Business phone number
 
| Business phone number
|-  
+
|-
 
| homenumber
 
| homenumber
 
| string
 
| string
 
| Home phone number
 
| Home phone number
|-  
+
|-
 
| mobilenumber
 
| mobilenumber
 
| string
 
| string
 
| Mobile phone number
 
| Mobile phone number
|-  
+
|-
 
| faxnumber
 
| faxnumber
 
| string
 
| string
 
| Fax number
 
| Fax number
|-  
+
|-
 
| pagernumber
 
| pagernumber
 
| string
 
| string
 
| Pager number
 
| Pager number
|-  
+
|-
 
| addressLine1
 
| addressLine1
 
| string
 
| string
 
| Street address
 
| Street address
|-  
+
|-
 
| city
 
| city
 
| string
 
| string
 
| City
 
| City
|-  
+
|-
 
| state
 
| state
 
| string
 
| string
 
| State
 
| State
|-  
+
|-
 
| zip
 
| zip
 
| string
 
| string
 
| Zip or postal code
 
| Zip or postal code
|-  
+
|-
 
| country
 
| country
 
| string
 
| string
 
| Country
 
| Country
|-  
+
|-
 
| notes
 
| notes
 
| string
 
| string
Line 183: Line 191:
 
{
 
{
 
   'displayName' => 'Johnny Customer',
 
   'displayName' => 'Johnny Customer',
   'externalEmail' => 'jonny@apple.com'  
+
   'externalEmail' => 'jonny@apple.com'
 
}
 
}
 
</pre>
 
</pre>
Line 192: Line 200:
 
   'externalEmail' => 'jonnysNewEmail@microsoft.com',
 
   'externalEmail' => 'jonnysNewEmail@microsoft.com',
 
   'company' => 'Microsoft',
 
   'company' => 'Microsoft',
   'businessnumber' => '425 555 5555'  
+
   'businessnumber' => '425 555 5555'
 
}
 
}
 
</pre>
 
</pre>
Line 203: Line 211:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Format is invalid
 
| Format is invalid
 
| 406
 
| 406
 
| Invalid format
 
| Invalid format
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Contact is not found
 
| Contact is not found
 
| 404
 
| 404
 
| No user with the email address jane.doe@abc.com exists
 
| No user with the email address jane.doe@abc.com exists
|-  
+
|-
 
| New display name doesn't meet the naming requirements
 
| New display name doesn't meet the naming requirements
 
| 400
 
| 400
 
| Invalid display name
 
| Invalid display name
|-  
+
|-
 
| Boolean form field has non-boolean input
 
| Boolean form field has non-boolean input
 
| 400
 
| 400
 
| Invalid format for Enabled, input must be True or False
 
| Invalid format for Enabled, input must be True or False
|-  
+
|-
 
| Form data has unrecognized field
 
| Form data has unrecognized field
 
| 400
 
| 400
 
| Unrecognized field: size
 
| Unrecognized field: size
|-  
+
|-
 
| Required form field is missing
 
| Required form field is missing
 
| 400
 
| 400
 
| Missing required field: displayName
 
| Missing required field: displayName
|-  
+
|-
 
| Required form field has null or empty string input
 
| Required form field has null or empty string input
 
| 400
 
| 400
 
| Required field displayName cannot be empty
 
| Required field displayName cannot be empty
|-  
+
|-
 
| New display name doesn't meet the naming requirements
 
| New display name doesn't meet the naming requirements
 
| 400
 
| 400
 
| Invalid display name
 
| Invalid display name
|-  
+
|-
 
| New contact name (user name) already exists
 
| New contact name (user name) already exists
 
| 400
 
| 400
 
| The email address john.doe@abc.com is already in use
 
| The email address john.doe@abc.com is already in use
|-  
+
|-
 
| New contact name (user name) is reserved by Exchange
 
| New contact name (user name) is reserved by Exchange
 
| 400
 
| 400
Line 253: Line 261:
  
 
''URL'':
 
''URL'':
  [DELETE] /customers/(customer account number)/domains/(domain name)/ex/contacts/(contact name)
+
  <nowiki>[DELETE] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 +
            /ex/contacts/(contact name)</nowiki>
  
  
Line 277: Line 286:
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
 
| Domain is not found
 
| Domain is not found
 
| 404
 
| 404
 
| abc.com not found
 
| abc.com not found
|-  
+
|-
 
| Contact is not found
 
| Contact is not found
 
| 404
 
| 404
 
| No user with the email address jane.doe@abc.com exists
 
| No user with the email address jane.doe@abc.com exists
 
|}
 
|}

Revision as of 13:20, 2 September 2009



Index

URL:

[GET] http://api.emailsrvr.com/v0/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: ContactList.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] http://api.emailsrvr.com/v0/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] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
                /ex/contacts/(contact name)

Edit: [PUT] http://api.emailsrvr.com/v0/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] http://api.emailsrvr.com/v0/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