Resource Mailbox (Rest API)
Index
URL:
[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /ex/resources
Description:
This operation returns a list of resource mailboxes associated with the domain.
Remarks:
The Index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: ResourceList.xsd
Example:
get '/customers/12345678/domains/example.com/ex/resources?size=100&page=1&contains=conference'
XML Result Example:
<?xml version="1.0" encoding="utf-8"?>
<resourceList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:resourceList">
  <offset>0</offset>
  <size>50</size>
  <total>3</total>
  <resources>
    <resource>
      <name>apiexresource43</name>
      <displayName>API Test</displayName>
      <type>room</type>
    </resource>
    <resource>
      <name>apiexresource5</name>
      <displayName>API Test</displayName>
      <type>equipment</type>
    </resource>
    <resource>
      <name>apiexresource85</name>
      <displayName>API Test</displayName>
      <type>room</type>
    </resource>
  </resources>
</resourceList>
Json Result Example:
{"offset":0,"size":50,"total":3,"resources":[{"name":"apiexresource43","displayName":"API Test","type":"room"},{"name":"apiexresource5","displayName":"API Test","type":"equipment"},{"name":"apiexresource85","displayName":"API Test","type":"room"}]}
Show
URL:
[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /ex/resources/(resource name)
Description:
Returns the resource's details.
Remarks:
The show operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: Resource.xsd
Example:
get '/customers/12345678/domains/example.com/ex/resource/conference.room'
XML Result Example
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?> <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:resource"> <name>apiexresource43</name> <displayName>API Test</displayName> <type>room</type> </resource>
Json Result Example:
{"name":"apiexresource43","displayName":"API Test","type":"room"}
Errors:
| Description | HTTP Response Code | Sample Message | 
|---|---|---|
| Resource is not found | 404 | Resource not found | 
| Entity is found but it's not a resource mailbox | 404 | Mailbox is not a resource. | 
Add/Edit
URL:
Add: [POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
                /ex/resources/(resource name)
Edit: [PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
                /ex/resources/(resource name)
Description:
Adds/edits the resource with the specified information. Required fields must be supplied when adding. Others are optional.
| Field Name | Data Type | Description | 
|---|---|---|
| displayName | string | Resource display name (Required for add) | 
| type | string | The resource type, 'room' or 'equipment' (Required for add, not available for edit) | 
| password | string | The password to change the settings of the mailbox or add/remove admins (Required for add) | 
Example:
post '/customers/12345678/domains/example.com/ex/resources/conference.room',
{
  'displayName' => 'Conference Room'
  'type' => 'room'
  'password' => 'abcDEF123'
}
put '/customers/12345678/domains/example.com/ex/resources/all.employees',
{
  'displayName' => 'Conference Room A'
  'password' => 'ABCd4321'
}
Errors:
| Description | HTTP Response Code | Sample Message | 
|---|---|---|
| New resource mailbox already exists | 400 | The email address conference.room@abc.com is already in use | 
| New resource mailbox name doesn't meet the naming requirements | 400 | Invalid resource name | 
| New display name doesn't meet the naming requirements | 400 | Invalid display name | 
| Invalid resource mailbox type | 400 | Invalid Resource Type. The input must be: room/equipment. | 
Delete
URL:
[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
            /ex/resources/(resource name)
Description:
Deletes the resource.
Example:
delete '/customers/12345678/domains/example.com/ex/resources/all.employees'
| Description | HTTP Response Code | Sample Message | 
|---|---|---|
| Resource is not found | 404 | Resource not found | 
| Entity is found but it's not a resource mailbox | 404 | Mailbox is not a resource. | 
Admins
This refers to the admins that can manage the resource.
Index Admin
URL:
[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /ex/resources/(resource name)/admins
Description:
Gets the list of resource admins.
Remarks:
The Index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: ResourceAdminList.xsd
Example:
get '/customers/12345678/domains/example.com/ex/resources/conference.room/admins'
XML Result Example:
<?xml version="1.0" encoding="utf-8"?>
<resourceAdminList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:resourceAdminList">
  <offset>0</offset>
  <size>50</size>
  <total>3</total>
  <admins>
    <admin>apiexmailbox70@apidomain90.com</admin>
    <admin>apiexmailbox87@apidomain90.com</admin>
    <admin>apiexmailbox89@apidomain90.com</admin>
  </admins>
</resourceAdminList>
Json Result Example:
{"offset":0,"size":50,"total":3,"admins":["apiexmailbox70@apidomain90.com","apiexmailbox87@apidomain90.com","apiexmailbox89@apidomain90.com"]}
Errors:
| Description | HTTP Response Code | Sample Message | 
|---|---|---|
| Resource is not found | 404 | Resource not found | 
| Entity is found but it's not a resource mailbox | 404 | Mailbox is not a resource. | 
Add Admin
URL:
[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /ex/resources/(resource name)/admins/(admin name)
Description:
Adds an admin to the resource.
Example:
post '/customers/12345678/domains/example.com/ex/resources/conference.room/admins/john.smith', {}
Errors:
| Description | HTTP Response Code | Sample Message | 
|---|---|---|
| Resource not found | 404 | Resource not found | 
Errors:
| Description | HTTP Response Code | Sample Message | 
|---|---|---|
| Resource is not found | 404 | Resource not found | 
| Entity is found but it's not a resource mailbox | 404 | Mailbox is not a resource. | 
| Admin is already on the resource admin list. | 400 | User is already on the resource admin list. | 
Delete Admin
URL:
[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
        /ex/resources/(resource name)/admins/(admin name)
Description:
Removes the admin from the resource.
Example:
delete '/customers/12345678/domains/example.com/ex/resources/conference.room/admins/john.smith'
Errors:
| Description | HTTP Response Code | Sample Message | 
|---|---|---|
| Resource is not found | 404 | Resource not found | 
| Entity is found but it's not a resource mailbox | 404 | Mailbox is not a resource. | 
| Admin is not found on the resource admin list. | 400 | User is not on the resource admin list. |