v1

latestOpenAPI 3.1.02026-07-267418115.3 KB

PATCH metadata

patch/api/v1/metadata/{id}

Path parameters

idstring required

Request body

customobject nullable

Arbitrary metadata is supported as part of a custom object. custom has two constraints: (1) it must have a depth of one (i.e., no nested records); and (2) only strings, numbers, boolean, and null values are supported as values. Example: {"lab_tech": "Linus Pauling", "amplicon_scheme": "V3-V4"}

date_collectedstring date-time nullable

Timestamp for when the sample was collected.

date_sequencedstring date-time nullable

Timestamp for when the sample was sequenced.

descriptionstring nullable
external_sample_idstring nullable

An arbitrary external sample ID, e.g., an ID in a LIMS. Up to 60 characters.

library_type'WGS' | 'Targeted/16S' | 'Other' nullable

Allowed types of SampleMetadata.library_type. Also used to populate form dropdown in the front-end

location_latnumber nullable

The latitude (-90.0-90.0) of the sample location. By convention, we recommend using this for the location in which the physical specimen was collected.

location_lonnumber nullable

The longitude (-180.0-180.0) of the sample location.

location_stringstring nullable
namestring nullable
platform'454 sequencing' | '454 GS FLX' | '454 GS FLX Titanium' | 'Illumina' | 'Illumina Genome Analyzer II' | 'Illumina HiSeq' | 'Illumina HiSeq 1500' | 'Illumina HiSeq 2000' | 'Illumina HiSeq 2500' | 'Illumina HiSeq 3000' | 'Illumina HiSeq 4000' | 'Illumina HiSeq X' | 'Illumina iSeq 100' | 'Illumina MiniSeq' | 'Illumina MiSeq' | 'Illumina NextSeq' | 'Illumina NextSeq 500' | 'Illumina NextSeq 550' | 'Illumina NovaSeq' | 'Illumina NovaSeq 5000' | 'Illumina NovaSeq 6000' | 'BGISEQ' | 'BGISEQ 50' | 'Element' | 'Element AVITI' | 'Ion' | 'Ion S5' | 'Ion S5 XL' | 'Ion PGM' | 'Ion Proton' | 'Ion Torrent' | 'Oxford Nanopore' | 'Oxford Nanopore GridION X5' | 'Oxford Nanopore MinION' | 'Oxford Nanopore PromethION' | 'PacBio' | 'PacBio RS II' | 'PacBio Sequel' | 'PacBio Sequel II System' | 'PacBio Revio' | 'PacBio Onso' | 'SOLiD' | 'Solexa Genome Analyzer' | 'Sanger' | 'Other' nullable

Allowed values of SampleMetadata.platform.

sample_type'Isolate' | 'Metagenomic' | 'Other' nullable

Allowed values for SampleMetadata.sample_type. Used to populate values in the front-end dropdown

starredboolean nullable

Whether the sample has been starred by the user within the One Codex web application.

Example request

{
  "external_sample_id": "LIMS-2024-00123"
}

Response

OK

$uristring required
customobject nullable

Arbitrary metadata is supported as part of a custom object. custom has two constraints: (1) it must have a depth of one (i.e., no nested records); and (2) only strings, numbers, boolean, and null values are supported as values. Example: {"lab_tech": "Linus Pauling", "amplicon_scheme": "V3-V4"}

date_collectedstring date-time nullable

Timestamp for when the sample was collected.

date_sequencedstring date-time nullable

Timestamp for when the sample was sequenced.

descriptionstring nullable
external_sample_idstring nullable

An arbitrary external sample ID, e.g., an ID in a LIMS. Up to 60 characters.

library_type'WGS' | 'Targeted/16S' | 'Other' nullable

Allowed types of SampleMetadata.library_type. Also used to populate form dropdown in the front-end

location_latnumber nullable

The latitude (-90.0-90.0) of the sample location. By convention, we recommend using this for the location in which the physical specimen was collected.

location_lonnumber nullable

The longitude (-180.0-180.0) of the sample location.

location_stringstring nullable
namestring nullable
platform'454 sequencing' | '454 GS FLX' | '454 GS FLX Titanium' | 'Illumina' | 'Illumina Genome Analyzer II' | 'Illumina HiSeq' | 'Illumina HiSeq 1500' | 'Illumina HiSeq 2000' | 'Illumina HiSeq 2500' | 'Illumina HiSeq 3000' | 'Illumina HiSeq 4000' | 'Illumina HiSeq X' | 'Illumina iSeq 100' | 'Illumina MiniSeq' | 'Illumina MiSeq' | 'Illumina NextSeq' | 'Illumina NextSeq 500' | 'Illumina NextSeq 550' | 'Illumina NovaSeq' | 'Illumina NovaSeq 5000' | 'Illumina NovaSeq 6000' | 'BGISEQ' | 'BGISEQ 50' | 'Element' | 'Element AVITI' | 'Ion' | 'Ion S5' | 'Ion S5 XL' | 'Ion PGM' | 'Ion Proton' | 'Ion Torrent' | 'Oxford Nanopore' | 'Oxford Nanopore GridION X5' | 'Oxford Nanopore MinION' | 'Oxford Nanopore PromethION' | 'PacBio' | 'PacBio RS II' | 'PacBio Sequel' | 'PacBio Sequel II System' | 'PacBio Revio' | 'PacBio Onso' | 'SOLiD' | 'Solexa Genome Analyzer' | 'Sanger' | 'Other' nullable

Allowed values of SampleMetadata.platform.

sample_type'Isolate' | 'Metagenomic' | 'Other' nullable

Allowed values for SampleMetadata.sample_type. Used to populate values in the front-end dropdown

starredboolean

Whether the sample has been starred by the user within the One Codex web application.

updated_atstring date-time nullable

Timestamp for when the object was last updated on the One Codex platform, encoded as a RFC 3339 timestamp.

Example response

{
  "$uri": "/api/v1/metadata/0d77065796f8d173",
  "external_sample_id": "LIMS-2024-00123",
  "sample": {
    "__DOLLAR_REF__": "/api/v1/samples/a1b2c3d4e5f67890"
  }
}