(POST) /RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Action
Restores backed up SharePoint site with a specified ID.
Request
To restore the backed up site from the SharePoint backup, send the POST HTTPS request to the URL of the /RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Action resource.
HTTPS Request
POST https://<Backup-Office365>:4443/v3/RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Action |
Request Headers
The request header must contain the authorization token for the current logon session.
Request Body
Restore
To restore backed up organization's SharePoint site to the destination server, 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. For example, "userName": "jsmith@westsupport.onmicrosoft.com". |
UserPassword | string | Specifies the user password you want to use for authenticating with the SharePoint organization. For example, "userPassword": "paSSw0rd". |
Alias | string | Specifies an alias for the restore destination. |
RestoreListViews | bool | If set to True, indicates that the SharePoint lists will be restored with all list views. For example, "restoreListViews": "true". |
ChangedItems | bool | If set to True, indicates that the SharePoint site will be restored with all changed items. For example, "changedItems": "true". |
DeletedItems | bool | If set to True, indicates that the SharePoint site will be restored with all deleted items. For example, "deletedItems": "true". |
RestoreSubsites | bool | If set to True, indicates that the SharePoint site will be restored with all subsites. For example, "restoreSubsites": "true". |
RestoreMasterPages | bool | If set to True, indicates that the SharePoint site will be restored with all master pages. For example, "restoreMasterPages": "true". |
RestorePermissions | bool | If set to True, indicates that the SharePoint site will be restored with all permissions. For example, "restorePermissions": "true". |
DocumentVersion | DocumentVersion | Specifies, which of the following versions of the SharePoint documents will be restored:
|
SendSharedLinksNotification | bool | If set to True, indicates that shared links notifications will be sent. For example, "sendSharedLinksNotification": "true" |
DocumentLastVersionAction | DocumentLastVersionAction | Specifies, which one of the following actions will be performed with the last version of the restored SharePoint document on the destination list:
|
For example:
{ "restoreTo" : { "username" : "admin", "userpassword" : "password", "RestorePermissions" : true, "DocumentVersion" : "last", "DocumentLastVersionAction" : "Merge" } } |
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
The following request restores backed up SharePoint site with a specified ID
Request: POST https://support.east.local:4443/v3/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/Organization/Sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/Action
Request Header: Authorization: Bearer <Access-Token>
Request Body: { "restoreTo" : { "username" : "admin", "userpassword" : "password", "RestorePermissions" : true, "DocumentVersion" : "last", "DocumentLastVersionAction" : "Merge" } }
Response: 200 OK |