Class: V1::Ont::TagSetResource

Inherits:
TagSetResource show all
Defined in:
app/resources/v1/ont/tag_set_resource.rb

Overview

Note:

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

Provides a JSON:API representation of Ont::TagSet.

Filters: * pipeline - pipeline name (default: ont)

Primary relationships: * tags TagResource - The tags contained in the tag set.

Examples:

curl -X GET http://localhost:3100/v1/ont/tag_sets
curl -X GET "http://localhost:3100/v1/ont/tag_sets/1"
curl -X GET "http://localhost:3100/v1/ont/tag_sets/12?include=tags"

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

curl -X POST http://localhost:3100/v1/ont/tag_sets \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
    -d '{
      "data": {
        "type": "tag_sets",
        "attributes": {
          "name": "New Tag Set"
         }
       }
     }'

curl -X PATCH http://localhost:3100/v1/ont/tag_sets/16 \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -d '{
    "data": {
      "type": "tag_sets",
      "id": "16",
      "attributes": {
        "name": "Updated Tag Set Name"
      }
    }
  }'

# curl -X PATCH "http://localhost:3100/v1/ont/tag_sets/16" \
   -H "accept: application/vnd.api+json" \
   -H "Content-Type: application/vnd.api+json" \
   -d '{
     "data": {
       "type": "tag_sets",
       "id": "1",
       "attributes": {
         "active": false
       }
     }
   }'

Instance Attribute Summary

Attributes inherited from TagSetResource

#name, #pipeline, #uuid

Class Method Summary collapse

Methods inherited from TagSetResource

records

Class Method Details

.create_modelObject

Ensure that any tag sets created via this endpoint are scoped to the ont pipeline



65
66
67
# File 'app/resources/v1/ont/tag_set_resource.rb', line 65

def self.create_model
  _model_class.ont_pipeline.new
end