Restoring SharePoint Documents by Restore Operator

You can restore backed-up SharePoint documents using Restore Portal. For more information about Restore Portal, see the Data Restore Using Restore Portal section of the Veeam Backup for Microsoft 365 User Guide.

To restore data using Restore Portal, you must create a restore session for a restore operator. For more information, see Creating Restore Session for Restore Operator.

Request

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

Request Headers

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

Request Parameters

The following parameters must be specified in the URL of the request:

Parameter

Type

Description

restoreSessionId

string

Specifies the identification number of the restore session. For more information on how to get this parameter, see Getting Restore Sessions.

siteId

string

Specifies the identification number of the SharePoint site. For more information on how to get this parameter, see Getting Organization SharePoint Sites.

Request Body

To restore backed-up SharePoint documents using Restore Portal, the request body must contain the following properties:

Property

Type

Description

documentsRestoreConfigs

documentsRestoreConfigs[]

Specifies settings for document restore. For more information, see Document Restore Settings.

list

string

Specifies the target SharePoint list.

restorePermissions

boolean

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

sendSharedLinksNotification

boolean

If set to true, indicates that shared links notifications will be sent.

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

restoreChangedItems

boolean

If set to true, indicates that documents that changed in the target location will be restored.

restoreDeletedItems

boolean

If set to true, indicates that documents that were deleted in the target location will be restored.

reason

string

Specifies a reason for the restore operation.

Document Restore Settings

The request body must contain the following properties:

Property

Type

Description

document

document

Specifies ID the document that you want to restore. For more information on how to get such IDs, see Getting SharePoint Documents.

documentVersion

documentVersion

Specifies which of the following versions of the SharePoint document will be restored:

  • all
  • last

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 for the requests with the export and save actions: application/octet-stream.

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

Response Body

None.

Example

The example shows how to restore a SharePoint document using Restore Portal.

Request:

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

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

 "documentsRestoreConfigs": [

   {

     "document": {

       "id": "74685f6b-16aa-4a78-a44f-05526ce0ae30"

     },

     "documentVersion": "All"

   }

 ],

 "list" : "exampleList",

 "restorePermissions" : true,

 "documentVersion" : "last",

 "documentLastVersionAction" : "merge",

 "documentAction": "Overwrite",

 "restoreChangedItems": true,
 "restoreDeletedItems": true,

 "reason": "Restore of deleted document"

}

 

Response:

200 OK