#Folders
Entity: diskFolder | Scope: disk | Base path: /v1/folders
Legacy entity (UPPER_CASE field names) — field names are automatically converted to camelCase.
#Operations
| Method | Path | Description | Bitrix24 Method |
|---|---|---|---|
GET |
/v1/folders |
List all (with filter, sort, pagination) | disk.folder.getchildren |
GET |
/v1/folders/:id |
Get by ID | disk.folder.get |
POST |
/v1/folders |
Create new | disk.folder.addsubfolder |
PATCH |
/v1/folders/:id |
Update by ID | disk.folder.rename |
DELETE |
/v1/folders/:id |
Delete by ID | disk.folder.markdeleted |
GET |
/v1/folders/fields |
Get available fields | disk.folder.getFields |
#Fields
| API Name | Bitrix24 Name | Type | Readonly | Description |
|---|---|---|---|---|
id |
ID |
number | yes | Идентификатор записи |
name |
NAME |
string | ||
parentId |
PARENT_ID |
number | ||
storageId |
STORAGE_ID |
number | yes | |
code |
CODE |
string | ||
createdBy |
CREATE_USER_ID |
number | yes | ID создателя |
createdAt |
CREATE_TIME |
datetime | yes | Дата создания |
#Relations (reference)
| Relation | Entity | Type | Foreign Key |
|---|---|---|---|
| storage | diskStorage |
one | storageId |
#Доступ из веб-интерфейса
Поле detailUrl в ответе GET /v1/folders и POST /v1/folders — полный URL карточки папки в Битрикс24, например https://<portal>.bitrix24.ru/company/personal/user/1/disk/path/<имя>/. Доступ ограничен правами сотрудника в Битрикс24.
#Examples
#List
curl -X GET '/v1/folders?limit=10' \
-H 'X-Api-Key: YOUR_KEY'
#Get by ID
curl -X GET '/v1/folders/123' \
-H 'X-Api-Key: YOUR_KEY'
#Create
curl -X POST '/v1/folders' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"name":"value","parentId":1,"code":"value"}'
#Update
curl -X PATCH '/v1/folders/123' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"updated"}'
#Delete
curl -X DELETE '/v1/folders/123' \
-H 'X-Api-Key: YOUR_KEY'
#Batch
curl -X POST '/v1/batch' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"calls":[{"entity":"folders","action":"list","params":{"limit":5}}]}'