Class: Api::V2::TagLayoutTemplateResource

Inherits:
BaseResource
  • Object
show all
Defined in:
app/resources/api/v2/tag_layout_template_resource.rb

Overview

Note:

This resource is immutable: its endpoint will not accept POST, PATCH, or DELETE requests.

Note:

Access this resource via the /api/v2/tag_layout_templates/ endpoint.

Provides a JSON:API representation of TagLayoutTemplate

This resource represents a TagLayoutTemplate which defines the layout and walking algorithm used during the indexing of tags for labware or objects. Think of it as a partially created TagLayout, defining only the tag group that will be used and the actual TagLayout implementation that will do the work.

This resource is read-only and can only be accessed via GET requests. It cannot be modified or deleted.

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

Examples:

GET request for all TagLayoutTemplate resources

GET /api/v2/tag_layout_templates/

GET request for a TagLayoutTemplate with ID 123

GET /api/v2/tag_layout_templates/123/

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseResource

apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations, updatable_fields

Instance Attribute Details

#directionString (readonly)

Note:

This attribute is read-only.

The algorithm that defines the direction of the tag layout. This attribute specifies the walking direction during tag indexing.

Returns:

  • (String)

    The name of the algorithm defining the direction of the layout.



69
# File 'app/resources/api/v2/tag_layout_template_resource.rb', line 69

attribute :direction, readonly: true

#nameString (readonly)

Note:

This attribute is read-only.

The display name of the tag layout template.

Returns:

  • (String)

    The name given to the tag layout template.



62
# File 'app/resources/api/v2/tag_layout_template_resource.rb', line 62

attribute :name, readonly: true

#tag2_groupApi::V2::TagGroupResource (readonly)

Note:

This relationship is read-only and may not be applicable during single indexing.

The secondary tag group associated with the tag layout template. This relationship is used during dual indexing, but will not be found during single indexing.

Returns:



46
# File 'app/resources/api/v2/tag_layout_template_resource.rb', line 46

has_one :tag2_group, class_name: 'TagGroup', readonly: true

#tag_groupApi::V2::TagGroupResource (readonly)

Note:

This relationship is read-only.

The primary tag group associated with the tag layout template. This relationship represents the group of tags that the layout template is based on.

Returns:



39
# File 'app/resources/api/v2/tag_layout_template_resource.rb', line 39

has_one :tag_group, readonly: true

#uuidString (readonly)

Note:

This identifier is automatically assigned upon creation and cannot be modified.

The unique identifier for the tag layout template.

Returns:

  • (String)

    The UUID of the tag layout template.



56
# File 'app/resources/api/v2/tag_layout_template_resource.rb', line 56

attribute :uuid, readonly: true

#walking_byString (readonly)

Note:

This attribute is read-only.

The algorithm that defines the way of walking through the tag layout. This attribute specifies how the tags are indexed within the layout.

Returns:

  • (String)

    The name of the algorithm defining the walking method.



76
# File 'app/resources/api/v2/tag_layout_template_resource.rb', line 76

attribute :walking_by, readonly: true

Instance Method Details

#enabledBoolean

Filter to return only enabled tag layout templates. This filter allows users to specify if only active tag layouts should be returned.

Examples:

Using the filter: GET /api/v2/tag_layout_templates?enabled=true

Returns:

  • (Boolean)

    Whether the tag layout template is enabled or not.



87
# File 'app/resources/api/v2/tag_layout_template_resource.rb', line 87

filter :enabled, default: true