This is an archive version of the document. To get the most up-to-date information, see the current version.

Performing Bulk Restore of OneDrive Items

You can perform a bulk restore of backed-up OneDrive items.

Request

POST https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/Organization/OneDrives/action

Request Headers

The request header must contain an authorization token of the current session.

Request Parameters

The following parameter must be specified in the URL of the request:

Parameter

Type

Description

restoreSessionId

string

Specifies the identification number of the restore session. For more information on how to get this parameter, see Getting Restore Sessions.

Request Body

To perform a bulk restore of backed-up OneDrive items, the request body must contain the restoretoOriginallocation action properties:

Property

Type

Description

officeUsername

string

Specifies the user name that you want to use for authenticating with the Office 365 organization.

officePassword

string

Specifies the password of the user account that you want to use for authenticating with the Office 365 organization.

onPremisesUsername

string

Specifies the user name that you want to use for authenticating with the on-premises organization.

onPremisesPassword

string

Specifies the password of the user account that you want to use for authenticating with the on-premises organization.

skipUnresolved

boolean

If set to true, indicates that the restore will skip the unresolved items.

oneDrives

oneDrive

Specifies the OneDrive items that will be restored.

documentVersion

DocumentVersion

Specifies, which of the following versions of the OneDrive document will be restored:

  • all
  • last

documentAction

DocumentAction

Specifies, which one of the following actions will be performed in case the restore destination contains the restored document:

  • overwrite
  • keep

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 response body message for the requests with the export and save actions: application/octet-stream.

The media type and syntax of the response body message for the requests with the restore and send actions: null.

Response Body

None.

Examples

Example 1

The following request restores backed-up organization's OneDrive items to their original locations.

Request:

POST https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/Organization/OneDrives/action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

 "restoretoOriginallocation" :

 {

  "documentAction" : "keep",

  "skipUnresolved" : true,

  "oneDrives" :

  [

   {

   "id": "b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39",

   "name": "Administrator",

   "url": "http://server/personal/orgUser",

   "_links": {

    "self": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39"

    },

    "folders": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders?parentId=null"

    },

    "allfolders": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders"

    },

    "documents": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/documents?parentId=null"

    },

    "alldocuments": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/documents"

    }

   }

  },

  {

   "id": "724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11",

   "name": "CopyTo User",

   "url": "http://server/personal/orgUser",

   "_links": {

    "self": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11"

    },

    "folders": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/folders?parentId=null"

    },

    "allfolders": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/folders"

    },

    "documents": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/documents?parentId=null"

    },

    "alldocuments": {

     "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/documents"

    }

   }

  }

  ],

  "onPremisesUsername" : "admin",

  "onPremisesPassword" : "12345678",

  "documentVersion" : "last"

 }

}

 

Response:

200 OK