Getting All Versions of OneDrive Document
You can get a resource representation of versions of a backed-up OneDrive document with the specified ID.
When you get OneDrive document versions, the server returns information about previous versions of the document. To get the latest version, use either Getting OneDrive Documents or Getting Specific Version of OneDrive Document operation.
Request
GET https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/Documents/{documentId}/Versions |
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
In the response body, the server returns a resource representation of the /RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/Documents/{documentId}/Versions collection resource.
Example
The example returns a resource representation of versions of the OneDrive document with the ID dbeb32bf-1ca6-448d-9158-3a19581eb7ab.
Request: GET https://abc.tech.local:4443/v6/RestoreSessions/49d4d286-c1ca-4a50-b298-af09f96531b2/Organization/OneDrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/Documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/Versions
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "offset": 0, "limit": 30, "_links": { "self": { "href": "/v6/RestoreSessions/49d4d286-c1ca-4a50-b298-af09f96531b2/Organization/OneDrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/Documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/Versions?offset=0&limit=30" } }, "results": [ { "sizeBytes": 813726, "inheritedPermissions": true, "version": "1.0", "id": "dbeb32bf-1ca6-448d-9158-3a19581eb7ab", "versionId": 1, "name": "Perfomance.xlsx", "createdBy": "admin1", "creationTime": "2021-11-29T11:54:12Z", "modifiedBy": "admin1", "modificationTime": "2021-11-29T11:54:12Z", "_links": { "self": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/versions/1" }, "onedrive": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" } } }, { "sizeBytes": 811165, "inheritedPermissions": true, "version": "2.0", "id": "dbeb32bf-1ca6-448d-9158-3a19581eb7ab", "versionId": 8, "name": "Perfomance.xlsx", "createdBy": "admin1", "creationTime": "2021-11-29T11:54:12Z", "modifiedBy": "admin1", "modificationTime": "2021-11-29T12:06:11Z", "_links": { "self": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/versions/8" }, "onedrive": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" } } }, { "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/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/versions/14" }, "onedrive": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" } } }, { "sizeBytes": 810619, "inheritedPermissions": true, "version": "4.0", "id": "dbeb32bf-1ca6-448d-9158-3a19581eb7ab", "versionId": 17, "name": "Perfomance.xlsx", "createdBy": "admin1", "creationTime": "2021-11-29T11:54:12Z", "modifiedBy": "admin1", "modificationTime": "2021-11-29T12:27:13Z", "_links": { "self": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/versions/17" }, "onedrive": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" } } }, { "sizeBytes": 810574, "inheritedPermissions": true, "version": "5.0", "id": "dbeb32bf-1ca6-448d-9158-3a19581eb7ab", "versionId": 18, "name": "Perfomance.xlsx", "createdBy": "admin1", "creationTime": "2021-11-29T11:54:12Z", "modifiedBy": "admin1", "modificationTime": "2021-11-30T10:36:35Z", "_links": { "self": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/versions/18" }, "onedrive": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" } } }, { "sizeBytes": 811231, "inheritedPermissions": true, "version": "6.0", "id": "dbeb32bf-1ca6-448d-9158-3a19581eb7ab", "versionId": 29, "name": "Perfomance.xlsx", "createdBy": "admin1", "creationTime": "2021-11-29T11:54:12Z", "modifiedBy": "admin1", "modificationTime": "2021-12-01T10:11:53Z", "_links": { "self": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents/dbeb32bf-1ca6-448d-9158-3a19581eb7ab/versions/29" }, "onedrive": { "href": "v6/restoresessions/49d4d286-c1ca-4a50-b298-af09f96531b2/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" } } } ], "setId": "00000000-0000-0000-0000-000000000000" } |