Class: V1::Pacbio::PlateResource

Inherits:
JSONAPI::Resource
  • Object
show all
Defined in:
app/resources/v1/pacbio/plate_resource.rb

Overview

Note:

Access this resource via the /v1/pacbio/plates/ endpoint.

Provides a JSON:API representation of Plate.

Filters: * barcode - Filter plates by their barcode.

Primary relationships: * wells - The wells associated with this plate.

curl -X POST localhost:3100/v1/pacbio/plates \ -H “Content-Type: application/vnd.api+json” \ -H “Accept: application/vnd.api+json” \ -d ‘{ “data”: { “type”: “plates”, “attributes”: { “barcode”: “GEN-1762592703-5” } } }’

Examples:

curl -X GET http://localhost:3100/v1/pacbio/plates
curl -X GET http://localhost:3100/v1/pacbio/plates?filter[barcode]=GEN-1762592703-5

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#barcodeString

Returns the barcode of the plate.

Returns:

  • (String)

    the barcode of the plate



36
# File 'app/resources/v1/pacbio/plate_resource.rb', line 36

attribute :barcode

#created_atString (readonly)

Returns the creation time of the plate.

Returns:

  • (String)

    the creation time of the plate



40
# File 'app/resources/v1/pacbio/plate_resource.rb', line 40

attribute :created_at, readonly: true

Class Method Details

.default_sortObject



46
47
48
# File 'app/resources/v1/pacbio/plate_resource.rb', line 46

def self.default_sort
  [{ field: 'created_at', direction: :desc }]
end

.records(_options = {}) ⇒ Object



52
53
54
# File 'app/resources/v1/pacbio/plate_resource.rb', line 52

def self.records(_options = {})
  super.by_pipeline(:pacbio)
end