labels

List labels

Lists all sample labels on the instance. Pagination is not supported; all labels are included in the response.

Errors

StatusDescription
400 Invalid query

Request

get
/labels

Response

{
  "status": "200"
}

Create a label

Creates a new sample label.

The color must be a valid hexadecimal code.

Parameters

Name Type Required Description
color string false color of the label
description string false description of the document
name string true unique name for the label document

Errors

StatusDescription
400 Invalid Input

Request

post
/labels
{
  "color": "#374151",
  "description": "dsRNA/binding protein",
  "name": "Binding protein"
}

Response

{
  "example": {
    "color": "#374151",
    "count": 0,
    "description": "dsRNA/binding protein",
    "id": 23,
    "name": "Binding protein"
  },
  "status": "201"
}

Delete a label

Deletes an existing sample label.

Request

delete
/labels/{label_id}

Get a label

Fetches the details for a sample label.

Errors

StatusDescription
404 Not found

Request

get
/labels/{label_id}

Response

{
  "example": {
    "color": "#6B7280",
    "count": 0,
    "description": "dsRNA/Ab",
    "id": 22,
    "name": "Ab"
  },
  "status": "200"
}

Update a label

Updates an existing sample label.

Parameters

Name Type Required Description
color string false A hexadecimal color for the label
description string false A longer description for the label
name string false A short display name

Errors

StatusDescription
400 Invalid input
404 Not found

Request

patch
/labels/{label_id}
{
  "color": "#93C5FD",
  "description": "Field samples from 2022 harvest",
  "name": "Blueberry 2022"
}

Response

{
  "example": {
    "color": "#93C5FD",
    "count": 0,
    "description": "Field samples from 2022 harvest",
    "id": 22,
    "name": "Blueberry 2022"
  },
  "status": "200"
}