Maytech Public Documentation
Space shortcuts
Skip to end of metadata
Go to start of metadata

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:

  1.  Log in to the account using GET /session/login.

  2.  Get id from GET /file/metadata.

  3.  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.

  4. Get a list of users available for sharing the given project folder with GET /account/roles.

  5. 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:

 Expand parameters
  • user_id - the ID of the user you want to create a project folder with from GET /account/roles,


  • operations - permissions that the user has to perform with files. See file permissions below.
  • notify (optional) - notify the user about changes in the project folder.

list of json

-

list of user permissions by given user ID.

notify

booleanfalse

true or false

Select true to notify user(s) about the project folder creation/edition.

 * required parameters

File permissions

Permission/actionuploaddownloadmake directorydeleterenameshareautomationquick link
LIST00000000
READ01000000
WRITE11111000
SHARE11111100
OWNER11111111


If the call returns a 400 response, some of the required request body parameters are lacking e.g. name, file ID or user permissions.


Request Payload

{
  "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
}


Response Body

{
  "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.

 

  • No labels