Skip to main content

Delete object

Deletes an object at the specified path

Function DeleteObject(Val Token, Val Path, Val ToCart = True) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Path--pathStringPath to the folder or file to be deleted
ToCart--canBooleanTo cart

Returns: Map Of KeyAndValue - serialized JSON response from Yandex


1C:Enterprise/OneScript code example
    Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
Path = "/0a96389a-961f-4292-adb3-1d0f51dfc073.png";

Result = OPI_YandexDisk.DeleteObject(Token, Path, False);
    oint yadisk DeleteObject \
--token "***" \
--path "/b7d1a71e-9c6c-47c7-853b-ecbcb0b41f80.png" \
--can false
Result
null