Help Center
Choose product document...
Veeam Backup for Microsoft Office 365 2.0
RESTful API Reference

(POST) /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Items/{ID}/Action

Exports, restores, sends and saves a backed up item from the organization's mailbox.

Request

To perform restore operations with a backed up mailbox item, send the POST HTTPS request to the URL of the /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Items/{ID}/Action resource.

HTTPS Request

POST https://<Backup-Office365>:4443/v2/RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Items/{ID}/Action

Request Headers

The request header must contain the authorization token for the current logon session.

Request Body

Export to PST

(POST) /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Items/{ID}/Action Important!

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 a backed up item from the organization's mailbox to a Personal Folder File (PST file), the request body must contain the exporttoPst action:

{

 "exporttoPst": null

}

The request command will export a backed up item to a PST file and place it 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.

(POST) /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Items/{ID}/Action Tip:

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 a backed up item 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".

For example:

{

"restoretoOriginallocation":

 {"userName": "jsmith@westsupport.onmicrosoft.com",

  "userPassword": "paSSw0rd"

 }

}

Restore to a different mailbox

To restore a backed up item to a different mailbox on the production Exchange server, the request body must contain the restoreTo action properties:

Property

Type

Description

Mailbox

string

Specifies the email address of the mailbox to which you want to restore a mailbox item.

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 a backed up item as attachment in an email message to the same production mailbox, the request body must contain the sendtoDefaultaddress action:

{

 "sendtoDefaultaddress": null

}

 

(POST) /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Items/{ID}/Action Note:

To be able to send items as attachments you must specify the VEX email settings by sending PUT HTTPS request to the /VEXEmailSettings URL. For more information, see (PUT) /VEXEmailSettings.

Send to a different mailbox

To send a backed up item as attachment in an email message to a different mailbox, the request body must contain the sendtoDifferentaddress action properties:

Property

Type

Description

From

string

Specifies the email address from which a restored mailbox item will be sent.

For example, "from": "j_smith@bestsupport.onmicrosoft.com".

To

string

Specifies the email address to which a restored mailbox item will be sent.

For example, "to": "r.clark@bestsupport.onmicrosoft.com".

Subject

string

Specifies the subject of the email message used for sending a restored mailbox item.

For example,  "subject": "Support Tickets".

Text

string

Specifies the body of the email message used for sending a restored mailbox item.

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"

 }

}

Save as MSG

To save a backed up item to an MSG file (Outlook Message File), the request body must contain the savetoMsg action:

{

 "savetoMsg": null

}

The request command will save the backed up item with a specified ID to an MSG file and transfer it to application/octet-stream media. You can use Swagger UI to download the mailbox item 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 a backed up item to a PST file.

Request:

POST https://support.east.local:4443/v2/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/{ID}/Action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

 

{

 "exporttoPst": null

}

 

Response:

200 OK

Example 2

The following request saves a backed up item to an MSG file.

Request:

POST https://support.east.local:4443/v2/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/{ID}/Action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

 

{

 "savetoMsg": null

}

 

Response:

200 OK

Example 3

The following request restores a backed up item to the same mailbox on the production Exchange server.

Request:

POST https://support.east.local:4443/v2/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/{ID}/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 a backed up item to a different mailbox on the production Exchange server.

Request:

POST https://support.east.local:4443/v2/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/{ID}/Action

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

 

{

 "restoreTo":

 {"mailbox": "djohnes@westsupport.onmicrosoft.com",

  "userName": "djohnes@westsupport.onmicrosoft.com",

  "userPassword": "paSSw0rd"

 }

}

 

Response:

200 OK

Example 5

The following request sends a restored organization's mailbox item as attachment in the email message to the same production mailbox.

Request:

POST https://support.east.local:4443/v2/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/{ID}/Action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

 

{

 "sendtoDefaultaddress": null

}

 

Response:

200 OK

Example 6

The following request sends a restored organization's mailbox item as attachment in the email message to a different production mailbox.

Request:

POST https://support.east.local:4443/v2/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Items/{ID}/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

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference