Getting Specific Version of OneDrive Folder

In this article

    You can get a resource representation of a specific version of a backed-up OneDrive folder with the specified ID.

    Request

    GET https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/folders/{folderId}/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.

    folderId

    string

    Specifies the identification number of the OneDrive folder. For more information on how to get this parameter, see Getting OneDrive Folders.

    versionId

    integer

    Specifies the identification number of the OneDrive folder version. For more information on how to get this parameter, see Getting All Versions of OneDrive Folder.

    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

    version

    string

    Specifies the version of the backed-up OneDrive folder.

    id

    string

    Specifies the ID of the backed-up OneDrive folder.

    versionId

    integer

    Specifies the ID of the folder version.

    name

    string

    Specifies the name of the folder.

    createdBy

    string

    Specifies the user, which created the document.

    creationTime

    UTC

    Specifies date and time when the folder 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 folder with the specified ID.

    Request:

    GET https://abc.tech.local:4443/v6/restoresessions/2d09a351-3c1f-4943-a95c-5fa550ddef2f/organization/onedrives/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/folders/9bad4ae7-1dc4-4206-a76f-9b9da8a0d96a/Versions/3

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Response:

    200 OK

     

    Response Body:

    {

     "version": "2.0",

     "id": "9bad4ae7-1dc4-4206-a76f-9b9da8a0d96a",

     "versionId": 3,

     "name": "new",

     "createdBy": "admin8",

     "creationTime": "2018-07-02T18:10:57Z",

     "modifiedBy": "admin8",

     "modificationTime": "2018-07-02T18:24:54Z",

     "_links": {

       "self": {

         "href": "v6/restoresessions/2d09a351-3c1f-4943-a95c-5fa550ddef2f/organization/onedrives/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/folders/9bad4ae7-1dc4-4206-a76f-9b9da8a0d96a"

       },

       "onedrive": {

         "href": "v6/restoresessions/2d09a351-3c1f-4943-a95c-5fa550ddef2f/organization/onedrives/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9"

       },

       "folders": {

         "href": "v6/restoresessions/2d09a351-3c1f-4943-a95c-5fa550ddef2f/organization/onedrives/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/folders?parentId=9bad4ae7-1dc4-4206-a76f-9b9da8a0d96a"

       },

       "documents": {

         "href": "v6/restoresessions/2d09a351-3c1f-4943-a95c-5fa550ddef2f/organization/onedrives/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/documents?parentId=9bad4ae7-1dc4-4206-a76f-9b9da8a0d96a"

       },

       "versions": {

         "href": "v6/restoresessions/2d09a351-3c1f-4943-a95c-5fa550ddef2f/organization/onedrives/7a780e6e-46be-4735-b542-aa7c4758e53d4774e7df-5416-47d1-8f69-ae4d92e582e9/folders/9bad4ae7-1dc4-4206-a76f-9b9da8a0d96a/versions"

       }

     }

    }