×

Other user’s folders list

This API returns the folders accessible to a specified user.

How to get data

Request address

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

Request method

GET or POST

Request parameters

  • cmd=get_folders_user — command to get the list of folders
  • user_id — user ID (required when requesting folders for another user)
  • node — node number where the command should be executed (optional)
    For POST requests, parameters can be sent in the request body as JSON
 

Example GET request

https://<server_address>/api/api.php?cmd=get_folders_user&user_id=19&node=1

Example POST request

{
    "cmd": "get_folders_user",
    "user_id": 19
}
Response
{
  "code": 0,
  "msg": "Success",
  "data": [
    {"id":1,"name":"DEMO"},
    {"id":6,"name":"IP Emelyanov"},
    {"id":11,"name":"FOLDER1"},
    {"id":12,"name":"FOLDER2"}
  ]
}
In response to the API request, the following is returned:
  • code — result code (0 — successful operation)
  • msg — server message
  • data — array of folders accessible to the user:
  • id — folder ID
  • name — folder name