Exports, restores, sends and saves backed up items from the Exchange organization's mailbox.
Request
To perform restore operations with backed up mailbox items, send the POST HTTPS request to the URL of the /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Items/Action resource.
HTTPS Request
POST https://<Backup-Office365>:4443/v1/RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Items/Action |
Request Headers
The request header must contain the authorization token for the current logon session.
Request Body
Export to PST
|
To export Veeam Backup for Microsoft Office 365 entities to PST files (Personal Folder Files), you must have a 64-bit version of Microsoft Outlook 2016, Microsoft Outlook 2013 or Microsoft Outlook 2010 installed on the computer running restore sessions. |
To export the backed up items from the organization's mailbox to a PST file (Personal Folder File), the request body must contain the exporttoPst action property:
Property | Type | Description |
ContentKeywords | string | Specifies the keyword to query backed up mailbox items. For example, "сontentKeywords": "support". |
For example:
{ "exporttoPst": {"contentKeywords": "support" } } |
The request command will look for the specified keyword in item names and fields inside the organization's mailbox. The backed up data with the specified keyword then will be exported to a PST file and placed to a temporary folder on the Veeam Backup for Microsoft Office 365 server. After that, the PST file will be transferred as application/octet-stream media to the client. To download, read, convert to PST or perform other actions with the octet-stream, use features of programming languages.
|
You can use Swagger UI to download the octet-stream file by clicking the Download action link, which server returns in the response body after a successfully completed export operation. |
Restore to the same mailbox
To restore backed up items to the same mailbox on the production Exchange server, the request body must contain the restoretoOriginallocation action properties:
Property | Type | Description |
UserName | string | Specifies the user name you want to use for authenticating with the Exchange organization. For example, "userName": "jsmith@westsupport.onmicrosoft.com". |
UserPassword | string | Specifies the user name you want to use for authenticating with the Exchange organization. For example, "userPassword": "paSSw0rd". |
Items | Items | Specifies the IDs of mailbox items that you want to restore. If you omit this parameter, all backed up items will be restored to the same mailbox on the production Exchange server. For example, ["items": {"Id": "74685f6b-16aa-4a78-a44f-05526ce0ae30"}, {"Id": "70013a9e-c446-429d-aa78-9c8c20d9b814"} ]. |
For example:
{ "restoretoOriginallocation": {"userName": "jsmith@westsupport.onmicrosoft.com", "userPassword": "paSSw0rd" "items": [ {"Id": "74685f6b-16aa-4a78-a44f-05526ce0ae30"}, {"Id": "70013a9e-c446-429d-aa78-9c8c20d9b814"} ] } } |
Restore to a different mailbox
To restore backed up items to a different mailbox on the production server, the request body must contain the restoreTo action properties:
Property | Type | Description |
Mailbox | string | Specifies the e-mail address of the mailbox to which you want to restore mailbox items. For example, "mailbox": "djohnes@northsupport.onmicrosoft.com". |
UserName | string | Specifies the user name you want to use for authenticating with the Exchange organization. For example, "userName": "jsmith@westsupport.onmicrosoft.com". |
UserPassword | string | Specifies the user name you want to use for authenticating with the Exchange organization. For example, "userPassword": "paSSw0rd". |
For example:
{ "restoreTo": {"mailbox": "johnsmith@westsupport.onmicrosoft.com", "userName": "jsmith@westsupport.onmicrosoft.com", "userPassword": "paSSw0rd" } } |
Send to the same mailbox
To send backed up items as attachments in an e-mail message to the same mailbox, the request body must contain the sendtoDefaultaddress action:
{ "sendtoDefaultaddress": null } |
|
To be able to send items as attachments you must specify the VEX e-mail settings by sending PUT HTTPS request to the /VEXEmailSettings URL. For more information, see (PUT) /VEXEmailSettings. |
Send to a different mailbox
To send backed up items as attachments in an e-mail message to a different mailbox, the request body must contain the sendtoDifferentaddress action properties:
Property | Type | Description |
From | string | Specifies the e-mail address from which the restored mailbox items will be sent. For example, "from": "j_smith@bestsupport.onmicrosoft.com". |
To | string | Specifies the e-mail address to which the restored mailbox items will be sent. For example, "to": "r.clark@bestsupport.onmicrosoft.com". |
Subject | string | Specifies the subject of the e-mail message used for sending restored mailbox items. For example, "subject": "Support Tickets". |
Text | string | Specifies the body of the e-mail message used for sending restored mailbox items. For example, "text": "Please find attached the files you requested". |
For example:
{ "sendtoDifferentaddress": {"from": "j_smith@bestsupport.onmicrosoft.com", "to": "r.clark@bestsupport.onmicrosoft.com", "subject": "Support Tickets", "text": "Please find attached the files you requested" } } |
|
If you omit the From property, the default "from" e-mail address specified in VEX e-mail settings will be used. To specify VEX e-mail settings, send PUT HTTPS request to the /VEXEmailSettings URL. For more information, see (PUT) /VEXEmailSettings. |
Save as MSG
To save backed up organization's mailbox items to MSG files (Outlook Message Files), the request body must contain the savetoMsg action property:
Property | Type | Description |
ContentKeywords | string | Specifies the keyword to query backed up mailbox items. For example, "сontentKeywords": "support". |
For example:
{ "savetoMsg": {"contentKeywords": "support" } } |
The request command will look for the specified keyword in item fields inside the organization's mailbox. After that the backed up items with the specified keywords will be saved to MSG files and transferred to application/octet-stream media. You can use Swagger UI to download the mailbox items in MSG format from the stream by clicking the "Download action" link in the response body.
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns response code 200 OK.
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
Content-length | The length of the response body. |
Content-type | The media type and syntax of the request body message for the requests with the export and save actions: application/octet-stream. The media type and syntax of the request body message for the requests with the restore and send actions: null. |
Response Body
None.
Example 1
The following request exports backed up mailbox items containing "support" keyword to a PST file.
Request: POST https://support.east.local:4443/v1/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/Action
Request Header: Authorization: Bearer <Access-Token>
Request Body:
{ "exporttoPst": {"contentKeywords": "support" } }
Response: 200 OK |
Example 2
The following request saves backed up mailbox items containing "support" keyword to MSG files.
Request: POST https://support.east.local:4443/v1/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/Action
Request Header: Authorization: Bearer <Access-Token>
Request Body:
{ "savetoMsg": {"contentKeywords": "support" } }
Response: 200 OK |
Example 3
The following request restores backed up mailbox items to the same mailbox on the production server.
Request: POST https://support.east.local:4443/v1/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/Action
Request Header: Authorization: Bearer <Access-Token>
Request Body:
{ "restoretoOriginallocation": {"userName": "jsmith@westsupport.onmicrosoft.com", "userPassword": "paSSw0rd" } }
Response: 200 OK |
Example 4
The following request restores backed up mailbox items to a different mailbox on the production server.
Request: POST https://support.east.local:4443/v1/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/Action Request Header: Authorization: Bearer <Access-Token>
Request Body:
{ "restoreTo": {"userPassword": "Pa$$w0rd", "userName": "administrator@westsupport.onmicrosoft.com", "mailbox": "djohnes@westsupport.onmicrosoft.com", } }
Response: 200 OK |
Example 5
The following request sends restored mailbox items as attachments in the e-mail message to the same mailbox.
Request: POST https://support.east.local:4443/v1/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/Action
Request Header: Authorization: Bearer <Access-Token>
Request Body:
{ "sendtoDefaultaddress": null }
Response: 200 OK |
Example 6
The following request sends restored mailbox items as attachments in the e-mail message to a different mailbox.
Request: POST https://support.east.local:4443/v1/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/Action
Request Header: Authorization: Bearer <Access-Token>
Request Body:
{ "sendtoDifferentaddress": {"from": "j_smith@bestsupport.onmicrosoft.com", "to": "r.clark@bestsupport.onmicrosoft.com", "subject": "Support Tickets", "text": "Please find attached the files you requested" } }
Response: 200 OK |