Getting Specific Version of OneDrive Document
You can get a resource representation of a specific version of a backed-up OneDrive document with the specified ID.
Request
GET https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/Documents/{documentId}/Versions/{versionId} |
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. |
versionId | integer | Specifies the identification number of the OneDrive document version. For more information on how to get this parameter, see Getting All Versions of OneDrive Document. |
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 |
---|---|---|
sizeBytes | integer | Specifies the size of the backed-up OneDrive document. |
inheritedPermissions | boolean | Defines whether the permission settings of an element will be passed on to the children of that element. |
version | string | Specifies the version of the OneDrive document. |
id | string | Specifies the ID of the backed-up OneDrive document. |
versionId | integer | Specifies the ID of the OneDrive document version. |
name | string | Specifies the name 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. |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Example
The example returns a resource representation of the version of the OneDrive document with the ID dbeb32bf-1ca6-448d-9158-3a19581eb7ab.
Request: GET https://abc.tech.local:4443/v6/RestoreSessions/050c6484-057e-47d3-b540-aadb64e12c56/Organization/OneDrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/Documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/Versions/14
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "sizeBytes": 810553, "inheritedPermissions": true, "version": "3.0", "id": "dbeb32bf-1ca6-448d-9158-3a19581eb7ab", "versionId": 14, "name": "Perfomance.xlsx", "createdBy": "admin1", "creationTime": "2021-11-29T11:54:12Z", "modifiedBy": "admin1", "modificationTime": "2021-11-29T12:12:25Z", "_links": { "self": { "href": "v6/restoresessions/050c6484-057e-47d3-b540-aadb64e12c56/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/versions/14" }, "onedrive": { "href": "v6/restoresessions/050c6484-057e-47d3-b540-aadb64e12c56/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" } } } |