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

Restoring, Saving and Sending SharePoint Documents

Restores, sends and saves backed up SharePoint documents.

Request

POST https://<hostname>:4443/v4/RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Documents/Action

Request Headers

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

Request Body

Restore

To restore SharePoint documents, the request body must contain the restoreTo action properties:

Property

Type

Description

UserName

string

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

UserPassword

string

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

List

string

Specifies the target SharePoint list.

RestorePermissions

bool

If set to True, indicates that the SharePoint documents will be restored with all permissions.

DocumentVersion

DocumentVersion

Specifies, which of the following versions of the SharePoint documents will be restored:

  • all
  • last

DocumentLastVersionAction

DocumentLastVersionAction

Specifies, which one of the following actions will be performed with the last version of the restored SharePoint document on the destination server:

  • overwrite
  • merge

For example:

{

 "restoreTo":

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

  "userPassword": "paSSw0rd",

  "list": "list[TBD]",

  "restorePermissions": "true",

  "documentVersion": "last",

  "documentLastVersionAction": "overwrite"

 }

}

Send

To send SharePoint documents as attachments in an email message, the request body must contain the sendTo action:

Property

Type

Description

From

string

Specifies the email address from which documents will be sent.

To

string

Specifies the email address to which documents will be sent.

Subject

string

Specifies the subject of the email message used for sending documents.

Text

string

Specifies the body of the email message used for sending documents.

For example:

{

 "sendTo":

 {"from": "j_smith@bestsupport.onmicrosoft.com",

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

  "subject": "Support Ticket",

  "text": "Please find attached the files you requested"

 }

}

 

Restoring, Saving and Sending SharePoint Documents Note:

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

Save documents

To save SharePoint documents, the request body must contain the save action:

{

 "save": null

}

The request command will place documents to a temporary folder on the Veeam Backup for Microsoft Office 365 server. After that, documents will be transferred as application/octet-stream media to the client. To download, read or perform other actions with the octet-stream, use features of programming languages.

Restoring, Saving and Sending SharePoint Documents Tip:

You can use Swagger UI to download documents from the stream by clicking Download action link in the response body.

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 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 restores SharePoint documents.

Request:

POST https://abc.tech.local:4443/v4/RestoreSessions/0ba45909-ce2d-4457-9a41-c466c21cd1e3/Organization/Sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/Documents/Action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

 "restoreTo" :

 {

  "Documents" :

  [

   {

   "version": "2.0",

   "id": "1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88ddd91646d1-5b4a-468f-8d38-7c2eb3cd057248d332e5-c3f9-4373-9902-beac5510d46a",

   "name": "request.txt",

   "createdBy": "System Account",

   "creationTime": "2017-04-16T12:35:18",

   "modifiedBy": "System Account",

   "modificationTime": "2017-04-16T12:37:10",

   "_links": {

    "self": {

     "href": "https://support.north.local:4443/v4/restoresessions/0ba45909-ce2d-4457-9a41-c466c21cd1e3/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/documents/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88ddd91646d1-5b4a-468f-8d38-7c2eb3cd057248d332e5-c3f9-4373-9902-beac5510d46a"

    },

    "library": {

     "href": "https://support.north.local:4443/v4/restoresessions/0ba45909-ce2d-4457-9a41-c466c21cd1e3/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/libraries/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88ddd91646d1-5b4a-468f-8d38-7c2eb3cd0572"

    }

   }

  }

  ],

  "list" : "exampleList",

  "username" : "admin",

  "userpassword" : "password",

  "RestorePermissions" : true,

  "DocumentVersion" : "last",

  "DocumentLastVersionAction" : "Merge"

 }

}

 

Response:

200 OK

Example 2

The following request saves SharePoint documents.

Request:

POST https://abc.tech.local:4443/v4/RestoreSessions/0ba45909-ce2d-4457-9a41-c466c21cd1e3/Organization/Sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/Documents/Action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

  "save":{

     "Documents":[

        "Document_name_1",

        "Document_name_1"

     ]

  }

}

 

Response:

200 OK

Example 3

The following request sends SharePoint documents.

Request:

POST https://abc.tech.local:4443/v4/RestoreSessions/0ba45909-ce2d-4457-9a41-c466c21cd1e3/Organization/Sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/Documents/Action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

 "sendTo" :

 {

  "Documents" :

  [

   {

   "version": "2.0",

   "id": "1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88ddd91646d1-5b4a-468f-8d38-7c2eb3cd057248d332e5-c3f9-4373-9902-beac5510d46a",

   "name": "request.txt",

   "createdBy": "System Account",

   "creationTime": "2017-04-16T12:35:18",

   "modifiedBy": "System Account",

   "modificationTime": "2017-04-16T12:37:10",

   "_links": {

    "self": {

     "href": "https://support.north.local:4443/v4/restoresessions/0ba45909-ce2d-4457-9a41-c466c21cd1e3/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/documents/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88ddd91646d1-5b4a-468f-8d38-7c2eb3cd057248d332e5-c3f9-4373-9902-beac5510d46a"

    },

    "library": {

     "href": "https://support.north.local:4443/v4/restoresessions/0ba45909-ce2d-4457-9a41-c466c21cd1e3/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/libraries/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88ddd91646d1-5b4a-468f-8d38-7c2eb3cd0572"

    }

   }

  }

  ],"from": "j_smith@bestsupport.onmicrosoft.com",

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

  "subject": "Support Ticket",

  "text": "Please find attached the files you requested"

 }

}

 

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.