REST API

/{version}/samples

The following operations are supported on this resource:

GET

Displays a list of samples stored in the system. In the client, these are referred to as Submitted Samples. If the number of samples returned exceeds the display maximum, the results are paged.

When submitting a GET request, you can use the following query parameters to filter the results. For more information about using query parameters, please refer to the Filtering list resources section under REST General Concepts.

Parameters

name description type default
start-index When working with large lists of results, displays the results from a set point. If omitted, the first page of results is returned. query 0
name Displays only the samples whose names match the specified value. When filtering results, you can repeat this parameter. query
udf.UDFNAME[.OPERATOR]=UDFVALUE Displays only samples that include the specified UDF value. The system will only return samples with standalone UDFs; it will not return samples with UDFs that belong to a UDT. When filtering results, you can repeat this parameter. query
udt.name=UDTNAME Displays only samples that include data for the specified UDT name. When filtering results, you can repeat this parameter. query
udt.UDTNAME.UDFNAME[.OPERATOR]=UDFVALUE Displays only samples that include the specified value for a UDF within a UDT. The system will only return samples with UDFs that belong to a UDT; it will not return samples with standalone UDFs. When filtering results, you can repeat this parameter. query
projectlimsid Displays only samples that belong to the project specified by the project LIMS ID. When filtering results, you can repeat this parameter. query
projectname Displays only samples that belong to the specified project name. When filtering results, you can repeat this parameter. query

Output Payload

element produceable content type(s)
samples (XML)
  • application/xml
description
The system returns a response that includes a list of samples and URI links, starting from the start-index offset.

POST

Creates a new sample.

When creating a new sample the following constraints are enforced:

  • A name must be provided when creating a sample.
  • The project for the sample must link to an existing project in the system.
  • A container location for the sample must link to an existing container in the system and refer to a valid well location.
  • A new LIMS ID will be allocated and assigned to the sample.

  • Example XML to add single sample with no udfs to an existing project and container, where the server is localhost. The project and container uri's will need to match your system. <?xml version="1.0" encoding="UTF-8"?> <smp:samplecreation xmlns:smp="http://genologics.com/ri/sample">   <name>Example Sample</name>   <project uri="http://localhost:8080/api/v2/projects/ADM243"></project>   <location>     <container uri="http://localhost:8080/api/v2/containers/27-100001"></container>     <value>1:1</value>   </location> </smp:samplecreation>
Note: control samples can be created during step creation. See the documentation on Step POST for details.

Input Payload

element consumeable content type(s)
samplecreation (XML)
  • */*
  • application/xml
description
The representation for the new sample.

Output Payload

element produceable content type(s)
samplecreation (XML)
  • application/xml
description
HTTP Status 201 (Created) with the URI to new sample in the Location header of the response. The representation for the newly created sample will be returned as the response body.

/{version}/samples

Home

REST Endpoints

XML Data Elements

XML Data Types