Class: V1::LibraryTypeResource

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

Overview

Note:

Access this resource via the /v1/library_types endpoint.

Provides a JSON:API representation of LibraryType and exposes valid library type options for use by the UI.

For more information about JSON:API see the JSON:API Specifications or look at the JSONAPI::Resources package for the service implementation of the JSON:API standard.

Filters: * pipeline * active

curl -X POST “localhost:3100/v1/library_types” \ -H “accept: application/vnd.api+json” \ -H “Content-Type: application/vnd.api+json” \ -d ‘{ “data”: { “type”: “library_types”, “attributes”: { “name”: “New Library Type”, “pipeline”: “ont”, “external_identifier”: “EXT123”, “active”: true } } }’

curl -X PATCH “localhost:3100/v1/library_types/1” \ -H “accept: application/vnd.api+json” \ -H “Content-Type: application/vnd.api+json” \ -d ‘{ “data”: { “type”: “library_types”, “id”: “1”, “attributes”: { “name”: “Updated Library Type Name” } } }’

Examples:

curl -X GET http://localhost:3100/v1/library_types/1
curl -X GET http://localhost:3100/v1/library_types/
curl -X GET "http://localhost:3100/v1/library_types?filter[pipeline]=ont"
curl -X GET "http://localhost:3100/v1/library_types?filter[active]=true"

Instance Attribute Summary collapse

Instance Attribute Details

#activeBoolean

Returns the active status of the library type.

Returns:

  • (Boolean)

    the active status of the library type



65
# File 'app/resources/v1/library_type_resource.rb', line 65

attributes :name, :pipeline, :created_at, :updated_at, :external_identifier, :active

#created_atString

Returns the timestamp when the library type was created.

Returns:

  • (String)

    the timestamp when the library type was created



65
# File 'app/resources/v1/library_type_resource.rb', line 65

attributes :name, :pipeline, :created_at, :updated_at, :external_identifier, :active

#external_identifierString

Returns the external identifier of the library type.

Returns:

  • (String)

    the external identifier of the library type



65
# File 'app/resources/v1/library_type_resource.rb', line 65

attributes :name, :pipeline, :created_at, :updated_at, :external_identifier, :active

#nameString

Returns the name of the library type.

Returns:

  • (String)

    the name of the library type



65
# File 'app/resources/v1/library_type_resource.rb', line 65

attributes :name, :pipeline, :created_at, :updated_at, :external_identifier, :active

#pipelineString

Returns the pipeline associated with the library type.

Returns:

  • (String)

    the pipeline associated with the library type



65
# File 'app/resources/v1/library_type_resource.rb', line 65

attributes :name, :pipeline, :created_at, :updated_at, :external_identifier, :active

#updated_atString

Returns the timestamp when the library type was last updated.

Returns:

  • (String)

    the timestamp when the library type was last updated



65
# File 'app/resources/v1/library_type_resource.rb', line 65

attributes :name, :pipeline, :created_at, :updated_at, :external_identifier, :active