×

List of folders

This API is used to get the list of all folders available in the system. The response returns a list with unique folder IDs, their names, and their parent folders.
You can get either all folders or only those related to a specific account.

How to get data

Method

GET

Request address

To get the data, use the address: https://<server_address>/backend/api.php?

Request parameters

Required:
  • cmd=getfolders— command to retrieve the list of folders
  • node — the number of the node where the command should be executed
Optional:
  • account_id— account ID for which you want to retrieve the list of folders
 

Example request

Getting all folders:
https://<server_address>/backend/api.php?cmd=getfolders&node=1
Getting folders for a specific account:
https://<server_address>/backend/api.php?cmd=getfolders&account_id=3925
Response
{
  "9793": {"name": "АС-Капитал", "parent": "Колонна №1"},
  "11462": {"name": "Ленэнерго", "parent": "Колонна №1"},
  "12551": {"name": "Вектор", "parent": "test123"},
  "16453": {"name": "test_alex", "parent": "1april"},
  "18492": {"name": "31Novfolder", "parent": "Колонна №1"}
}
In response to the API request, the following is returned:
  • key (e.g., "9793") — unique folder ID
  • name — folder name
  • parent — parent folder to which the current folder belongs