Class: V1::TagSetResource
- Inherits:
-
JSONAPI::Resource
- Object
- JSONAPI::Resource
- V1::TagSetResource
- Defined in:
- app/resources/v1/tag_set_resource.rb
Overview
Access this resource via the /v1/tag_sets/ endpoint.
Tag sets should not be destroy via the API; use the active attribute to
Provides a JSON:API representation of TagSet.
Filters:
- pipeline - pipeline name
curl -X POST "http://localhost:3100/v1/tag_sets"
-H "accept: application/vnd.api+json"
-H "Content-Type: application/vnd.api+json"
-d '{
"data": {
"type": "tag_sets",
"attributes": {
"name": "New Tag Set",
"pipeline": "pacbio"
}
}
}'
curl -X PATCH "http://localhost:3100/v1/tag_sets/1"
-H "accept: application/vnd.api+json"
-H "Content-Type: application/vnd.api+json"
-d '{
"data": {
"type": "tag_sets",
"id": "1",
"attributes": {
"name": "Updated Tag Set Name"
}
}
}'
deactivate tag sets instead. This is a soft delete; the record will be marked as inactive but not removed from the database.
curl -X PATCH "http://localhost:3100/v1/tag_sets/1"
-H "accept: application/vnd.api+json"
-H "Content-Type: application/vnd.api+json"
-d '{
"data": {
"type": "tag_sets",
"id": "1",
"attributes": {
"active": false
}
}
}'
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ String
The name of the tag set.
-
#pipeline ⇒ String
The pipeline associated with the tag set.
-
#uuid ⇒ String
The UUID of the tag set.
Class Method Summary collapse
Instance Attribute Details
#name ⇒ String
Returns the name of the tag set.
68 |
# File 'app/resources/v1/tag_set_resource.rb', line 68 attributes :name, :uuid, :pipeline |
#pipeline ⇒ String
Returns the pipeline associated with the tag set.
68 |
# File 'app/resources/v1/tag_set_resource.rb', line 68 attributes :name, :uuid, :pipeline |
#uuid ⇒ String
Returns the UUID of the tag set.
68 |
# File 'app/resources/v1/tag_set_resource.rb', line 68 attributes :name, :uuid, :pipeline |
Class Method Details
.records(options = {}) ⇒ Object
74 75 76 |
# File 'app/resources/v1/tag_set_resource.rb', line 74 def self.records( = {}) super.where(active: true) end |