Getting OneDrive Folders
You can get a resource representation of OneDrive folders to explore and restore.
Request
GET https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/Folders?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:
Parameter | 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 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}/Folders collection resource.
Example
The example returns a resource representation of the backed-up OneDrive folders.
Request: GET https://abc.tech.local:4443/v6/RestoreSessions/60fed472-b671-4b0c-bf2e-a11408155c8d/Organization/OneDrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/Folders
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "offset": 0, "limit": 30, "_links": { "self": { "href": "/v6/RestoreSessions/60fed472-b671-4b0c-bf2e-a11408155c8d/Organization/OneDrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/Folders?offset=0&limit=30" }, "next": { "href": "/v6/RestoreSessions/60fed472-b671-4b0c-bf2e-a11408155c8d/Organization/OneDrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/Folders?offset=30&limit=30" } }, "results": [ { "version": "1.0", "id": "bbc9960c-767b-428a-ac6c-c75bb8f7c548", "versionId": 1, "name": "Folder1", "createdBy": "administrator", "creationTime": "2021-04-20T09:42:29Z", "modifiedBy": "Administrator", "modificationTime": "2021-05-25T15:41:42Z", "_links": { "self": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders/bbc9960c-767b-428a-ac6c-c75bb8f7c548" }, "onedrive": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" }, "folders": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders?parentId=bbc9960c-767b-428a-ac6c-c75bb8f7c548" }, "documents": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents?parentId=bbc9960c-767b-428a-ac6c-c75bb8f7c548" }, "versions": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders/bbc9960c-767b-428a-ac6c-c75bb8f7c548/versions" } } }, { "version": "1.0", "id": "5e63a8c7-72c8-4070-a7de-6b8e288b0177", "versionId": 1, "name": "Folder2", "createdBy": "administrator", "creationTime": "2021-03-16T12:09:29Z", "modifiedBy": "Administrator", "modificationTime": "2021-05-25T15:42:08Z", "_links": { "self": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders/5e63a8c7-72c8-4070-a7de-6b8e288b0177" }, "onedrive": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" }, "parent": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders/bbc9960c-767b-428a-ac6c-c75bb8f7c548" }, "folders": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders?parentId=5e63a8c7-72c8-4070-a7de-6b8e288b0177" }, "documents": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents?parentId=5e63a8c7-72c8-4070-a7de-6b8e288b0177" }, "versions": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders/5e63a8c7-72c8-4070-a7de-6b8e288b0177/versions" } } }, { "version": "1.0", "id": "d980d765-8288-4394-bbbb-92da3eb44e09", "versionId": 1, "name": "Restored-Folder1", "createdBy": "administrator", "creationTime": "2021-04-20T09:42:29Z", "modifiedBy": "administrator", "modificationTime": "2021-04-20T09:42:29Z", "_links": { "self": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders/d980d765-8288-4394-bbbb-92da3eb44e09" }, "onedrive": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5" }, "parent": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders/5e63a8c7-72c8-4070-a7de-6b8e288b0177" }, "folders": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders?parentId=d980d765-8288-4394-bbbb-92da3eb44e09" }, "documents": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/documents?parentId=d980d765-8288-4394-bbbb-92da3eb44e09" }, "versions": { "href": "v6/restoresessions/60fed472-b671-4b0c-bf2e-a11408155c8d/organization/onedrives/9c4a2afc-5e57-4dfa-a7e2-59e092691772ef4221af-9351-41ec-9128-534cf34db1a5/folders/d980d765-8288-4394-bbbb-92da3eb44e09/versions" } } }, ... ], "setId": "00000000-0000-0000-0000-000000000000" } |