v1

latestOpenAPI 3.1.02026-07-245531,0212.1 MB
Restore SharePoint Online data

Restore a SharePoint Site

Performs a restore of a SharePoint site to a new or existing site.

post/insync/sharepointmaster/v2/restores

Request body

site_collection_idinteger

Specify the unique identifier associated with a specific SharePoint site collection for filtering.

Get the ID of a site using the List all SharePoint Site Collections API.

pathstring

Specify the list of paths to be restored, including the minor type, handle, and root for each path.

The format for each path is as follows: {"minor_type": 1, "handle": "/Thu Mar 7 13:18:43 2024/shan_dl_restore", "parent": "root"}

  • Minor Type: The minor type represents the type of item being restored. The possible values are:0-Folder, 1-File, 2-Document List, 9-Settings File, 10-List, 11-Subsite

  • Handle: The handle is the path to the specific item being restored relative to the snapshot. It follows this format: </snapshot_name/snapshot_title/item_to_restore>

  • Parent/Root: The root specifies the parent directory or root context for the item being restored. Multiple paths can be provided as a comma-separated list. It follows this format: </snapshot_name/snapshot_title/parent_dir>

in_placeboolean

Specify the flag indicating if the restore operation is an in-place restore.

  • If param restore_to is set to new then <in_place> should be false.

  • If param restore_to is set to existing, then in_place should be true.

sidinteger

Specify the ID of the storage assigned to the site collection. Get the ID of storage using the List all storages API. This API returns the list of all storage that the customer is using.

The list will provide the ID - Storage name mapping for each region that the customer is using. To know a SharePoint site's storage name, customers can see a SharePoint site's summary.

restore_tostring

Specify the flag indicating if the data should be restored to a new or an existing site. Use new to restore data to a new site collection or existing to restore data to an existing site collection.

ⓘ Note: If param restore_to is set to new, then in_place should be false. If param restore_to is set to existing then in_place should be true.

destination_site_urlstring

Specify the URL of the destination site to be used in case of restoring data to an existing site.

destination_site_titlestring

Specify the title of the destination site to be used in case of restoring data to an existing site.

use_source_site_paramsboolean

Specify the flag indicating if the parameters from the source site should be used when restoring data to a new or existing site.

  • When set to true, the restore operation will apply the site configuration parameters (e.g., site templates, language settings, regional settings, etc.) from the original source site to the destination site.

  • If set to false, the operation will use the default site configuration parameters for the destination site, ignoring the source site's settings.

new_site_paramsstring

Specify the site title and description containing the details for the new site to be created during a restore operation to a new site.

{"new_site_title": Title of the new site,"new_site_description": Description of the new site}

ⓘNote: If param restore_to is set to an existing, the new_site_params is not required.

spo_settings_restore_optioninteger

Specify whether the SharePoint Online settings need to be restored or not during the restore operation.

  • Set it to 1 to include SharePoint Online settings in the restore process. These settings may include site configurations, regional settings, language settings, and other SharePoint Online-specific settings.

  • Set it to 0 to skip restoring SharePoint Online settings and only restore the content and data.

teams_restore_paramsstring

Specify the parameters required for restoring a team.

{"destination_site_collection_url": "/sites/example", "restore_to": "new", "restore_paths": "[{"minor_type": 1, "handle": "/Thu Mar 7 13:18:43 2024/shan_dl_restore", "parent": "root"}]", "is_wiki_restore": "false"}

ⓘ Note: This is required only if is_team_triggered parameter is set to true

Example request

{
  "site_collection_id": 123,
  "path": "[{\"minor_type\": 1, \"handle\": \"/Thu Mar  7 13:18:43 2024/shan_dl_restore\", \"parent\": \"root\"}]",
  "sid": 1,
  "restore_to": "new",
  "destination_site_url": "/sites/example",
  "destination_site_title": "Hello",
  "new_site_params": "{\"new_site_title\":\"RestoreNewprasadtestsite824\",\"new_site_description\":\"Whole site restore to a new site with site settings\"}",
  "spo_settings_restore_option": 1
}

Response

success

messagestring

Message indicating the restore trigger status if restore is triggered successfully or restore trigger failed.

restore_statusinteger

Restore status code. Eg. 0-Success, 1-Failure

restore_taskboolean

flag indicating if restore task was created successfuly. Eg. True-Success, False-Failure

task_idinteger

A unique identifier for the restore task.

Example response

{
  "message": "Restore triggered successfully.",
  "restore_task": true
}