Veeam Backup for Microsoft Office 365 4.0
RESTful API Reference
Related documents

Exporting and Restoring Data from Folders

This section explains how to export and restore backed up data from organization mailboxes.

Request

POST https://<hostname>:4443/v4/RestoreSessions/{restoreSessionId}/Organization/Mailboxes/{mailboxId}/Folders/{folderId}/Action

Request Headers

The request header must contain an authorization token of the current session.

Request Body

Export to PST

Exporting and Restoring Data from Folders Important!

To export data to .pst files, you must have a 64-bit version of Microsoft Outlook 2016, Microsoft Outlook 2013 or Microsoft Outlook 2010 installed on a computer running restore sessions.

To export backed up items from the organization mailbox to a Personal Folder File (PST), the request body must contain the exportToPst action.

Property

Type

Description

ContentKeywords

string

Sets the keyword to query backed-up mailbox data.

EnablePstSizeLimit

boolean

Defines whether to set the size limit for the exported .pst file.

If set to true, make sure to specify the PstSizeLimitBytes parameter.

PstSizeLimitBytes

integer

Sets the limit of the exported .pst file.

You can choose the limit range from 1GB to 49GB.

For example:

{

 "exportToPst": {

   "contentKeywords": "support",

   "EnablePstSizeLimit": true,

   "PstSizeLimitBytes": 1073741824

 }

}

Exporting and Restoring Data from Folders 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.

UserPassword

string

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

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.

Mailbox

string

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

Folder

string

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

UserName

string

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

UserPassword

string

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

ChangedItems

bool

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

DeletedItems

bool

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

MarkRestored
AsUnread

bool

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

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 a 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://abc.tech.local:4443/v4/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",

   "EnablePstSizeLimit": true,

   "PstSizeLimitBytes": 1073741824

 }

}

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://abc.tech.local:4443/v4/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://abc.tech.local:4443/v4/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

This Document Help Center
User GuideRESTful API ReferencePowerShell ReferenceVeeam Explorers User GuideVeeam Explorers PowerShell Reference
I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.