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 = "/ffee2803-bb02-480f-9196-b353e34699e7.png";

Result = OPI_YandexDisk.DeleteObject(Token, Path, False);
    oint yadisk DeleteObject \
--token "***" \
--path "/4b3a15e9-6bd8-499d-b1db-e053ca1b12ff.png" \
--can false
Result
null