#Files

Entity: diskFile | Scope: disk | Base path: /v1/files

Legacy entity (UPPER_CASE field names) — field names are automatically converted to camelCase.

#Operations

Method Path Description Bitrix24 Method
GET /v1/files List all (with filter, sort, pagination) disk.file.getlist
GET /v1/files/:id Get by ID disk.file.get
PATCH /v1/files/:id Update by ID disk.file.rename
DELETE /v1/files/:id Delete by ID disk.file.markdeleted
GET /v1/files/fields Get available fields disk.file.getFields

Disabled operations: create

#Fields

API Name Bitrix24 Name Type Readonly Description
id ID number yes Идентификатор записи
name NAME string Имя файла
size SIZE number yes Размер в байтах
folderId FOLDER_ID number ID папки
storageId STORAGE_ID number yes
type TYPE string yes
downloadUrl DOWNLOAD_URL string yes URL для скачивания
createdBy CREATE_USER_ID number yes ID создателя
updatedBy UPDATE_USER_ID number yes
createdAt CREATE_TIME datetime yes Дата создания
updatedAt UPDATE_TIME datetime yes Дата изменения

#Relations (reference)

Relation Entity Type Foreign Key
folder diskFolder one folderId

#Examples

#List

Terminal
curl -X GET '/v1/files?limit=10' \
  -H 'X-Api-Key: YOUR_KEY'

#Get by ID

Terminal
curl -X GET '/v1/files/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Update

Terminal
curl -X PATCH '/v1/files/123' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"title":"updated"}'

#Delete

Terminal
curl -X DELETE '/v1/files/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Batch

Terminal
curl -X POST '/v1/batch' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"calls":[{"entity":"files","action":"list","params":{"limit":5}}]}'