Restoring SharePoint Lists to Original Location
You can restore a backed-up SharePoint list with the specified ID to the original location.
Request
POST https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Lists/{listId}/restore |
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. |
listId | string | Specifies the identification number of the SharePoint list. For more information on how to get this parameter, see Getting SharePoint Lists. |
Request Body
To restore a SharePoint list, the request body must contain the following properties:
Property | Type | Description |
---|---|---|
username | string | Specifies the user name that you want to use for authenticating to the organization. |
userpassword | string | Specifies the password of the user account that you want to use for authenticating to the organization. |
list | string | Specifies the target SharePoint list. |
changedItems | boolean | If set to true, indicates that the SharePoint list will be restored with all changed items. |
deletedItems | boolean | If set to true, indicates that the SharePoint list will be restored with all deleted items. |
restorePermissions | boolean | If set to true, indicates that the SharePoint documents will be restored with the backed-up permissions. |
sendSharedLinksNotification | boolean | If set to true, indicates that shared links notifications will be sent. |
restoreListViews | boolean | If set to true, indicates that the SharePoint lists will be restored with all list views. |
documentVersion | documentVersion | Specifies which of the following versions of the SharePoint documents will be restored:
|
documentLastVersionAction | documentLastVersionAction | Specifies which of the following actions will be performed with the last version of the restored SharePoint document:
|
For example:
Request Body: { "username": "admin@abcsupport.onmicrosoft.com", "userpassword": "paSSw0rd", "list": "support_north", "changedItems": true, "deletedItems": true, "restorePermissions": true, "restoreListViews": true "documentVersion": "last", "documentLastVersionAction": "merge" } |
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
In the response body, the server returns information about operation results.
Example
The example shows how to restore a backed-up SharePoint list.
Request: POST https://abc.tech.local:4443/v6/RestoreSessions/742fe5ac-3ea6-422b-b204-757b15a47e56/Organization/Sites/37ceec3f-565e-4ee0-9913-221c701d574401a462f8-4a26-4360-9296-04f489c34444/Lists/37ceec3f-565e-4ee0-9913-221c701d574401a462f8-4a26-4360-9296-04f489c34444d0bf1b2f-be66-4982-ba88-a31a49f61a3a/restore
Request Header: Authorization: Bearer <Access-Token>
Request Body: { "list" : "someList", "restoreListViews" : true, "changedItems" : true, "deletedItems" : true, "username" : "admin", "userpassword" : "password", "restorePermissions" : true, "documentVersion" : "all" }
Response: 200 OK |