---
sidebar_position: 1
description: Publish object and other functions to work with Yandex Disk 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, Yandex Disk]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Publish object
 Publishes the disk object for public access



`Function PublishObject(Val Token, Val Path) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | Path | --path | String | &#x2714; | Path to the object to be published |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Yandex



```bsl title="1C:Enterprise/OneScript code example"
    Token = "y0__xCOranuBRj1uTsgs8z_iRV...";
    Path  = "/53231757-ab12-4501-b64b-a5cb5cd65fbc.png";

    Result = OPI_YandexDisk.PublishObject(Token, Path);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint yadisk PublishObject \
             --token "***" \
             --path "/1ec77a3b-9df8-4d5d-a2e1-96f0a861d29c.png"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint yadisk PublishObject ^
             --token "***" ^
             --path "/1ec77a3b-9df8-4d5d-a2e1-96f0a861d29c.png"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "path": "disk:/1ec77a3b-9df8-4d5d-a2e1-96f0a861d29c.png",
 "type": "file",
 "name": "1ec77a3b-9df8-4d5d-a2e1-96f0a861d29c.png",
 "created": "2025-12-10T19:29:52+00:00",
 "modified": "2025-12-10T19:29:52+00:00",
 "size": 2114023,
 "mime_type": "multipart",
 "md5": "9e0176f87f6565a22f78e0f9b39a4d78",
 "sha256": "89f8eb42a35208a17c85036e17237b0aa0657e1841efa6171dc5acbc0dea9e18",
 "public_key": "***",
 "public_url": "https://yadi.sk/d/Hf_-jYnWVqinOA",
 "media_type": "image",
 "resource_id": "1573541518:01774cc84bd846fa7c3d409620245ba8cac0e2714097a53dd015d5c07c43511d",
 "revision": 1765395013516355,
 "comment_ids": {
  "public_resource": "1573541518:01774cc84bd846fa7c3d409620245ba8cac0e2714097a53dd015d5c07c43511d",
  "private_resource": "1573541518:01774cc84bd846fa7c3d409620245ba8cac0e2714097a53dd015d5c07c43511d"
 },
 "exif": {},
 "antivirus_status": "clean",
 "file": "https://downloader.disk.yandex.ru/disk/9a3329a18cdc06df524087d45d9e28190965032f0432a431541f173cc7b44512/693a0286/Kdpe3dFisZLPovVA4r-aBmpkby3AOQiLsayEHYapOMw2ylFGSbZZrsWtGPTvHxG_-QDrqSGFBOOsS3b3gKT1zA%3D%3D?uid=1573541518&filename=1ec77a3b-9df8-4d5d-a2e1-96f0a861d29c.png&disposition=attachment&hash=&limit=0&content_type=multipart&owner_uid=1573541518&fsize=2114023&hid=03d7263840468e281bd0b238a26e7d0d&media_type=image&tknv=v3&etag=9e0176f87f6565a22f78e0f9b39a4d78"
}
```
