sequencescape
sequencescape copied to clipboard
Y24-220 - Create API V2 end point for tag sets
User story As PSD, we would like to design an API V2 endpoint to query tag sets. A tag set can be single index or dual index. A single index tag set has an association with one tag group. A dual index tag set has associations with two tag groups.
Who are the primary contacts for this story Abdullah, Andrew, Katy, Neil
Who is the nominated tester for UAT PSD
Acceptance criteria To be considered successful the solution must allow:
- Endpoint:
- [ ] Listing all tag sets
- [ ] Reading one tag set by id
- [ ] Has a filter to return only the tag sets by their tag group adapter types. For dual index tag sets, the model has a validation that the adapter types of its tag groups are equal. Therefore, the model has a method to return the first tag group adapter type as its adapter type.
- [ ] Includes tag groups and tags of the tag set in the response if requested, (JSON API compound document)
- [ ] Excludes soft-deleted tag sets i.e. at least one of the tag groups is soft-deleted using visibility flag
- [ ] See the existing tag group request/response in Additional Context. The new endpoint should attach tag groups to their parent tag sets in the response.
- TagSet resource
- [ ] Has a name, same as the underlying model
- [ ] Has a uuid, same as the underlying model, because of the included concern.
- [ ] Has one tag_group, the only group for single index tag sets and the first group for dual index tag sets
- [ ] Has one tag2_group, null for single index tag sets and the second group for dual index tag sets
- Client side
- [ ] convenience methods as in the server model: visible and adapter type
Dependencies This story is blocked by the following dependencies:
- #4160
- #4236
References This story has a non-blocking relationship with: See links in the parent research story.
Additional context Initial aim of this story is supporting the Limber UI story for selection of i7 and i5 tag groups for Limber Tagging screen by tag set name only; instead of specifying the groups separately. There will be a Limber UI story for that. For testing the endpoint, similar/modified payloads for LCA Connect PCRXP plate in Cardinal pipeline integration suite test may be useful.
Existing tag group listing
Existing tag group API request from Limber retrieves all tag groups by an adapter filter. The same result is listed in both i7 and i5 drop-downs. The following example shows the request and response headers and Preview of a tag group that would belong to a single-index tag set and a pair of tag groups that would belong to a dual-index tag set.