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 = "/164f5737-5e1c-4547-8306-ce78aaebce6b.png";

Result = OPI_YandexDisk.DeleteObject(Token, Path, False);
    oint yadisk DeleteObject \
--token "***" \
--path "/96b215c7-48f6-474d-b84e-8d3230a39131.png" \
--can false
Result
null