2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 14
2025-05-05 11:15:20 +03:00
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
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Dropbox]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Restore object to version
Restores object state to required version (revision)
`Function RestoreObjectToVersion(Val Token, Val Path, Val Version) Export`
2024-10-15 15:15:47 +03:00
| 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 |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Dropbox
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-06-16 20:10:00 +03:00
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...";
2024-10-15 10:16:04 +03:00
Path = "/New/pic.png";
Result = OPI_Dropbox.RestoreObjectToVersion(Token, Path, Version);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint dropbox RestoreObjectToVersion \
2024-10-22 08:59:24 +03:00
--token "***" \
--path "/New/pic.png" \
2025-06-06 22:27:44 +03:00
--rev "636c3ab6b8806bd841553"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint dropbox RestoreObjectToVersion ^
2024-10-22 08:59:24 +03:00
--token "***" ^
--path "/New/pic.png" ^
2025-06-06 22:27:44 +03:00
--rev "636c3ab6b8806bd841553"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```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"
}
```