Class: Api::V2::SampleMetadataResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::SampleMetadataResource
- Defined in:
- app/resources/api/v2/sample_metadata_resource.rb
Overview
Figure out how to send a POST for a sample with sample metadata association. Currently, it is possible to create a sample and sample metadata seperately, but they are not associated with each other. How do you create the association, either in one request or after the individual requests?
Access this resource via the /api/v2/sample_metadata/
endpoint.
Provides a JSON:API representation of Sample::Metadata which contains additional metadata related to a Sample.
A Sample represents the life of a DNA/RNA sample as it moves through processes. It may exist in multiple receptacles as aliquots. Sample tracks aspects that are always true, like its origin.
For more information about JSON:API see the JSON:API Specifications or look at the JSONAPI::Resources package for Sequencescape's implementation of the JSON:API standard.
Instance Attribute Summary collapse
-
#cohort ⇒ String
The cohort to which the sample belongs.
-
#collected_by ⇒ String
The name of the organization or person that collected the sample.
-
#concentration ⇒ String
The concentration of the sample, typically measured in ng/µL.
-
#date_of_sample_collection ⇒ DateTime
The date and time when the sample was collected.
-
#donor_id ⇒ String
The unique identifier assigned to the sample donor.
-
#gender ⇒ String
The gender of the organism providing the sample (e.g., Male, Female, Unknown).
-
#sample_common_name ⇒ String
The common name of the organism from which the sample was derived (e.g., Homo sapiens).
-
#sample_description ⇒ String
A textual description of the sample.
-
#supplier_name ⇒ String
The name of the supplier that provided the sample.
-
#volume ⇒ String
The volume of the sample, typically measured in µL.
Instance Method Summary collapse
-
#filter_sample_id(value) ⇒ SampleMetadataResource
Filters sample metadata by
sample_id
, allowing users to retrieve metadata for a specific sample.
Methods inherited from BaseResource
apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations, updatable_fields
Instance Attribute Details
#cohort ⇒ String
Returns The cohort to which the sample belongs.
62 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 62 attribute :cohort |
#collected_by ⇒ String
Returns The name of the organization or person that collected the sample.
66 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 66 attribute :collected_by |
#concentration ⇒ String
Returns The concentration of the sample, typically measured in ng/µL.
74 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 74 attribute :concentration |
#date_of_sample_collection ⇒ DateTime
Returns The date and time when the sample was collected.
70 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 70 attribute :date_of_sample_collection |
#donor_id ⇒ String
Returns The unique identifier assigned to the sample donor.
78 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 78 attribute :donor_id |
#gender ⇒ String
Returns The gender of the organism providing the sample (e.g., Male, Female, Unknown).
82 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 82 attribute :gender |
#sample_common_name ⇒ String
Returns The common name of the organism from which the sample was derived (e.g., Homo sapiens).
86 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 86 attribute :sample_common_name |
#sample_description ⇒ String
Returns A textual description of the sample.
90 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 90 attribute :sample_description |
#supplier_name ⇒ String
Returns The name of the supplier that provided the sample.
94 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 94 attribute :supplier_name |
#volume ⇒ String
Returns The volume of the sample, typically measured in µL.
98 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 98 attribute :volume |
Instance Method Details
#filter_sample_id(value) ⇒ SampleMetadataResource
Filters sample metadata by sample_id
, allowing users to retrieve metadata for a specific sample.
112 |
# File 'app/resources/api/v2/sample_metadata_resource.rb', line 112 filter :sample_id |