Delete object
Deletes an object at the specified path
- Parameters
- Advanced call ?
Function DeleteObject(Val Token, Val Path, Val ToCart = True) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
| Path | --path | String | ✔ | Path to the folder or file to be deleted |
| ToCart | --can | Boolean | ✖ | To cart |
Returns
Map Of KeyAndValue - serialized JSON response from Yandex
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Token = "y0__xCOranuBRj1uTsgs8z_iRV...";
Path = "/ec98cf96-9738-40a1-b9bc-a24a2f049cb0.png";
Result = OPI_YandexDisk.DeleteObject(Token, Path, False);
- Bash
- CMD/Bat
oint yadisk DeleteObject \
--token "***" \
--path "/song.mp3" \
--can false
oint yadisk DeleteObject ^
--token "***" ^
--path "/song.mp3" ^
--can false
Result
{}