REST API

/{version}/samples/{limsid}

The following operations are supported on this resource:

GET

Gets the representation of the sample.

Parameters

name description type default
limsid The LIMS ID of the sample to retrieve. path

Output Payload

element produceable content type(s)
sample (XML)
  • application/xml
description
The representation of the sample.

PUT

Updates the mutable values for a sample.

Only a subset of the sample's attributes can be modified. Unmodifiable attributes will be ignored.

The following attributes of a sample can be modified:

  • name: The name attribute must be provided, but can be modified
  • date-received
  • date-completed
  • field: The entire set of fields must be provided. Fields can be added or removed.
  • type: The type and all fields must be provided. The type can be changed, and fields can be added or removed from the type.

The following attributes of a sample can no longer be modified:

  • biosource: this field is deprecated and is not supported in Clarity
  • file: files can no longer be modified through the PUT operation and changes will be ignored, the "files" resource should be used instead. Files attached to a Sample are still visible in the payload returned by a GET.

Parameters

name description type default
limsid The LIMS ID of the sample to update. path

Input Payload

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

Output Payload

element produceable content type(s)
sample (XML)
  • application/xml
description
The current representation of the sample, after modifiable attributes have been updated.

GET

Gets the representation of the sample.

Parameters

name description type default
limsid The LIMS ID of the sample to retrieve. path

Output Payload

element produceable content type(s)
sample (XML)
  • application/xml
description
The representation of the sample.

PUT

Updates the mutable values for a sample.

Only a subset of the sample's attributes can be modified. Unmodifiable attributes will be ignored.

The following attributes of a sample can be modified:

  • name: The name attribute must be provided, but can be modified
  • date-received
  • date-completed
  • field: The entire set of fields must be provided. Fields can be added or removed.
  • type: The type and all fields must be provided. The type can be changed, and fields can be added or removed from the type.

The following attributes of a sample can no longer be modified:

  • biosource: this field is deprecated and is not supported in Clarity
  • file: files can no longer be modified through the PUT operation and changes will be ignored, the "files" resource should be used instead. Files attached to a Sample are still visible in the payload returned by a GET.

Parameters

name description type default
limsid The LIMS ID of the sample to update. path

Input Payload

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

Output Payload

element produceable content type(s)
sample (XML)
  • application/xml
description
The current representation of the sample, after modifiable attributes have been updated.

/{version}/samples/{limsid}

Home

REST Endpoints

XML Data Elements

XML Data Types