Create a folder
This API is used to create a new folder in the system. You can specify a parent folder, the name of the new folder, and user access rights.
How to get data
Method
POST
Request address
To get the data, use the address: https://<server_address>/backend/api.php?
Request parameters
Required:
-
cmd=addfolder — command to create a folder
-
account_id — account ID
-
parent_id — ID of the parent folder
-
folder_name — name of the new folder
-
node — the number of the node where the command should be executed
Optional:
-
users — comma-separated list of user IDs to grant access to the folder
-
users=admins — grants access to all administrators of the accountIf the parameter is missing or empty, the folder inherits access rights from the parent folder
Example requests
Grant access to all administrators:
https://<server_address>/backend/api.php?cmd=addfolder&account_id=5654&parent_id=654&folder_name=my_folder&users=admins&node=1
|
Grant access to specific users:
https://<server_address>/backend/api.php?cmd=addfolder&account_id=5654&parent_id=654&folder_name=my_folder&users=123,212,432&node=1
|
Create a folder with default parent folder rights:
https://<server_address>/backend/api.php?cmd=addfolder&account_id=5654&parent_id=654&folder_name=my_folder&node=1
|
Response
{
"success": "New folder my_folder has been created with ID 27330"
}
|