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 = "/09884c8b-d839-4e81-b6f7-3f9c93384af0.png";

Result = OPI_YandexDisk.DeleteObject(Token, Path, False);
    oint yadisk DeleteObject \
--token "***" \
--path "/67870eca-aa2d-403f-8093-6bf7b85f8872.png" \
--can false
Result
null