Show the Relationship Between Samples and Analyte Artifacts (Derived Samples)
Code example
// Determine the analyte's URI and retrieve it
arbitraryAnalyteArtifactURI = "http://${hostname}/api/v2/artifacts/${artifactLIMSID}"
arbitraryArtifactNode = GLSRestApiUtils.httpGET(arbitraryAnalyteArtifactURI, username, password)
println GLSRestApiUtils.nodeToXmlString(arbitraryArtifactNode)
// Retrieve the analyte's sample
def rootSampleURI = arbitraryArtifactNode.'sample'[0].'@uri'
rootSampleNode = GLSRestApiUtils.httpGET(rootSampleURI, username, password)
println GLSRestApiUtils.nodeToXmlString(rootSampleNode)
// Retrieve the sample's root analyte
def rootAnalyteArtifactURI = rootSampleNode.'artifact'[0].'@uri'
rootAnalyteArtifactNode = GLSRestApiUtils.httpGET(rootAnalyteArtifactURI, username, password)
println GLSRestApiUtils.nodeToXmlString(rootAnalyteArtifactNode)Expected Output and Results
Attachments
Last updated
Was this helpful?
