Dynamically create a folder

LabKey Support Forum (Inactive)
Dynamically create a folder charlotte.raillere  2012-10-09 08:45
Status: Closed
 
Hello,

I would like to know if it is possible to dynamically create a folder (project, study…). I do not see any information in the different LabKey APIs.
The idea would be for instance to create a module which would allow a user (with no administrator privileges) to create a folder with predefined type and modules.

Thank you,
Charlotte.
 
 
jeckels responded:  2012-10-09 13:14
Hi Charlotte,

If you're using the JavaScript APIs, you can use LABKEY.Security.createContainer(). If you're using Java, the equivalent API is org.labkey.remoteapi.security.CreateContainerCommand.

Whatever language you are using, the user invoking the API will need to be a site admin to create a project, or at least a project admin to create a folder. This is the same permission requirements as using the standard user interface.

Thanks,
Josh