Skip to main content

Delete file

Delete file by ID

Function DeleteFile(Val URL, Val FileID, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
FileID--fileidString, NumberID of removing file
Token--tokenStringAccess token, when app auth method used

Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API


tip

Method at API documentation: disk.file.delete


1C:Enterprise/OneScript code example
    URL    = "https://b24-ar17wx.bitrix24.by/rest/1/yg2...";
FileID = "19570";

Result = OPI_Bitrix24.DeleteFile(URL, FileID);

URL = "b24-ar17wx.bitrix24.by";
Token = "2f4e4067006e9f06006b12e400000001000...";
FileID = "19572";

Result = OPI_Bitrix24.DeleteFile(URL, FileID, Token);
    oint bitrix24 DeleteFile \
--url "b24-ar17wx.bitrix24.by" \
--fileid 19812 \
--token "***"
Result
{
"result": true,
"time": {
"start": 1728454828.81245,
"finish": 1728454828.89366,
"duration": 0.0812110900878906,
"processing": 0.0537998676300049,
"date_start": "2024-10-09T09:20:28+03:00",
"date_finish": "2024-10-09T09:20:28+03:00",
"operating_reset_at": 1728455428,
"operating": 0.125946998596191
}
}