×
We value your feedback! Please click here to access our 2024 Client Survey.
The survey will remain open until November 1st. Your perspective will help guide our product/service planning and goals for the upcoming year and beyond!

Java API Client able to add studies to StudyProperties query

LabKey Support Forum
Java API Client able to add studies to StudyProperties query Matthew Bellew  2012-03-05 11:14
Status: Closed
 
I'm pretty sure we can get this to work pretty well, but I think this requires a long answer. First, you can always call our URLs directly to invoke the functionality of the server. There are cases when useful functionality has not yet been wrapped as a documented javascript API, or where it's awkward to wrap it.

In this case folder creation can be accomplished by posting to "/{contextPath}/admin/{parent folder path}/createFolder.api". This action expects there parameters:

        String name;
        String folderType
        String activeModules[]
        String defaultModule

Likewise a study can be imported either by posting a study archive file or a path to study archive file using "{contextPath}/study/{path}/importStudy.api" (or importStudyFromPipeline.api).

ImportStudy just takes a multi-part encode POST with one file for the study archive.

NOTE that in 12.1 we are releasing a "folder archive" feature similar to the study archive feature. This might be useful as you can create a template folder and then export it. This would capture folder type, active modules, default web part layouts, etc.

Then you would simply post the folder archive, followed by the study archive.

It might be easiest to prototype this with and HTML/Javascript page, using form posts, then translate the result into working Java code. Feel free to follow up with me in email or on the phone to get this working.

Matt