Purpose & Features of the Targeton API¶
Purpose¶
The purpose of the MAVE Targeton API is to provide a single, stable interface for resolving Targeton metadata and associated LibAmp primer sequences from Benchling.
Without the Targeton API, downstream consumers would need to understand and interact with multiple Benchling schemas—Screen Pellet, HDR Vector Lot, Targeton Oligo Library, and LibAmp Primer—and implement their own orchestration logic, version-selection rules, and response normalisation. The Targeton API abstracts all of that complexity behind a single GET /targeton?name= call.
The Targeton API is designed to:
- Retrieve Targeton metadata from Benchling
- Resolve associated LibAmp primer sequences
- Support both Screen Pellet and HDR Vector workflows
- Abstract Benchling-specific schemas and lookup logic
- Return a standardised JSON response for downstream consumption
Supported Workflows¶
The API supports two MAVE library preparation workflows, determined automatically from the supplied name value.
Screen Pellet Workflow¶
When the supplied name matches a Screen Pellet record in Benchling, the API sets library_type to screen and extracts replicate and pellet day values alongside the core Targeton metadata.
Example input: GREB_A_4_pel370
HDR Vector Workflow¶
When no Screen Pellet is found for the supplied name, the API falls back to searching the HDR Vector Lot schema. If a match is found, library_type is set to plasmid. Replicate and pellet day fields are not applicable in this workflow and are returned as null.
Example input: IVAR_hdr086
Key Features¶
Single-Parameter Interface¶
Consumers only need to provide a single name query parameter. The API handles all downstream orchestration, including which Benchling schema to query first and which fallback path to follow.
Automatic Version Selection¶
When multiple Targeton Oligo Library records are associated with a Targeton, the API automatically selects the record with the highest Version value. Consumers do not need to manage versioning logic themselves.
Harmonised Response¶
Regardless of whether the resolved entity is a Screen Pellet or an HDR Vector Lot, the API returns a consistent JSON structure. Fields that are not applicable to a given workflow (e.g., replicate and pellet_day for HDR Vector records) are returned as null rather than omitted.
LibAmp Primer Resolution¶
The API retrieves all LibAmp Primer records associated with the resolved Targeton and returns them as a named object within the response. Primer records may be partially populated if only one primer sequence exists for the Targeton.
Downstream Link Exposure¶
The API exposes consequences_link and valiant_output_link fields sourced from the Targeton Oligo Library record. These links point to outputs produced by upstream MAVE tooling and may be null if not yet configured in Benchling.
Observability¶
Responses include correlation identifiers in headers to support tracing and observability of requests through the platform.