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 OneDrive Items. |
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 if the permission settings of an element will be passed on to the children of that element. |
version | string | Specifies the version of the document. |
id | string | Specifies the ID of the document. |
versionId | integer | Specifies the ID of the document version. |
name | string | Specifies the name of the document. |
createdBy | string | Specifies the user, which created the document. |
creationTime | UTC | Specifies date and time when the document was created. |
modifiedBy | string | Specifies the user, which 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 a version of a OneDrive document with the specified ID.
Request: GET https://abc.tech.local:4443/v6/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/documents/0e4079a2-faa5-41bf-b8a7-ba883308cbc9/Versions/6
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "sizeBytes": 244565, "inheritedPermissions": true, "version": "3.0", "id": "b82b427c-e369-4f6a-aacd-dee45a9755d5", "versionId": 6, "name": "Document.docx", "createdBy": "admin8", "creationTime": "2018-02-22T16:30:59Z", "modifiedBy": "admin8", "modificationTime": "2018-03-15T12:21:21Z", "_links": { "self": { "href": "v6/restoresessions/2d09a351-3c1f-4943-a95c-5fa550ddef2f/organization/onedrives/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/documents/b82b427c-e369-4f6a-aacd-dee45a9755d5/versions/6" }, "onedrive": { "href": "v6/restoresessions/2d09a351-3c1f-4943-a95c-5fa550ddef2f/organization/onedrives/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9" } } } |