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

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

Exports and restores backed up data from the organization's mailbox folder.

Request

To restore or export the backed up data from the organization's mailbox folder, send the POST HTTPS request to the URL of the /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Folders/{ID}/Action resource.

HTTPS Request

POST https://<Backup-Office365>:4443/v2/RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Folders/{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}/Folders/{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 backed up data from the organization's mailbox folder 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 folder data.

For example, "сontentKeywords": "support".

For example:

{

 "exporttoPst":

 {"contentKeywords": "<string>"

 }

}

The request command will look for a specified keyword in data inside the organization's mailbox folder. The backed up data with a 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 read, convert to PST or perform other actions with the octet-stream, use features of programming languages.

(POST) /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Folders/{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 backed up data from the organization's mailbox folder 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 backed up data from the mailbox folder to a different mailbox on the production Exchange server, the request body must contain the restoreTo action properties:

Property

Type

Description

CasServer

string

Specifies the Microsoft Exchange server with Client Access Server (CAS) role. The mailbox data will be restored to a specified mailbox server.

For example, "casServer": "outlook.office365.com".

Mailbox

string

Specifies the email address of the mailbox to which you want to restore mailbox folder data.

For example, "mailbox": "djohnes@northsupport.onmicrosoft.com".

Folder

string

Specifies the folder to which you want to restore mailbox folder data.

For example, "folder": "Contacts".

UserName

string

Specifies the user name you want to use for authenticating with the Exchange organization.

For example, "userName": "djohnes@northsupport.onmicrosoft.com".

UserPassword

string

Specifies the user name you want to use for authenticating with the Exchange organization.

For example, "userPassword": "paSSw0rd".

ChangedItems

bool

If set to True, indicates that all versions of mailbox folder items will be restored.

For example, "changedItems": "true".

DeletedItems

bool

If set to True, indicates that deleted mailbox folder items will be restored.

For example, "deletedItems": "true".

MarkRestored
AsUnread

bool

If set to True, indicates that restored mailbox folder data will be marked as unread.

For example, "markRestoredAsUnread": "false".

For example:

{

 "restoreTo":

 {"casServer": "outlook.office365.com",

  "mailbox": "djohnes@northsupport.onmicrosoft.com",

  "folder": "Contacts",

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

  "userPassword": "paSSw0rd",

  "changedItems": "true",

  "deletedItems": "false",

  "markRestoredAsUnread": "true"

 }

}

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 action: application/octet-stream.

The media type and syntax of the request body message for the requests with the restore actions: null.

Response Body

None.

Example 1

The following request exports backed up organization's mailbox folder data containing "support" keyword 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/Folders/AAAAAKGE4dIvQUtGjuSnq8JTHAgBAPliTMf_6DxPiJ6TGYB9CqAAAAAAAQ4AAA==/Action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

 

{

 "exporttoPst":

 {"contentKeywords": "support"

 }

}

 

Response:

200 OK

Example 2

The following request restores backed up organization's mailbox folder data 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/Folders/AAAAAKGE4dIvQUtGjuSnq8JTHAgBAPliTMf_6DxPiJ6TGYB9CqAAAAAAAQ4AAA==/Action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

 

{

"restoretoOriginallocation":

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

  "userPassword": "paSSw0rd"

 }

}

 

Response:

200 OK

Example 3

The following request restores all versions of organization's mailbox folder data 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/Folders/AAAAAKGE4dIvQUtGjuSnq8JTHAgBAPliTMf_6DxPiJ6TGYB9CqAAAAAAAQ4AAA==/Action

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

 

{

 "restoreTo":

 {"casServer": "outlook.office365.com",

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

  "folder": "Contacts",

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

  "userPassword": "paSSw0rd",

  "changedItems": "true",

  "deletedItems": "false",

  "markRestoredAsUnread": "true"

 }

}

 

Response:

200 OK

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference