Exchange Resource Mailbox (Rest API)
Contents
v1 - Current
This resource supports submitting and responding with both XML and JSON. (The v0 method of submitting data via form URL-encoded variables is NOT supported in v1.)
Data Model
(See Serialization)
Exchange Resource
Required for Create*
Operations:
This model extends Mailbox.
Field Name | Data Type | Verbs | Description |
---|---|---|---|
Type* | String | GET, POST, PUT | Room or Equipment |
Upn | String | GET | User Principal Name |
ResourceCapacity | Integer | GET, POST, PUT | e.g. The number of seats in a room. |
CustomProperties | Custom Properties array | GET, POST, PUT | User-defined properties (see below). |
ResourceCalendarProcessing | Calendar Processing | GET, POST, PUT | See examples below. |
ResourceDelegates | Delegate Array | GET, POST, PUT | See examples below. |
ResourcePermissions | Resource Permission Array | GET, POST, PUT | See examples below. |
BookInPolicy | Recipients | GET, POST, PUT | See examples below. |
RequestInPolicy | Recipients | GET, POST, PUT | See examples below. |
RequestOutOfPolicy | Recipients | GET, POST, PUT | See examples below. |
Calendar Processing
Operations:
Field Name | Data Type | Description |
---|---|---|
AutoBooking | String | Must be "None", "AutoAccept", or "AutoUpdate" |
BookingWindowInDays | Integer >= 0 | |
EnforceSchedulingHorizon | Boolean | |
AllowRecurringMeetings | Boolean | |
ScheduleOnlyDuringWorkHours | Boolean | |
MaximumDurationInMinutes | Integer >= 0 | |
MaximumConflictInstances | Integer >= 0 | |
ConflictPercentageAllowed | Integer | Must be between 0 and 100. |
AdditionalResponse | Calendar Processing Additional Response Object | See next object definition below. |
Calendar Processing Additional Response
Field Name | Data Type | Description |
---|---|---|
Enable | Boolean | |
Value | String |
Delegate
Operations:
Field Name | Data Type | Description |
---|---|---|
Value | String | Email Address |
Action | String | Must be "Add" or "Remove". Only valid for PUT requests. |
Permission
Operations:
Field Name | Data Type | Description |
---|---|---|
Recipient | String | Email Address |
Permissions | Permission Type Array | Array of Permission Type (see below) |
Permission Type
Field Name | Data Type | Description |
---|---|---|
Permission | String | Must be "FullAccess" or "SendAs". |
Recipients
Operations:
Field Name | Data Type | Description |
---|---|---|
All | Boolean | |
Recipients | Recipient Array | Array of Recipient (see below). |
Recipient
Operations:
- New Resource Options Available Delegates Recipients, Available Permissions Recipients, Available Policy Recipients
- Existing Resource Options Available Delegates Recipients, Available Permissions Recipients, Available Policy Recipients
Field Name | Data Type | Description |
---|---|---|
Value | String | Email Address |
Action | String | Must be "Add" or "Remove". Only valid for PUT requests. |
List
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/ |
Description | Use this to list resource mailboxes, supports exporting, supports exporting. (see Listings) |
Model | Exchange Resource Listing |
HTTP Codes
Code | Condition |
---|---|
200 OK | The listing was successfully retrieved. |
400 Bad Request | The request was invalid. Inspect the validationFault response for more detail. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFondFault for more detail. |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources Response: 200 OK { "ResourceMailboxes": [ { "Type": "Room", "PhoneNumber": "1234567890", "Upn": "room.101@example.com", "ResourceCapacity": 25, "CustomProperties": [ { "Value": "Videoconferencing", "ExchangeAction": 0 }, { "Value": "Whiteboard", "ExchangeAction": 0 } ], "CommonName": "room.101", "DisplayName": "Room 101", "Alias": "room.101.example.com", "IsHiddenFromAddressList": false, "PrimarySmtpAddress": null, "EmailAddresses": null, "Status": "Ready", "LegacyExchangeDn": "/o=e14s/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=room.101b5c" }, { "Type": "Room", "PhoneNumber": "1234567890", "Upn": "room.102@example.com", "ResourceCapacity": 25, "CustomProperties": [ { "Value": "Videoconferencing", "ExchangeAction": 0 }, { "Value": "Whiteboard", "ExchangeAction": 0 } ], "CommonName": "room.102", "DisplayName": "Room 101", "Alias": "room.102.example.com", "IsHiddenFromAddressList": false, "PrimarySmtpAddress": null, "EmailAddresses": null, "Status": "Ready", "LegacyExchangeDn": "/o=e14s/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=room.1029fd" }, { "Type": "Room", "PhoneNumber": "1234567890", "Upn": "room.103@example.com", "ResourceCapacity": 25, "CustomProperties": [ { "Value": "Videoconferencing", "ExchangeAction": 0 }, { "Value": "Whiteboard", "ExchangeAction": 0 } ], "CommonName": "room.103", "DisplayName": "Room 103", "Alias": "room.103.example.com", "IsHiddenFromAddressList": false, "PrimarySmtpAddress": null, "EmailAddresses": null, "Status": "Ready", "LegacyExchangeDn": "/o=e14s/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=room.10370c" } ], "Sort": "cn", "Limit": 50, "Total": 3, "Order": "asc" }
Resource
POSTS, PUTS, and DELETES support Asynchronous Statuses and Asynchronous Errors.
Create
Verb | POST |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/ |
Description | Use this route to add a new resource mailbox. |
Model | Exchange Resource |
HTTP Codes
Code | Condition |
---|---|
204 No Content | The request has been accepted and will be processed. |
400 Bad Request | The request was invalid. Inspect the validationFault response for more detail. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFondFault for more detail. |
Request: POST https://api.emailsrvr.com/v1/domains/example.com/ex/resources { "CommonName": "room.101", "Type": "Room", "DisplayName": "Room 101", "PhoneNumber": "1234567890", "ResourceCapacity": 25, "CustomProperties": [ { "Value": "Videoconferencing" }, { "Value": "Whiteboard" } ], "CalendarProcessing": { "AutoBooking": "AutoUpdate", "BookingWindowInDays": 90, "EnforceSchedulingHorizon": false, "AllowConflicts": true, "AllowRecurringMeetings": false, "ScheduleOnlyDuringWorkHours": true, "MaximumDurationInMinutes": 720, "MaximumConflictInstances": 1, "ConflictPercentageAllowed": 50, "AdditionalResponse": { "Enable": true, "Value": "This is an additional response" } }, "Delegates": [ { "Value": "user1" }, { "Value": "user2" }, { "Value": "user3" } ], "Permissions": [ { "Recipient": "user5", "Types": [ "FullAccess" ] }, { "Recipient": "user6", "Types": [ "SendAs" ] }, { "Recipient": "user7", "Types": [ "FullAccess", "SendAs" ] } ], "BookInPolicy": { "Recipients": [ { "Value": "user1" }, { "Value": "user2" } ] }, "RequestInPolicy": { "Recipients": [ { "Value": "user4" }, { "Value": "user5" } ] }, "RequestOutOfPolicy": { "AllUsers": true } } Response: 204 No Content
Read
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name) |
Description | Use this route to read an existing resource mailbox. |
Model | Exchange Resource * |
* Note: The Exchange Resource resource contains some paged data that must be accessed via separate GET requests. Properties directly on the object and CustomProperties, can be accessed via a GET on the base resource.
HTTP Codes
Code | Condition |
---|---|
200 OK | The resource was successfully retrieved. |
400 Bad Request | The request was invalid. Inspect the validationFault response for more detail. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFondFault for more detail. |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.1 Response: 200 OK { "Type": "Room", "PhoneNumber": "1234567890", "Upn": "room.101@example.com", "ResourceCapacity": 25, "CustomProperties": [ { "Value": "Videoconferencing", "ExchangeAction": 0 }, { "Value": "Whiteboard", "ExchangeAction": 0 } ], "CommonName": "room.101", "DisplayName": "Room 101", "Alias": "room.101.example.com", "IsHiddenFromAddressList": false, "PrimarySmtpAddress": null, "EmailAddresses": null, "Status": "Ready", "LegacyExchangeDn": "/o=e14s/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=room.1019d4" }
Update
Verb | PUT |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name) |
Description | Use this route to update an existing resource mailbox. |
Model | Exchange Resource |
HTTP Codes
Code | Condition |
---|---|
204 No Content | The request has been accepted and will be processed. |
400 Bad Request | The request was invalid. Inspect the validationFault response for more detail. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFondFault for more detail. |
All data that is part of the Exchange Resource resource can be updated in a single PUT request. CustomProperties, Delegates, and policies must specify an Action, set to either Add or Remove, to specify the operation for that value. Permissions must be specified in whole. For example, resource1@example.com has user5/tt>'s permission types set to <tt>FullAccess. To add SendAs, the request must contain both FullAccess and SendAs for that user. To remove all permissions from user7, the request must contain an empty Type array for that user.
Request: PUT https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.101 { "Type": "Room", "DisplayName": "Conference Room 101", "PhoneNumber": "try shouting", "ResourceCapacity": "30", "CustomProperties": [ { "Value": "Whiteboard", "Action": "Remove" } ], "CalendarProcessing": { "AutoBooking": "AutoUpdate", "BookingWindowInDays": 180, "EnforceSchedulingHorizon": true, "AllowConflicts": false, "AllowRecurringMeetings": true, "ScheduleOnlyDuringWorkHours": false, "MaximumDurationInMinutes": 1440, "MaximumConflictInstances": 0, "ConflictPercentageAllowed": 0, "AdditionalResponse": { "Enable": false } }, "Delegates": [ { "Value": "user3", "Action": "Remove" }, { "Value": "user4", "Action": "Add" } ], "Permissions": [ { "Recipient": "user5", "Types": [ "FullAccess", "SendAs" ] }, { "Recipient": "user7", "Types": [] }, { "Recipient": "user8", "Types": [ "FullAccess" ] } ], "BookInPolicy": { "Recipients": [ { "Value": "user2", "Action": "Remove" }, { "Value": "user3", "Action": "Add" } ] }, "RequestInPolicy": { "AllUsers": true }, "RequestOutOfPolicy": { "AllUsers": false, "Recipients": [ { "Value": "user7", "Action": "Add" }, { "Value": "user8", "Action": "Add" } ] } } Response: 204 No Content
Delete
Verb | DELETE |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name) |
Description | Use this route to delete a resource mailbox. |
Model | None |
HTTP Codes
Code | Condition |
---|---|
204 No Content | The request has been accepted and will be processed. |
400 Bad Request | The request was invalid. Inspect the validationFault response for more detail. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFondFault for more detail. |
Request: DELETE https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.101 Response: 204 No Content
Export
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources?exportTo={your email address} |
Description | Use this route to export a file of resource mailboxes. |
Model | Exchange Resource Listing |
HTTP Codes
Code | Condition |
---|---|
202 Accepted | The request has been accepted and will be processed. |
400 Bad Request | The request was invalid. Inspect the validationFault response for more detail. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFoundFault for more detail. |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources?exportTo=myAdminEmail@example.com Response: 202 Accepted
Import
Verb | POST |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources?emailAddress={your email address} |
Description | Use this route to import a file of resource mailboxes. |
Model | FileUrl (string), OverrideExisting (boolean) |
HTTP Codes
Code | Condition |
---|---|
202 Accepted | The request has been accepted and will be processed. |
400 Bad Request | The request was invalid. Inspect the validationFault response for more detail. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFoundFault for more detail. |
Instructions:
1. Create a CSV (comma-separated values) file containing the resource mailboxes you'd like to import. You can get a valid CSV file format by bulk-exporting your current resource mailboxes.
2. Upload the file to a public accessible URL (e.g. cloud-files, CDN, etc.)
3. Call this endpoint with the url of the file in the body.
4. The OverrideExisting field is optional and defaults to false. When true, any existing resource mailboxes will be modified to match the CSV file, including the removal of assets, permissions and delegates.
- NOTE: The Capacity and PhoneNumber fields will be cleared out if left blank when OverrideExisting is true or false.
5. You will receive a confirmation email to the address specified in the URL when the import is complete. Any rows that were not able to be imported are available via a link provided in the confirmation email.
Request: POST https://api.emailsrvr.com/v1/domains/example.com/ex/resources?emailAddress=myAdminEmail@example.com { "FileUrl": "http://asdfasdfzxcvzxcvasdfasdf.cf1.rackcdn.com/MyResourceMailboxes.csv", "OverrideExisting": false } Response: 202 Accepted
Calendar Processing
Read
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name)/calendarProcessing |
Description | Use this route to read an existing resource mailbox's calendar processing data. |
Model | Calendar Processing |
HTTP Codes
Code | Condition |
---|---|
200 OK | The data was successfully retrieved. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the resource was not found. Inspect the itemNotFondFault for more detail. |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.101/calendarProcessing Response: 200 OK { "AutoBooking": "AutoUpdate", "BookingWindowInDays": 90, "EnforceSchedulingHorizon": false, "AllowConflicts": true, "AllowRecurringMeetings": false, "ScheduleOnlyDuringWorkHours": true, "MaximumDurationInMinutes": 720, "MaximumConflictInstances": 1, "ConflictPercentageAllowed": 50, "AdditionalResponse": { "Enable": true, "Value": "This is an additional response" } }
Delegates
List
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name)/delegates |
Description | Use this route to list an existing resource mailbox's delegates data. (see Listings) |
Model | Delegates Listing |
HTTP Codes
Code | Condition |
---|---|
200 OK | The data was successfully retrieved. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the resource was not found. Inspect the itemNotFondFault for more detail. |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.101/delegates Response: 200 OK { "Delegates": [ { "Value": "user1" }, { "Value": "user2" }, { "Value": "user3" } ], "Limit": 50, "Total": 3, "Order": "asc" }
Permissions
List
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name)/permissions |
Description | Use this route to list an existing resource mailbox's permissions data. (see Listings) |
Model | Permission Listing |
HTTP Codes
Code | Condition |
---|---|
200 OK | The data was successfully retrieved. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the resource was not found. Inspect the itemNotFondFault for more detail. |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.101/permissions Response: 200 OK { "Permissions": [ { "Recipient": "user5", "Types": [ "FullAccess" ] }, { "Recipient": "user6", "Types": [ "SendAs" ] }, { "Recipient": "user7", "Types": [ "FullAccess", "SendAs" ] } ], "Limit": 50, "Total": 3, "Order": "asc" }
Policies
BookIn, RequestIn, and RequestOutOf policies can all be accessed via the resource's URL followed by /bookInPolicy, /requestInPolicy, and /requestOutOfPolicy, respectively. Examples in this section will use BookInPolicy, but the interface for the three is all the same.
List
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name)/bookInPolicy
/v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name)/requestInPolicy /v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name)/requestOutOfPolicy |
Description | Use this route to list an existing resource mailbox's policies data. (see Listings) |
Model | Recipient Listing |
HTTP Codes
Code | Condition |
---|---|
200 OK | The data was successfully retrieved. |
404 Not Found | The domain does not exist, the domain does not have Exchange, or the resource was not found. Inspect the itemNotFondFault for more detail. |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.101/bookInPolicy Response: { "Recipients": [ { "Value": "user1" }, { "Value": "user2" } ], "AllUsers":false, "Limit": 50, "Total": 2, "Order": "asc" }
New Resource Options
https://api.emailsrvr.com/v1/domains/(domain)/ex/resourceOptions/ is the base URL for getting complete sets of valid data that can be submitted as part of an Exchange Resource add operation.
Available Delegates Recipients
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/resourceOptions/AvailableDelegatesRecipients |
Description | Use this route to list recipients that can be delegates for a new resource on a given domain. |
Model | Recipient Listing |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resourceOptions/AvailableDelegatesRecipients Response: 200 OK { "Recipients": [ { "Value": "user1" }, { "Value": "user10" }, { "Value": "user2" }, { "Value": "user3" }, { "Value": "user4" }, { "Value": "user5" }, { "Value": "user6" }, { "Value": "user7" }, { "Value": "user8" }, { "Value": "user9" } ], "Limit": 50, "Total": 10, "Order": "asc" }
Available Permissions Recipients
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/resourceOptions/AvailablePermissionsRecipients |
Description | Use this route to list recipients that can have permissions for a new resource on a given domain. |
Model | Recipient Listing |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resourceOptions/AvailablePermissionsRecipients Response: { "Recipients": [ { "Value": "user1" }, { "Value": "user10" }, { "Value": "user2" }, { "Value": "user3" }, { "Value": "user4" }, { "Value": "user5" }, { "Value": "user6" }, { "Value": "user7" }, { "Value": "user8" }, { "Value": "user9" } ], "Limit": 50, "Total": 10, "Order": "asc" }
Available Policy Recipients
Available BookIn, RequestIn, and RequestOutOf policy recipients can all be accessed via the resourceOptions URL followed by /availableBookInPolicyRecipients, /availableRequestInPolicyRecipients, and /availableRequestOutOfRecipients, respectively. The example in this section will use BookInPolicy, but the interface for the three is all the same.
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/resourceOptions/availableBookInPolicyRecipients
/v1/customers/{customer account number}/domains/{domain name}/ex/resources/resourceOptions/availableRequestInPolicyRecipients /v1/customers/{customer account number}/domains/{domain name}/ex/resources/resourceOptions/availableRequestOutOfRecipients |
Description | Use this route to list recipients that can be in policies for a new resource on a given domain. |
Model | Recipient Listing |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resourceOptions/availableBookInPolicyRecipients Response: 200 OK { "Recipients": [ { "Value": "user1" }, { "Value": "user10" }, { "Value": "user2" }, { "Value": "user3" }, { "Value": "user4" }, { "Value": "user5" }, { "Value": "user6" }, { "Value": "user7" }, { "Value": "user8" }, { "Value": "user9" } ], "Limit": 50, "Total": 10, "Order": "asc" }
Existing Resource Options
https://api.emailsrvr.com/v1/domains/(domain)/ex/resource/(common name)/options is the base URL for getting complete sets of valid data that can be submitted as part of an Exchange Resource edit operation.
Available Delegates Recipients
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/resources/(common name)/AvailableDelegatesRecipients |
Description | Use this route to list recipients that can be delegates for an existing resource |
Model | Recipient Listing |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.101/options/AvailableDelegatesRecipients Response: 200 OK { "Recipients": [ { "Value": "user10" }, { "Value": "user4" }, { "Value": "user5" }, { "Value": "user6" }, { "Value": "user7" }, { "Value": "user8" }, { "Value": "user9" } ], "Limit": 50, "Total": 7, "Order": "asc" }
Available Permissions Recipients
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/(common name)/AvailablePermissionsRecipients |
Description | Use this route to list recipients that can have permissions for an existing resource |
Model | Recipient Listing |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.101/options/AvailablePermissionsRecipients Response: { "Recipients": [ { "Value": "user1" }, { "Value": "user10" }, { "Value": "user2" }, { "Value": "user3" }, { "Value": "user4" }, { "Value": "user8" }, { "Value": "user9" } ], "Limit": 50, "Total": 7, "Order": "asc" }
Available Policy Recipients
Available BookIn, RequestIn, and RequestOutOf policy recipients for an existing resource can all be accessed via the resource's URL followed by /availableBookInPolicyRecipients, /availableRequestInPolicyRecipients, and /availableRequestOutOfRecipients, respectively. The example in this section will use BookInPolicy, but the interface for the three is all the same.
Verb | GET |
---|---|
URL Format | /v1/customers/{customer account number}/domains/{domain name}/ex/resources/resources/(common name)/availableBookInPolicyRecipients
/v1/customers/{customer account number}/domains/{domain name}/ex/resources/resources/(common name)/availableBookInPolicyRecipients /v1/customers/{customer account number}/domains/{domain name}/ex/resources/resources/(common name)/availableBookInPolicyRecipients |
Description | Use this route to list recipients that can be in policies for an existing resource |
Model | Recipient Listing |
Request: GET https://api.emailsrvr.com/v1/domains/example.com/ex/resources/room.101/options/availableBookInPolicyRecipients Response: 200 OK { "Recipients": [ { "Value": "user10" }, { "Value": "user3" }, { "Value": "user4" }, { "Value": "user5" }, { "Value": "user6" }, { "Value": "user7" }, { "Value": "user8" }, { "Value": "user9" } ], "Limit": 50, "Total": 8, "Order": "asc" }