All users of the account that have files and permissions to share files can create project folders. In this guide you will learn how to create a project folder using our API calls.
To create a project folder, follow these steps:
Log in to the account using GET /session/login.
Get id from GET /file/metadata.
Create the directory with a target - home ID using POST /file/makedir.
If the target (location of the project folder) is not within the home folder of the user, follow these steps instead of this one: 3.1 Choose the required folder ID from the list provided in the response. 3.2 Get the folder content using GET /file/metadata. |
Get a list of users available for sharing the given project folder with GET /account/roles.
Create a project folder using POST /project-folder/create with the following parameters:
Name | Type | Default Value | Description | |
name* | string | - | name of the project folder that is displayed for other users | |
file_id* | string | - | the ID of the folder which you would like to convert to a Project Folder. You can get it from POST /file/makedir. | |
users_permissions:
| list of json | - | list of user permissions by given user ID. | |
notify | boolean | false | true or false Select true to notify user(s) about the project folder creation/edition. |
* required parameters
Permission/action | upload | download | make directory | delete | rename | share | automation | quick link |
---|---|---|---|---|---|---|---|---|
LIST | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
READ | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
WRITE | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
SHARE | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 |
OWNER | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
If the call returns a 400 response, some of the required request body parameters are lacking e.g. name, file ID or user permissions. |
{ "name": "PF-test", "file_id": "8e125cbc-00a6-4ebb-b054-57839503527d", "users_permissions": [ { "user_id": "0a4341a6-845c-4f14-8b62-a98b46ae8e25", "operations": 0, "notify": true } ], "notify": false } |
{ "created": 1537447530, "id": "e6e2a8e0-4721-489b-ae8a-c3184bb6f700", "name": "PF-test" } |
You can check out more examples here or explore them with your own data.