Getting OneDrive Folders
You can get a resource representation of OneDrive folders to explore and restore.
Request
GET https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/Folders[?parentId=<value>] |
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. |
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. Possible values:
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 resource.
Examples
Example 1
The following request returns a resource representation of OneDrive folders.
Request: GET https://abc.tech.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/Organization/OneDrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/Folders
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "offset": 0, "limit": 30, "results": [ { "id": "89e2b52a-66e3-4a1a-a088-4655dfbe95d7", "name": "F1", "createdBy": "System Account", "creationTime": "2017-04-04T12:01:49", "modifiedBy": "System Account", "modificationTime": "2017-04-04T12:01:49", "_links": { "self": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders/89e2b52a-66e3-4a1a-a088-4655dfbe95d7" }, "onedrive": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39" }, "folders": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders?parentId=89e2b52a-66e3-4a1a-a088-4655dfbe95d7" }, "documents": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/documents?parentId=89e2b52a-66e3-4a1a-a088-4655dfbe95d7" } } }, { "id": "67cdafbf-8c14-434e-a02d-a04f228e0086", "name": "F2", "createdBy": "System Account", "creationTime": "2017-05-23T12:32:28", "modifiedBy": "System Account", "modificationTime": "2017-05-23T12:32:28", "_links": { "self": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders/67cdafbf-8c14-434e-a02d-a04f228e0086" }, "onedrive": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39" }, "parent": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders/89e2b52a-66e3-4a1a-a088-4655dfbe95d7" }, "folders": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders?parentId=67cdafbf-8c14-434e-a02d-a04f228e0086" }, "documents": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/documents?parentId=67cdafbf-8c14-434e-a02d-a04f228e0086" } } }, { "id": "3dfb16ea-0dd1-43d0-becf-ee47713afb67", "name": "Shared with Everyone", "createdBy": "administrator", "creationTime": "2017-12-06T12:26:46", "modifiedBy": "administrator", "modificationTime": "2017-12-06T12:26:46", "_links": { "self": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders/3dfb16ea-0dd1-43d0-becf-ee47713afb67" }, "onedrive": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39" }, "folders": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders?parentId=3dfb16ea-0dd1-43d0-becf-ee47713afb67" }, "documents": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/documents?parentId=3dfb16ea-0dd1-43d0-becf-ee47713afb67" } } } ], "_links": { "self": { "href": "https://support.north.local:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/organization/onedrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders/?offset=0&limit=30" } } } |