Class: Api::V2::ProjectResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::ProjectResource
- Defined in:
- app/resources/api/v2/project_resource.rb
Overview
This resource is immutable: it does not accept POST
, PATCH
, or DELETE
requests.
Access this resource via the /api/v2/projects/
endpoint.
Provides a JSON:API representation of Project.
A Project represents a defined research or sequencing initiative within the system. It holds the cost code, for billing.
For more details on JSON:API, see the JSON:API Specifications or check out the JSONAPI::Resources package for Sequencescape's implementation.
Instance Attribute Summary collapse
-
#cost_code ⇒ String
The financial cost code associated with the project.
-
#name ⇒ String
The name of the project.
-
#uuid ⇒ String
readonly
The universally unique identifier (UUID) of project.
Instance Method Summary collapse
-
#filter_by_name ⇒ Object
Allows filtering projects by name.
Methods inherited from BaseResource
apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations, updatable_fields
Instance Attribute Details
#cost_code ⇒ String
The financial cost code associated with the project. This is delegated to project_cost_code
in the underlying model.
39 |
# File 'app/resources/api/v2/project_resource.rb', line 39 attribute :cost_code, delegate: :project_cost_code |
#name ⇒ String
The name of the project.
33 |
# File 'app/resources/api/v2/project_resource.rb', line 33 attribute :name |
#uuid ⇒ String (readonly)
This identifier is automatically assigned upon creation and cannot be modified.
Returns The universally unique identifier (UUID) of project.
44 |
# File 'app/resources/api/v2/project_resource.rb', line 44 attribute :uuid, readonly: true |
Instance Method Details
#filter_by_name ⇒ Object
Allows filtering projects by name.
54 |
# File 'app/resources/api/v2/project_resource.rb', line 54 filter :name |