Skip to content

Let API clients start and read analyses - #4275

Merged
igboyes merged 2 commits into
mainfrom
vir-3343-add-api-endpoints-for-creating-analyses
Dec 5, 2026
Merged

igboyes merged 2 commits into
mainfrom
vir-3343-add-api-endpoints-for-creating-analyses

Conversation

@igboyes

@igboyes igboyes commented Dec 4, 2026

Copy link
Copy Markdown
Member

Adds POST /api/v1/samples/{id}/analyses to start an analysis of a sample, and GET /api/v1/analyses/{id} to read an analysis and the state of its job. Starting an analysis needs write access to the sample and access to the reference. Reading needs read access to the sample.

The web app's analysis server functions and the new routes use the same create call, rights check, and error mapping, so validation and error messages are the same on both paths. The request shape moves to @virtool/contracts as AnalysisCreateRequest. The site manual has a new analyses API page.

Adds `POST /api/v1/samples/{id}/analyses` to start an analysis of a sample,
and `GET /api/v1/analyses/{id}` to read an analysis and the state of its job.
Starting an analysis needs write access to the sample and access to the
reference. Reading needs read access to the sample.

The web app's analysis server functions and the new routes use the same
create call, rights check, and error mapping, so validation and error
messages are the same on both paths. The site manual has a new analyses
API page.
@linear-code

linear-code Bot commented Dec 4, 2026

Copy link
Copy Markdown

VIR-3343

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T23:19:16.430569Z 2284b07 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@igboyes
igboyes merged commit 2794f7f into main Dec 5, 2026
23 checks passed
@igboyes
igboyes deleted the vir-3343-add-api-endpoints-for-creating-analyses branch December 5, 2026 16:38
@virtool-releaser virtool-releaser Bot mentioned this pull request Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant