This is an archive version of the document. To get the most up-to-date information, see the current version.

(POST) /RestoreSessions/{restoreSessionId}/Organization/Mailboxes/{mailboxId}/Action

In this article

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

    Request

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

    HTTPS Request

    POST https://<Backup-Office365>:4443/v3/RestoreSessions/{restoreSessionId}/Organization/Mailboxes/{mailboxId}/Action

    Request Headers

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

    Request Body

    Export to PST

    (POST) /RestoreSessions/{restoreSessionId}/Organization/Mailboxes/{mailboxId}/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 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 data.

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

    For example:

    {

     "exporttoPst":

     {"contentKeywords": "support"

     }

    }

    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.

    (POST) /RestoreSessions/{restoreSessionId}/Organization/Mailboxes/{mailboxId}/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 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.

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

    Mailbox

    string

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

    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": "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 items will be restored.

    For example, "changedItems": "true".

    DeletedItems

    bool

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

    For example, "deletedItems": "true".

    MarkRestored
    AsUnread

    bool

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

    For example, "markRestoredAsUnread": "false".

    ExcludeDrafts

    bool

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

    For example, "excludeDrafts": "false".

    Exclude
    DeletedItems

    bool

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

    For example, "excludeDeletedItems": "false".

    Exclude
    InPlaceHoldItems

    bool

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

    For example, "excludeInPlaceHoldItems": "true".

    Exclude
    LitigationHoldItems

    bool

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

    For example, "excludeLitigationHoldItems": "true".

    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 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 data containing "support" keyword to a PST file.

    Request:

    POST https://support.east.local:4443/v3/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"

     }

    }

     

    Response:

    200 OK

    Example 2

    The following request restores backed up organization's mailbox data to the same production Exchange server.

    Request:

    POST https://support.east.local:4443/v3/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://support.east.local:4443/v3/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

    I want to report a typo

    There is a misspelling right here:

     

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