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 = "/88ff2e96-3270-4216-b443-151f90e2ccec.png";

Result = OPI_YandexDisk.DeleteObject(Token, Path, False);
    oint yadisk DeleteObject \
--token "***" \
--path "/c2341bd7-db37-4e20-bf33-861fe70ebc09.png" \
--can false
Result
null