Restoring SharePoint Lists
Restores a backed-up SharePoint list with the specified ID.
Request
POST https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Lists/{listId}/Action |
Request Headers
The request header must contain an authorization token of the current session.
Request Body
To restore a SharePoint list, 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 organization. |
UserPassword | string | Specifies the user name you want to use for authenticating with 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:
{ "restoreTo": {"userName": "jsmith@westsupport.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 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
The following request restores SharePoint lists
Request: POST https://abc.tech.local:4443/v5/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/Action
Request Header: Authorization: Bearer <Access-Token>
Request Body: { "restoreTo" : { "List" : "someList", "RestoreListViews" : true, "ChangedItems" : true, "DeletedItems" : true, "username" : "admin", "userpassword" : "password", "RestorePermissions" : true, "DocumentVersion" : "All" } }
Response: 200 OK |