Class: V1::TagSetResource

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

Overview

Note:

Access this resource via the /v1/tag_sets/ endpoint.

Note:

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 “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 “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 “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 } } }’

Examples:

curl -X GET http://localhost:3100/v1/tag_sets/1
curl -X GET http://localhost:3100/v1/tag_sets?include=tags
curl -X GET http://localhost:3100/v1/tag_sets/
curl -X GET "http://localhost:3100/v1/tag_sets?filter[pipeline]=pacbio"

Direct Known Subclasses

Ont::TagSetResource, Pacbio::TagSetResource

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#nameString

Returns the name of the tag set.

Returns:

  • (String)

    the name of the tag set



68
# File 'app/resources/v1/tag_set_resource.rb', line 68

attributes :name, :uuid, :pipeline

#pipelineString

Returns the pipeline associated with the tag set.

Returns:

  • (String)

    the pipeline associated with the tag set



68
# File 'app/resources/v1/tag_set_resource.rb', line 68

attributes :name, :uuid, :pipeline

#uuidString

Returns the UUID of the tag set.

Returns:

  • (String)

    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(options = {})
  super.where(active: true)
end