--- sidebar_position: 14 description: Restore object to version and other functions to work with Dropbox in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Dropbox] --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Restore object to version Restores object state to required version (revision) `Function RestoreObjectToVersion(Val Token, Val Path, Val Version) Export` | Parameter | CLI option | Type | Required | Description | |-|-|-|-|-| | Token | --token | String | ✔ | Token | | Path | --path | String | ✔ | Path to the object | | Version | --rev | String | ✔ | ID of the version (revision) for restoration | Returns: Map Of KeyAndValue - serialized JSON response from Dropbox
```bsl title="1C:Enterprise/OneScript code example" Version = "637af23830dc2bd841553"; Token = "sl.u.AFx3xJ8vKk_iOFjd_Ai8fMxdb1Zh9ZXF6tc-dS5Au_flXMLubRd9LIgMPlbrGCxPOPSPxRLBrkezLbG0-Y3yMZXpZ0Cc6Gi2noPDY8DWzT3lN0A9z0_x6fXCxLGGDOsuzPOmvQHfRrwMzsJtONBZaZGFE08bvBdNfAkH6nLgOAYyAOEWJHdbwW9PbneOd0DUd6L48Br3yHsk-tEc3lb3rbqje9ox1DnC5dN-P8ZuagEggKDK59ZWFjBeLDkWylL4lKU0hMxwRvidX2JNqYkDXKekYk4mxJM57FKqvgvexBV2B140QS3u0zMd359cAPKdhEwv01DkBZvrS2PdVN-ay747QoaboNL2xA0xJ2ScSAyVfxkgaJsoOeFB7R19WbFNQqiLc68ZtuqGzyn6Hime5sXyrUt9E5trukJ714pVhJsoHUDEw0xk0xtHoeVJfwH6ewi0lw2SZETjMl4rCm9a16Is89bwhEKVv5DK4PHyHJxNuo5aCuGc7EAg1eCBYG2yMlM2bGBEP1Xs2SOvRu_eNw41860qaLJa5DgZg1atGMiKXMPSZ8Qt_GxaG0ALnxOnwee2a28O3Vuc1izUpsIv-iBGC9JO5mAWckZAD1n-CcBl2CjP_TbPomqbxOlCZe0yW-Rz_prVL73y9-cjSP3b6UG8zgwt3oIBGw1dyBUzXeRhI9emvTvjimwL0wjtdY2pZF-AX9UTTDRmSw9eeW_gZuR8fD8OYbr..."; Path = "/New/pic.png"; Result = OPI_Dropbox.RestoreObjectToVersion(Token, Path, Version); ``` ```bash oint dropbox RestoreObjectToVersion \ --token "***" \ --path "/New/pic.png" \ --rev "636c3ab6b8806bd841553" ``` ```batch oint dropbox RestoreObjectToVersion ^ --token "***" ^ --path "/New/pic.png" ^ --rev "636c3ab6b8806bd841553" ``` ```json title="Result" { "name": "pic.png", "path_lower": "/new/pic.png", "path_display": "/New/pic.png", "id": "id:kJU6-a-pT48AAAAAAAAckw", "client_modified": "2024-10-09T06:15:59Z", "server_modified": "2024-10-09T06:15:59Z", "rev": "62405300c4139bd841553", "size": 2114023, "is_downloadable": true, "content_hash": "0f3b18c255b0f252bd326cacc04c15c3aa57bd6b8234adb65aa7bb2987a65492" } ```