Sending, Saving, Copying and Restoring OneDrive Documents

In this article

    You can restore, send, copy and save backed-up OneDrive documents.

    Request

    POST https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/Documents

    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.

    Request Body

    Restore to Original Location

    To restore backed-up OneDrive documents to the production server, the request body must contain the restoretoOriginallocation action properties:

    Property

    Type

    Description

    userName

    string

    Specifies the user name that you want to use for authenticating with the organization.

    For example, "userName": "jsmith@westsupport.onmicrosoft.com".

    userPassword

    string

    Specifies the password of the user account that you want to use for authenticating with the organization.

    For example, "userPassword": "paSSw0rd".

    documentVersion

    documentVersion

    Specifies, which of the following versions of the OneDrive document will be restored:

    • all
    • last

    documentAction

    documentAction

    Specifies, which one of the following actions will be performed in case the restore destination contains the restored document:

    • overwrite
    • keep

    documents

    document[]

    Accepts IDs of documents that you want to restore. For more information on how to get such IDs, see Getting OneDrive Documents.

    userCode

    string

    Specifies the authentication code. For more information on how to get a device code, see Getting Device Code.

    This property is required if you want to use a device code for data restore.

    applicationId

    string

    An identification number of the Azure AD application that you want to use for a restore.

    applicationCertificate

    base64

    Specifies the SSL certificate configured for the Azure AD application that you want to use for data restore.

    You must provide the certificate as a Base64 string. For more information on how to obtain a Base64 string, see Converting Certificate to Base64 String.

    applicationCertificatePassword

    string

    A password for the SSL certificate being used.

    Converting Certificate to Base64 String

    If you want to use a certificate to access an Azure AD application, you must provide the certificate as a Base64 string. To obtain a Base64 string, perform the following steps:

    1. Get the certificate content from a PFX file.
    2. Convert the certificate to a Base64 string.

    To do this, you can use the following PowerShell cmdlets:

    $pfx_cert = get-content '<path_to_cert>' -Encoding Byte

    [System.Convert]::ToBase64String($pfx_cert) | Out-File '<path_to_file>'

    where:

    For example:

    $pfx_cert = get-content 'C:\cert.pfx' -Encoding Byte

    [System.Convert]::ToBase64String($pfx_cert) | Out-File 'C:\base64.txt'

    Request Example 1

    The following example shows how to use a user name and password for a restore.

    Request Body:

    {

    "restoretoOriginallocation":

     {

      "userName": "jsmith@westsupport.onmicrosoft.com",

      "userPassword": "paSSw0rd",

      "documents":  [

         {"Id": "74685f6b-16aa-4a78-a44f-05526ce0ae30"},

         {"Id": "70013a9e-c446-429d-aa78-9c8c20d9b814"}

         ]

       }

     }

    }

    Request Example 2

    The following example shows how to use a device code for a restore.

    Request Body:

    {

    "restoretoOriginallocation":

     {

        "userCode": "C6A9DB737",

        "documents":  [

         {"Id": "74685f6b-16aa-4a78-a44f-05526ce0ae30"},

         {"Id": "70013a9e-c446-429d-aa78-9c8c20d9b814"}

         ]

       }

     }

    }

    Request Example 3

    The following example shows how to use a certificate for a restore.

    Request Body:

    {

    "restoretoOriginallocation":

     {

         "applicationId" : <app_id>,

         "applicationCertificate": "MIIKEgIBAzCCCc4GCSqGSIb3DQEHAaCCCb8Eggm7MIIJtzCCBggGCSqGSIb3DQEHAaCCBfkEggX1MIIF8TCCBe0GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAg7S8DZJqMJuwICB9AEggTYsQotlTjAJnBl4ssVRewseXE+zDTZgr8i0FwJdrUYaR4pnmD/eKkcjIMmxLgBXF/yEUEPpBOUxksmtABLADc6+sY9L7OOPJPPuB+XtMOW0xBlLPHrf4AM18gsAjW116BmMP8Haf4nYAQHJ39idxF+7haVDNSYJJTgs0ijmyNxOJLqYQElHJYE9KshqT0lLDtc007EhyG2fh5/fcMeRg7iQpENkkBhtC86FXS1qmNtkUXNVWy8tnXkY2jy5DTi3Aqvb+1fAJpfbGIQRakYyA6fDWhpg/5pYJWSJCmStrbGpMiUlvuqqiGp1Ivwi+3kou6/DFYxA0SJ5pjUOBaLbibcHNReYU/Rszo+rG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AQxdMfhwTwhrwaq5lYGr7EyWaOHakxHBQQRuWHun26asGxyz6YPU2vpFj9K1lCZ+TrDmKQS2wYUv/L5kYzDo8T66GukR0XCgpavCC2gzP9stfbgct1uvgDnnDq8KJrR0sEA/v68A03NIUdnyH4wa6HQfMZ8SUfdIOvMYejNUzxqm3en15NAhiAcd3xN7D/EXk1SNn4agZhyPPiqOCSXDhL30AjyNPsPB6kEimGxQKHy+oI90xwtK86t69oOkhGaJTVNulFH2G+mg2end+XeOAcR0Jj8JxGOcuFbhQVAZDGgljCEm94DmCHtYzz6ZP9GwVmgJGuRNGtJn8/5brv+ibL+Zpqe7dG5YY+BXDY2KoRnZSn2QMOKrQOgTu+/oQKspx4o5NCL2dOypP1pFjBNvSqXCxIu4nqOr9dCXc2f63XJ0S7HejUj4Ep3D1Vi6/Nh2mkZWNhiqtI7Cc9QAjo5DRd+OqjCIfP9s8FIXYnA5znyuQFNFVWDJ37AL2y/DFxPQTCosGCKnztZ/Ycurob+/FufJW7/gwmuFD6lgirWaSMaqc5JK2FZVvLS5VDd4k92/WKk+luxUdzEzGn4/PZfGrNJJcbQ6pLZS5c8QRc8rGYormvJIFUn2u4RJaRZGhLzRu2fpmIhWqWgwXtt8XVvrGJ3sdl1lHxPH+Cl+saXK0TTD7jA7MB8wBwYFKw4DAhoEFKcrbAfmDaDdM8n0qonvDola5JVsBBSOBZavEN2v/i1YfP42r9vRTMqXTwICB9A=",

       "applicationCertificatePassword": "xxx",

       "documents":  [

         {"Id": "74685f6b-16aa-4a78-a44f-05526ce0ae30"},

         {"Id": "70013a9e-c446-429d-aa78-9c8c20d9b814"}

         ]

       }

     }

    }

    Send As Email Attachment

    To send backed-up OneDrive documents from a defined email address to a selected email, the request body must contain the sendTo action properties:

    Property

    Type

    Description

    documents

    document[]

    Accepts IDs of documents that you want to send as email attachments. For more information on how to get such IDs, see Getting OneDrive Documents.

    from

    string

    Specifies the email address from which the attachments will be sent.

    For example, "from": "j_smith@bestsupport.onmicrosoft.com".

    to

    string

    Specifies the email address to which the attachments will be sent.

    For example, "to": "r.clark@bestsupport.onmicrosoft.com".

    subject

    string

    Specifies the subject of the email message used for sending the attachments.

    For example,  "subject": "Support Ticket".

    text

    string

    Specifies the body of the email message used for sending the attachments.

    For example, "text": "Please, find attached the files you requested".

    For example:

    Request Body:

    {

     "sendTo":

     {

      "from": "j_smith@bestsupport.onmicrosoft.com",

      "to": "r.clark@bestsupport.onmicrosoft.com",

      "subject": "Support Ticket",

      "text": "Please, find attached the files you requested",

      "documents":  [

         {"Id": "74685f6b-16aa-4a78-a44f-05526ce0ae30"},

         {"Id": "70013a9e-c446-429d-aa78-9c8c20d9b814"}

         ]

     }

    }

     

    Sending, Saving, Copying and Restoring OneDrive Documents Note

    To be able to send item attachments you must specify the Veeam Explorer for Microsoft OneDrive for Business email settings by sending PUT HTTPS request to the /VEODEmailSettings URL. For more information, see (PUT) /VEODEmailSettings.

    Copy to Another OneDrive Destination

    To copy backed-up OneDrive documents to a different production server, the request body must contain the copyTo action properties:

    Property

    Type

    Description

    documents

    document[]

    Accepts IDs of documents that you want to copy. For more information on how to get such IDs, see Getting OneDrive Documents.

    userName

    string

    Specifies the user name that you want to use for authenticating with the organization.

    For example, "userName": "jsmith@westsupport.onmicrosoft.com".

    userPassword

    string

    Specifies the password of the user account that you want to use for authenticating with the organization.

    For example, "userPassword": "paSSw0rd".

    oneDrive

    oneDrive

    Specifies the target OneDrive copy destination.

    folder

    folder

    Specifies the target OneDrive folder copy destination.

    documentVersion

    documentVersion

    Specifies, which of the following versions of the OneDrive documents will be copied:

    • all
    • last

    documentLastVersionAction

    documentLastVersionAction

    Specifies, which one of the following actions will be performed with the last version of the copied OneDrive documents on the destination server:

    • overwrite
    • merge

    For example:

    Request Body:

    {

    "copyTo":

     {

      "userName": "djohnes@northsupport.onmicrosoft.com",

      "userPassword": "paSSw0rd",

      "documents":  [

         {"Id": "74685f6b-16aa-4a78-a44f-05526ce0ae30"},

         {"Id": "70013a9e-c446-429d-aa78-9c8c20d9b814"}

         ]

     }

    }

    Save Documents

    Sending, Saving, Copying and Restoring OneDrive Documents Note

    OneDrive documents are always saved in a ZIP archive.

    To save backed-up OneDrive documents, the request body must contain the save action property:

    Property

    Type

    Description

    documents

    document[]

    Accepts IDs of documents that you want to save. For more information on how to get such IDs, see Getting OneDrive Documents.

    For example:

    Request Body:

    {

    "save":

     {

      "documents":  [

         {"Id": "74685f6b-16aa-4a78-a44f-05526ce0ae30"},

         {"Id": "70013a9e-c446-429d-aa78-9c8c20d9b814"}

         ]

     }

    }

    The request command will archive the documents and place the ZIP archive a temporary folder on the Veeam Backup for Microsoft Office 365 server. After that, the archive will be transferred as application/octet-stream media to the client. To download, read or perform other actions with the octet-stream, use features of programming languages.

    Sending, Saving, Copying and Restoring OneDrive Documents Tip

    You can use Swagger UI to download the document from the stream by clicking Download action link in the response body. For more information, see Evaluation in Swagger UI.

    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 for the requests with the export and save actions: application/octet-stream.

    The media type and syntax of the response body message for the requests with the restore and send actions: null.

    Response Body

    None.

    Examples

    Example 1

    The following request sends OneDrive documents.

    Request:

    POST https://<hostname>:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/Organization/OneDrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/Documents/action

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Request Body:

    {

     "sendTo" :

     {

      "documents" :

      [

       {

       "sizeBytes": 80101,

       "inheritedPermissions": true,

       "version": "1.0",

       "id": "0e4079a2-faa5-41bf-b8a7-ba883308cbc9",

       "name": "Content1.jpg",

       "createdBy": "System Account",

       "creationTime": "2017-04-09T09:12:59",

       "modifiedBy": "System Account",

       "modificationTime": "2017-04-09T09:12:59",

       "_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/documents/0e4079a2-faa5-41bf-b8a7-ba883308cbc9"

        },

        "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"

        }

       }

      },

      {

       "sizeBytes": 1040384,

       "inheritedPermissions": true,

       "version": "2.0",

       "id": "206b13cc-a453-4102-a256-20a64f760e6d",

       "name": "Content2.png",

       "createdBy": "System Account",

       "creationTime": "2017-12-26T12:07:30",

       "modifiedBy": "System Account",

       "modificationTime": "2017-12-26T12:07:30",

       "_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/documents/206b13cc-a453-4102-a256-20a64f760e6d"

        },

        "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/67cdafbf-8c14-434e-a02d-a04f228e0086"

        }

       }

      }

      ],

      "from": "fromUser@example.com",

      "to" : "toUser@example.com",

      "subject" : "Send document",

      "text" : "Hello. It’s your document!"

     }

    }

     

    Response:

    200 OK

    Example 2

    The following request saves OneDrive documents.

    Request:

    POST https://<hostname>:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/Organization/OneDrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/Documents/action

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Request Body:

    {

     "save" :

     {

      "documents" :

      [

       {

       "sizeBytes": 80101,

       "inheritedPermissions": true,

       "version": "1.0",

       "id": "0e4079a2-faa5-41bf-b8a7-ba883308cbc9",

       "name": "Content1.jpg",

       "createdBy": "System Account",

       "creationTime": "2017-04-09T09:12:59",

       "modifiedBy": "System Account",

       "modificationTime": "2017-04-09T09:12:59",

       "_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/documents/0e4079a2-faa5-41bf-b8a7-ba883308cbc9"

        },

        "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"

        }

       }

      },

      {

       "sizeBytes": 1040384,

       "inheritedPermissions": true,

       "version": "2.0",

       "id": "206b13cc-a453-4102-a256-20a64f760e6d",

       "name": "Content2.png",

       "createdBy": "System Account",

       "creationTime": "2017-12-26T12:07:30",

       "modifiedBy": "System Account",

       "modificationTime": "2017-12-26T12:07:30",

       "_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/documents/206b13cc-a453-4102-a256-20a64f760e6d"

        },

        "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/67cdafbf-8c14-434e-a02d-a04f228e0086"

        }

       }

      }

      ]

     }

    }

     

    Response:

    200 OK

    Example 3

    The following request restores OneDrive documents.

    Request:

    POST https://<hostname>:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/Organization/OneDrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/Documents/action

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Request Body:

    {

     "restoretooriginallocation" :

     {

      "documents" :

      [

       {

       "sizeBytes": 80101,

       "inheritedPermissions": true,

       "version": "1.0",

       "id": "0e4079a2-faa5-41bf-b8a7-ba883308cbc9",

       "name": "Content1.jpg",

       "createdBy": "System Account",

       "creationTime": "2017-04-09T09:12:59",

       "modifiedBy": "System Account",

       "modificationTime": "2017-04-09T09:12:59",

       "_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/documents/0e4079a2-faa5-41bf-b8a7-ba883308cbc9"

        },

        "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"

        }

       }

      },

      {

       "sizeBytes": 1040384,

       "inheritedPermissions": true,

       "version": "2.0",

       "id": "206b13cc-a453-4102-a256-20a64f760e6d",

       "name": "Content2.png",

       "createdBy": "System Account",

       "creationTime": "2017-12-26T12:07:30",

       "modifiedBy": "System Account",

       "modificationTime": "2017-12-26T12:07:30",

       "_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/documents/206b13cc-a453-4102-a256-20a64f760e6d"

        },

        "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/67cdafbf-8c14-434e-a02d-a04f228e0086"

        }

       }

      }

      ],

      "userName" : "admin",

      "userPassword" : "12345678",

      "documentVersion" : "last",

      "documentAction" : "keep"

     }

    }

     

    Response:

    200 OK

    Example 4

    The following request copies OneDrive documents.

    Request:

    POST https://<hostname>:4443/v5/RestoreSessions/61954db6-7278-4d26-86f7-888bda5a4ec4/Organization/OneDrives/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/Documents/action

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Request Body:

    {

     "copyTo" :

     {

      "documents" :

      [

       {

       "sizeBytes": 80101,

       "inheritedPermissions": true,

       "version": "1.0",

       "id": "0e4079a2-faa5-41bf-b8a7-ba883308cbc9",

       "name": "Content1.jpg",

       "createdBy": "System Account",

       "creationTime": "2017-04-09T09:12:59",

       "modifiedBy": "System Account",

       "modificationTime": "2017-04-09T09:12:59",

       "_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/documents/0e4079a2-faa5-41bf-b8a7-ba883308cbc9"

        },

        "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"

        }

       }

      },

      {

       "sizeBytes": 1040384,

       "inheritedPermissions": true,

       "version": "2.0",

       "id": "206b13cc-a453-4102-a256-20a64f760e6d",

       "name": "Content2.png",

       "createdBy": "System Account",

       "creationTime": "2017-12-26T12:07:30",

       "modifiedBy": "System Account",

       "modificationTime": "2017-12-26T12:07:30",

       "_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/documents/206b13cc-a453-4102-a256-20a64f760e6d"

        },

        "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/67cdafbf-8c14-434e-a02d-a04f228e0086"

        }

       }

      }

      ],

      "userName" : "admin",

      "userPassword" : "12345678",

      "documentVersion" : "all",

      "folder" : "pictures",

      "oneDrive" : {

       "id": "724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11",

       "name": "CopyTo User",

       "url": "http://server/personal/orgUser",

       "_links": {

        "self": {

         "href": "https://support.north.local:4443/v5/organizations/a602e179-a821-4544-b653-f4aa03b39817/users/00000000-0000-0000-0000-000000000000d6d5c441-6c14-411a-9147-53f31a16d225AQUAAAAAAAUVAAAApgPzBIixQ2kafNW0dAQAAA==/onedrives/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11"

        },

        "user": {

         "href": "https://support.north.local:4443/v5/organizations/a602e179-a821-4544-b653-f4aa03b39817/users/00000000-0000-0000-0000-000000000000d6d5c441-6c14-411a-9147-53f31a16d225AQUAAAAAAAUVAAAApgPzBIixQ2kafNW0dAQAAA=="

        }

       }

      }

     

     }

    }

     

    Response:

    200 OK