Getting OneDrive Documents

You can get a resource representation of a backed-up OneDrive document with the specified ID.

Request

GET https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/Documents/{documentId}

Request Headers

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

Request Parameters

The following parameters 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.

oneDriveId

string

Specifies the identification number of OneDrive. For more information on how to get this parameter, see Getting OneDrives.

documentId

string

Specifies the identification number of the OneDrive document. For more information on how to get this parameter, see Getting OneDrive Documents.

Request Body

None.

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: application/json; charset=utf-8

Response Body

The response body contains the following properties:

Property

Type

Description

id

string

Specifies the ID of the backed-up OneDrive document.

name

string

Specifies the name of the backed-up OneDrive document.

version

string

Specifies the version of the OneDrive document.

versionId

integer

Specifies the ID of the OneDrive document version.

sizeBytes

integer

Specifies the size of the backed-up OneDrive document.

createdBy

string

Specifies the user created the document.

creationTime

UTC

Specifies date and time when the document was created.

modifiedBy

string

Specifies the user performed the last modifications to the document.

modificationTime

UTC

Specifies date and time when the document was modified.

inheritedPermissions

boolean

Defines whether the permission settings of an element will be passed on to the children of that element.

_links

Dictionary of string [key] and Object [value]

Links to related resources (navigation property).

Example

The example returns a resource representation of the OneDrive document with the ID 2809c36a-ed96-4583-b70b-75259eb1ba84.

Request:

GET https://abc.tech.local:4443/v6/RestoreSessions/399da5fc-547f-4f36-87b2-3fae803a98f5/Organization/OneDrives/1d3740ca-bd0e-4656-88ed-2e35ce10e1deef4221af-9351-41ec-9128-534cf34db1a5/Documents/2809c36a-ed96-4583-b70b-75259eb1ba84

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

  {

     "sizeBytes": 9753,

     "inheritedPermissions": true,

     "version": "9.0",

     "id": "2809c36a-ed96-4583-b70b-75259eb1ba84",

     "versionId": 36,

     "name": "RESTORED-Book1.xlsx",

     "createdBy": "Administrator",

     "creationTime": "2021-10-09T18:38:31Z",

     "modifiedBy": "Administrator",

     "modificationTime": "2021-10-20T17:07:37Z",

     "_links": {

       "self": {

         "href": "/v6/restoresessions/399da5fc-547f-4f36-87b2-3fae803a98f5/organization/onedrives/1d3740ca-bd0e-4656-88ed-2e35ce10e1deef4221af-9351-41ec-9128-534cf34db1a5/documents/2809c36a-ed96-4583-b70b-75259eb1ba84"

       },

       "onedrive": {

         "href": "/v6/restoresessions/399da5fc-547f-4f36-87b2-3fae803a98f5/organization/onedrives/1d3740ca-bd0e-4656-88ed-2e35ce10e1deef4221af-9351-41ec-9128-534cf34db1a5"

       },

       "versions": {

         "href": "/v6/restoresessions/399da5fc-547f-4f36-87b2-3fae803a98f5/organization/onedrives/1d3740ca-bd0e-4656-88ed-2e35ce10e1deef4221af-9351-41ec-9128-534cf34db1a5/documents/2809c36a-ed96-4583-b70b-75259eb1ba84/versions"

       }

     }

   }