Adding Samples to the System
Prerequisites
Code example
Step 1. Create a New Project
def builder = new StreamingMarkupBuilder()
builder.encoding = "UTF-8"
String openDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date())
// Create a new project using the Markup Builder
def projectDoc = builder.bind {
mkp.xmlDeclaration()
mkp.declareNamespace(prj: 'http://genologics.com/ri/project')
'prj:project' {
'name'("${projectName}")
'open-date'("${openDate}")
'researcher'(uri:researcherURI)
}
}
// Post the new project to the API
createdProjectNode = GLSRestApiUtils.xmlStringToNode(projectDoc.toString())
createdProjectNode = GLSRestApiUtils.httpPOST(createdProjectNode, "${projectListURI}", username, password)
println GLSRestApiUtils.nodeToXmlString(createdProjectNode)Step 2. Create a New Container
Step 3. Create a New Sample
Expected Output and Results
Attachments
Last updated
Was this helpful?

