Getting OneDrive Documents
You can get a resource representation of OneDrive documents to explore and restore.
Request
GET https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/Documents?parentId=<string> |
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. |
The following optional parameter can be specified in the URL of the request:
Property | Type | Description |
---|---|---|
parentId | string | Specifies what information the server will return in the resource representation. The following values are available:
If you do not specify this parameter, the server will return a representation of documents in all parent OneDrive folders and their subfolders. Thus, the server will require longer time to execute the request. |
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 collection resource.
Examples
Example 1
The example returns a resource representation of all documents in a root OneDrive folder.
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?parentId=null
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "offset": 0, "limit": 30, "_links": { "self": { "href": "/v6/RestoreSessions/399da5fc-547f-4f36-87b2-3fae803a98f5/Organization/OneDrives/1d3740ca-bd0e-4656-88ed-2e35ce10e1deef4221af-9351-41ec-9128-534cf34db1a5/Documents?parentid=null&offset=0&limit=30" }, "next": { "href": "/v6/RestoreSessions/399da5fc-547f-4f36-87b2-3fae803a98f5/Organization/OneDrives/1d3740ca-bd0e-4656-88ed-2e35ce10e1deef4221af-9351-41ec-9128-534cf34db1a5/Documents?parentid=null&offset=30&limit=30" } }, "results": [ { "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" } } }, { "sizeBytes": 9753, "inheritedPermissions": true, "version": "9.0", "id": "3a21f23a-13ed-4124-b23d-fad1a6c71704", "versionId": 36, "name": "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/3a21f23a-13ed-4124-b23d-fad1a6c71704" }, "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/3a21f23a-13ed-4124-b23d-fad1a6c71704/versions" } } }, ... ], "setId": "00000000-0000-0000-0000-000000000000" } |
Example 2
The example returns a resource representation of all documents of the organization OneDrive with the specified ID.
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
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "offset": 0, "limit": 30, "_links": { "self": { "href": "/v6/RestoreSessions/399da5fc-547f-4f36-87b2-3fae803a98f5/Organization/OneDrives/1d3740ca-bd0e-4656-88ed-2e35ce10e1deef4221af-9351-41ec-9128-534cf34db1a5/Documents?offset=0&limit=30" }, "next": { "href": "/v6/RestoreSessions/399da5fc-547f-4f36-87b2-3fae803a98f5/Organization/OneDrives/1d3740ca-bd0e-4656-88ed-2e35ce10e1deef4221af-9351-41ec-9128-534cf34db1a5/Documents?offset=30&limit=30" } }, "results": [ { "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" } } }, { "sizeBytes": 9753, "inheritedPermissions": true, "version": "9.0", "id": "3a21f23a-13ed-4124-b23d-fad1a6c71704", "versionId": 36, "name": "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/3a21f23a-13ed-4124-b23d-fad1a6c71704" }, "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/3a21f23a-13ed-4124-b23d-fad1a6c71704/versions" } } }, { "sizeBytes": 8718, "inheritedPermissions": true, "version": "5.0", "id": "a39f3dce-326d-402c-a0f3-4ef819e77b66", "versionId": 20, "name": "RESTORED-RESTORED-Book.xlsx", "createdBy": "admin1", "creationTime": "2021-03-15T10:17:37Z", "modifiedBy": "Administrator", "modificationTime": "2021-03-15T14:07:35Z", "_links": { "self": { "href": "/v6/restoresessions/399da5fc-547f-4f36-87b2-3fae803a98f5/organization/onedrives/1d3740ca-bd0e-4656-88ed-2e35ce10e1deef4221af-9351-41ec-9128-534cf34db1a5/documents/a39f3dce-326d-402c-a0f3-4ef819e77b66" }, "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/a39f3dce-326d-402c-a0f3-4ef819e77b66/versions" } } }, ... ], "setId": "00000000-0000-0000-0000-000000000000" } |