v1

latestOpenAPI 3.1.02026-07-245531,0212.1 MB
Restore OneDrive/Exchange Online data

Restore a OneDrive Account or Exchange Online Mailbox

Performs a restore of a OneDrive account or an Exchange Online mailbox to a new or existing account.

post/insync/cloudapp/v1/restores

Request body

retainShareSettingsboolean

Specify the flag indicating whether the sharing settings of the restored items should be retained during the restore operation.

  • Set it to true to apply the original sharing settings or

  • false to apply the default sharing settings to the restored items.

inplaceRestoreDeletedOnlyboolean

Specify the flag indicating whether the in-place restore operation should restore deleted items.

  • Set it to true to restore deleted items or

  • false to exclude deleted items.

sourcesstring[]

Specify the paths of files or folders that you want to restore.

ⓘ Note: The length of the sources array should match the length of the source_types array. The format for each path or file is as follows:/backup_date/folder_or_library_name/file_or_folder_name

destinationstring

Specify the destination where you want to restore the data.

ⓘ Note: This field is required for Exchange Online device restore operations.

storageinteger

Specify the storage flag to identify if the provided storageId refers to a primary or secondary storage.

Set the storage flag to 0 for primary storage and 1 for secondary storage.

sourceTypesinteger[]

Specify the types of sources (files or folders) to be restored. Set it to 32768 for files or 16384 for folders.

ⓘ Note: The length of the sourceTypes array should match the length of the sources array.

storageIdinteger

Specify the ID of the storage assigned. Get the ID of storage using the List all storages API. Refer 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.

restoreOptionstring

Specify the type of restore operation.

  • Set it to inplacerestore to restore data to the original location from which the backup was taken or

  • Set it to restorecopy to restore to a new or different location.

isCloudappboolean

Specify the flag indicating whether the restore operation is for a cloud application.

  • Set it to true for cloud applications or

  • false for non-cloud applications such as on-premises systems, local servers, or other non-cloud environments.

includeExchangeInplaceArchiveboolean

Specify the flag indicating whether the restore operation should include the Exchange In-Place Archive.

  • Set it to true to restore operation and include the Exchange In-Place Archive data. Any archived emails or data stored in the user's In-Place Archive will be restored along with the primary mailbox data.

  • Set it to false for the restore operation to exclude the Exchange In-Place Archive data and only restore the data from the primary mailbox.

selectiveRestoreboolean

Specify the flag indicating whether the restore operation should be a selective restore or a full restore.

  • Set to true for a selective restore or

  • false to indicate that the restore operation will be a full restore, where the entire backup set or data source will be restored.

fromDeviceIdinteger

Specify the source device ID from which the data needs to be restored.

deviceIdinteger

Specify the destination device ID to which the data should be restored.

appTypestring

Specify the application for which the restore operation is being performed.

  • Set to O365 OneDrive to Indicate that the restore operation is for Microsoft Office 365 OneDrive or

  • Set to O365 Exchange Online if the restore operation is for Microsoft Office 365 Exchange Online.

versioninteger

Specify the version number or identifier for the Exchange Online device restore operation.

ⓘ Note: This field is required only for Exchange Online device restore operations.

pathDetailsstring[]

Specify the path or locations of the data to be restored in an Exchange Online device restore operation.

Example: the pathDetails array contains three strings: inSync-Mails-root Represents the path or location of the mailbox or mail data to be restored.

ⓘ Note: This field is required only for Exchange Online device restore operations.

Example request

{
  "sources": [
    "/Wed Mar  6 11:54:00 2024/Documents/1st Aug"
  ],
  "destination": "inSync Restore Thu Mar  7 07-50-01 2024",
  "sourceTypes": [
    16384,
    32768
  ],
  "storageId": 1001,
  "restoreOption": "restorecopy",
  "isCloudapp": true,
  "fromDeviceId": 1000001,
  "deviceId": 1000001,
  "appType": "O365 OneDrive",
  "pathDetails": [
    "inSync-Mails-root"
  ]
}

Response

success

statusstring

Example response

{
  "status": "OK"
}