GET
Displays a list of labs stored in the system. If the number of labs 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.
NOTE: Labs are referred to as Accounts in Clarity LIMS UIs.
Parameters
name | description | type | default |
---|---|---|---|
start-index | When working with large lists of labs, displays the labs from a set point. If omitted, the first page of results is returned. | query | 0 |
last-modified | Displays only the labs modified since the specified date, in YYYY-MM-DDThh:mm:ssTZD format. For more information on this format, please refer to the ISO 8601 Complete Date (plus hours, minutes and seconds) standard. | query | |
udf.UDFNAME[.OPERATOR]=UDFVALUE | Displays only labs that include the specified UDF value. The system will only return labs with standalone UDFs; it will not return labs with UDFs that belong to a UDT. | query | |
udt.name=UDTNAME | Displays only labs that include data for the specified UDT name. When filtering results, you can repeat this parameter. | query | |
udt.UDTNAME.UDFNAME[.OPERATOR]=UDFVALUE | Displays only labs that include the specified value for a UDF within a UDT. The system will only return labs with UDFs that belong to a UDT; it will not return labs with standalone UDFs. When filtering results, you can repeat this parameter. | query | |
name | Displays only labs whose name matches the specified value. When filtering results, you can repeat this parameter. | query |
Output Payload
element | produceable content type(s) |
---|---|
labs (XML) |
|
description | |
The system returns a response that includes a list of labs and URI links, starting from the start-index offset. |
POST
Creates a new lab in the system. When creating a new lab, you must do the following:
- You must provide a name for the lab.
NOTE: Labs are referred to as Accounts in Clarity LIMS UIs.
Here is an example <lab> in xml format. Note that the UDF and UDT elements are optional and must be pre-configured in the system.
<lab:lab xmlns:udf="http://genologics.com/ri/userdefined" xmlns:ri="http://genologics.com/ri" xmlns:lab="http://genologics.com/ri/lab">
<name>API Demo Lab</name>
<billing-address>
<street>Suite 2302 - 4464 Markham Street</street>
<city>Victoria</city>
<state>BC</state>
<country>Canada</country>
<postalCode>V8Z 7X8</postalCode>
<institution>GenoLogics</institution>
<department>Software Development</department>
</billing-address>
<shipping-address>
<street>Suite 2302 - 4464 Markham Street</street>
<city>Victoria</city>
<state>BC</state>
<country>Canada</country>
<postalCode>V8Z 7X8</postalCode>
<institution>GenoLogics</institution>
<department>Software Development</department>
</shipping-address>
<udf:type name="Lab UDT">
<udf:field type="String" name="Lab UDF under UDT">a demo value for Lab UDF under UDT</udf:field>
</udf:type>
<udf:field type="String" name="Lab standalone UDF">a demo value for Lab standalone UDF</udf:field>
<website>www.genologics.com</website>
</lab:lab>
Here is an example response in xml format:
<lab:lab xmlns:udf="http://genologics.com/ri/userdefined" xmlns:ri="http://genologics.com/ri" xmlns:lab="http://genologics.com/ri/lab" uri="http://qafunc03:8080/api/v2/labs/5">
<name>API Demo Lab</name>
<billing-address>
<street>Suite 2302 - 4464 Markham Street</street>
<city>Victoria</city>
<state>BC</state>
<country>Canada</country>
<postalCode>V8Z 7X8</postalCode>
<institution>GenoLogics</institution>
<department>Software Development</department>
</billing-address>
<shipping-address>
<street>Suite 2302 - 4464 Markham Street</street>
<city>Victoria</city>
<state>BC</state>
<country>Canada</country>
<postalCode>V8Z 7X8</postalCode>
<institution>GenoLogics</institution>
<department>Software Development</department>
</shipping-address>
<udf:type name="Lab UDT">
<udf:field type="String" name="Lab UDF under UDT">a demo value for Lab UDF under UDT</udf:field>
</udf:type>
<udf:field type="String" name="Lab standalone UDF">a demo value for Lab standalone UDF</udf:field>
<website>www.genologics.com</website>
</lab:lab>
Input Payload
element | consumeable content type(s) |
---|---|
lab (XML) |
|
description | |
The information about the lab you want to create. |
Output Payload
element | produceable content type(s) |
---|---|
lab (XML) |
|
description | |
When the lab is created, the system returns an HTTP 201 (Created) code with a response body that includes information about the newly created lab. |