(POST) /RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Items/Action
Restores a collection of backed up SharePoint items.
Request
To perform actions with backed up SharePoint items, send the POST HTTPS request to the URL of the /RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Items/Action resource.
HTTPS Request
POST https://<Backup-Office365>:4443/v3/RestoreSessions/{restoreSessionId}/Organization/Sites/{siteId}/Items/Action |
Request Headers
The request header must contain the authorization token for the current logon session.
Request Body
Restore
To restore SharePoint items, 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. For example, "userName": "jsmith@westsupport.onmicrosoft.com". |
UserPassword | string | Specifies the user name you want to use for authenticating with the organization. For example, "userPassword": "paSSw0rd". |
List | string | Specifies the target SharePoint list. |
RestorePermissions | bool | If set to True, indicates that the SharePoint items will be restored with the backed up permissions. For example, "restorePermissions": "true". |
SendSharedLinksNotification | bool | If set to True, indicates that shared links notifications will be sent. For example, "sendSharedLinksNotification": "true" |
DocumentVersion | DocumentVersion | Specifies, which of the following versions of the SharePoint documents will be restored:
|
DocumentLastVersionAction | DocumentLastVersionAction | Specifies, which one of the following actions will be performed with the last versions of the restored SharePoint documents on the production server:
|
For example:
{ "restoreTo": {"userName": "jsmith@westsupport.onmicrosoft.com", "userPassword": "paSSw0rd", "list": "[TBD]", "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 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 exports backed up organization's mailbox data containing "support" keyword to a PST file.
Request: POST https://support.east.local:4443/v3/RestoreSessions/2cd23751-b5bc-4024-ac11-7277953945a9/Organization/Sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/Items/Action
Request Header: Authorization: Bearer <Access-Token>
Request Body: { "restoreTo" : { "items" : [ { "title": "Item1", "version": "5.0", "id": "1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dde42b25e5-5456-4e9f-91df-da6ea376840aee89936c-dd81-4678-9cb2-1b9d5573d28f", "name": "1_.000", "createdBy": "System Account", "creationTime": "2017-05-28T11:49:40", "modifiedBy": "System Account", "modificationTime": "2017-05-28T11:55:55", "_links": { "self": { "href": "https://support.north.local:4443/v3/restoresessions/2cd23751-b5bc-4024-ac11-7277953945a9/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/items/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dde42b25e5-5456-4e9f-91df-da6ea376840aee89936c-dd81-4678-9cb2-1b9d5573d28f" }, "list": { "href": "https://support.north.local:4443/v3/restoresessions/2cd23751-b5bc-4024-ac11-7277953945a9/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/lists/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dde42b25e5-5456-4e9f-91df-da6ea376840a" }, "attachments": { "href": "https://support.north.local:4443/v3/restoresessions/2cd23751-b5bc-4024-ac11-7277953945a9/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/items/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dde42b25e5-5456-4e9f-91df-da6ea376840aee89936c-dd81-4678-9cb2-1b9d5573d28f/attachments" } } }, { "title": "vdfvdfv", "version": "5.0", "id": "1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd70467886-6ecc-4db7-be25-d715e4dad14d741ae524-0aa6-4d4f-952a-df269480f1fa", "name": "22_.000", "createdBy": "System Account", "creationTime": "2017-04-23T13:53:35", "modifiedBy": "System Account", "modificationTime": "2017-04-23T14:30:30", "_links": { "self": { "href": "https://support.north.local:4443/v3/restoresessions/2cd23751-b5bc-4024-ac11-7277953945a9/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/items/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd70467886-6ecc-4db7-be25-d715e4dad14d741ae524-0aa6-4d4f-952a-df269480f1fa" }, "list": { "href": "https://support.north.local:4443/v3/restoresessions/2cd23751-b5bc-4024-ac11-7277953945a9/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/lists/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd70467886-6ecc-4db7-be25-d715e4dad14d" }, "attachments": { "href": "https://support.north.local:4443/v3/restoresessions/2cd23751-b5bc-4024-ac11-7277953945a9/organization/sites/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd/items/1cfe4469-0a31-414b-9fd0-e84a087dcb739f242172-6d3f-47a2-816a-4989d45e88dd70467886-6ecc-4db7-be25-d715e4dad14d741ae524-0aa6-4d4f-952a-df269480f1fa/attachments" } } } ], "list" : "someList", "username" : "admin", "userpassword" : "password", "RestorePermissions" : true, "DocumentVersion" : "last", "DocumentLastVersionAction" : "merge" } }
Response: 200 OK |