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

Exporting and Restoring Mailbox Data

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

Request

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

Request Headers

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

Request Body

Export to PST

Exporting and Restoring Mailbox Data 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

 }

}

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

Exporting and Restoring Mailbox Data 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 Exchange server

To restore backed up organization's mailbox data to the same 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 Exchange server

To restore backed up organization's mailbox data to a different 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.

Mailboxes

string

Specifies the mailboxes you want to restore.

Office365UserName

string

Specifies the user name you want to use for authenticating with the Microsoft Office 365 organization.

Office365UserPassword

string

Specifies the password you want to use for authenticating with the Microsoft Office 365 organization.

OnPremUserName

string

Specifies the user name you want to use for authenticating with the on-premises organization.

OnPremUserPassword

string

Specifies the password you want to use for authenticating with the on-premises organization.

ChangedItems

bool

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

DeletedItems

bool

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

MarkRestoredAsUnread

bool

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

ExcludeDrafts

bool

If set to True, indicates that Drafts mailbox folder will not be restored.

ExcludeDeletedItems

bool

If set to True, indicates that Deleted Items mailbox folder will not be restored.

ExcludeInPlaceHoldItems

bool

If set to True, indicates that preserved items of mailboxes placed on In-Place Hold will not be restored.

ExcludeLitigationHoldItems

bool

If set to True, indicates that preserved items of mailboxes placed on Litigation Hold will not be restored.

RecentItemRestorePeriod

int

 

For example:

{

"restoreTo":

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

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

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

  "userPassword": "paSSw0rd",

  "changedItems": "true",

  "deletedItems": "true",

  "markRestoredAsUnread": "false",

  "excludeDrafts": "false",

  "excludeDeletedItems": "false",

  "excludeInPlaceHoldItems": "true",

  "excludeLitigationHoldItems": "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 response body message: application/json; charset=utf-8

Response Body

None.

Example 1

The following request exports backed up organization's mailbox 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/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 data to the same production Exchange server.

Request:

POST https://abc.tech.local:4443/v4/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/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 data to a different Exchange server.

Request:

POST https://abc.tech.local:4443/v4/RestoreSessions/380d7caf-6294-4a33-b50a-b8aeb13af58c/Organization/Mailboxes/9e9b7199-f547-467a-b580-9d283a75eaad/Action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

 

{

 "restoreTo":

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

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

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

  "userPassword": "p@s$w0rd",

  "changedItems": "true",

  "deletedItems": "false",

  "markRestoredAsUnread": "false",

  "excludeDrafts": "false",

  "excludeDeletedItems": "false",

  "excludeInPlaceHoldItems": "false",

  "excludeLitigationHoldItems": "false"

 }

}

 

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.