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-10-08 00:46:26 +03:00
Version = "64095bedcbb7cbd841553";
Token = "sl.u.AGCV5bFAEGMHdc0cW0wuRSU8nduEEjAsajtP1ta3Vw4D6k7ivqMiVj2QuaBqy1n9RZhUrftIcKDKh8XtftjcKoA4KBUyY3W5fiUANoMPG6j3Q7Cj--vAoOk9aDWk2ZvsDH_hLA1L5-PlvgA4SyTbNJb8QK3AJh4UX71iKOJUYtb1YDy81VRf4XWiBHyXMoD14rr07VggYfiAIHaMpgJUxkwVSGbiPxD7UlBK8zJC5kwOJqBss7pc5i7Tslne5nt2fno80MmEV_EJoi75M5kpCP2CdLEdChfFLwFNADZq6ox3OGxJ4d8TFI6aZ7Ue1yGJd67Ye2LJ3GnmpkdcKyH1Ovh_sV4slW46OLh1dJQbFdNrgILYXHaoJJrMDJodn6YR8cTWmWQ7IIlw-trIEcIBbPzPtiI3F7xW_5KGD7C3NkmDaCUD4PBnaWI-XplRHQR_RQjMTqW3SWO0sg6RcriVDAKyA6RB8zS6qwfwj23i1RwDM0e2nwrgl6XG9RSKhGYHy1jj2d_YAU9vxw61x2VFF1ILNS7833SYZ5kIDrjjhqUeKD5MoCAz6YxyE0xfSZhRZ4B8ONLeSf6SOOYVSKLi4DxMxurzFC90j0u6KFVsdYiUfeoTXarehRMafAbSnszOJcXQqevbDfsGKtbbHFQUyCaoUkia90jKnIB5W1q2Ksp1QKUcKudSiCPRT7DPRXE1LGK2WsjfmdMJyqbBSb86Yfa0ZJ8i0QT...";
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-10-10 09:59:43 +03:00
--rev "640a8dc0db7e7bd841553"
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-10-10 09:59:43 +03:00
--rev "640a8dc0db7e7bd841553"
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",
2025-10-10 09:59:43 +03:00
"id": "id:kJU6-a-pT48AAAAAAABZwA",
"client_modified": "2025-10-09T21:07:20Z",
"server_modified": "2025-10-09T21:07:20Z",
"rev": "640c02fd76b94bd841553",
2024-10-15 10:16:04 +03:00
"size": 2114023,
"is_downloadable": true,
"content_hash": "0f3b18c255b0f252bd326cacc04c15c3aa57bd6b8234adb65aa7bb2987a65492"
}
```