Contract
API reference
How the workspace and the analysis engine talk to the platform. Generated from the shared OpenAPI contract.
The API is a published contract that is not yet served. The 19 operations below are defined in shared/openapi.yaml; the platform implements them under /api/v1 when the backend stage begins. Until then the workspace reads DEMO data and these endpoints return 404.
- Workspace calls use the signed-in user's session; each operation is checked against the role permission matrix.
- Engine calls use a dedicated engine API key sent as a bearer token. The engine has no other route to data.
- Administrator operations require the administrator role on the session.
- Request and response bodies are JSON.
- Timestamps are ISO 8601 in UTC.
- Identifiers are opaque strings; do not parse them.
- Queue endpoints (next job, next training command) return null when there is nothing to do, and hand each item to exactly one caller.
Register specimens and read their metadata and analysis status.
| Method | Path | Summary | Caller | Request | Response |
|---|---|---|---|---|---|
| GET | /samples | List samples | Workspace | None | Sample[] |
| POST | /samples | Create a new sample | Workspace | SampleCreate | 201 Sample |
| GET | /samples/{id} | Get a single sample | Workspace | None | Sample |
Queue analysis work, hand jobs to the engine one at a time, and accept results.
| Method | Path | Summary | Caller | Request | Response |
|---|---|---|---|---|---|
| GET | /analysis/jobs | List analysis jobs | Workspace | None | AnalysisJob[] |
| POST | /analysis/jobs | Create an analysis job | Workspace | AnalysisJobCreate | 201 AnalysisJob |
| POST | /analysis/jobs/next | Engine requests the next pending job | Engine | None | AnalysisJob or null |
| POST | /analysis/results | Engine posts analysis results | Engine | AnalysisResultCreate | 202 Accepted |
Read completed analysis reports with verdict, score, and indicators.
| Method | Path | Summary | Caller | Request | Response |
|---|---|---|---|---|---|
| GET | /reports | List analysis reports | Workspace | None | AnalysisReport[] |
| GET | /reports/{id} | Get analysis report by id | Workspace | None | AnalysisReport |
Engine heartbeat and the queue of training commands issued from the workspace.
| Method | Path | Summary | Caller | Request | Response |
|---|---|---|---|---|---|
| GET | /engine/status | Get engine status | Workspace | None | EngineStatus |
| PATCH | /engine/status | Engine updates its status heartbeat | Engine | EngineStatusUpdate | 204 No Content |
| POST | /engine/training/commands/next | Engine requests the next training command | Engine | None | TrainingCommand or null |
| GET | /training/datasets | List training datasets | Workspace | None | TrainingDataset[] |
Experiment definitions and their runs, including recorded metrics.
| Method | Path | Summary | Caller | Request | Response |
|---|---|---|---|---|---|
| GET | /experiments | List experiments | Workspace | None | Experiment[] |
| POST | /experiments | Create experiment | Workspace | ExperimentCreate | 201 Experiment |
| GET | /experiments/{id}/runs | List runs for an experiment | Workspace | None | ExperimentRun[] |
Agentic mitigation actions awaiting or past approval, and reactive-baseline runs for comparison.
| Method | Path | Summary | Caller | Request | Response |
|---|---|---|---|---|---|
| GET | /mitigation/actions | List mitigation actions | Workspace | None | MitigationAction[] |
| GET | /baselines | List baseline runs | Workspace | None | BaselineRun[] |
Administrator-only operations.
| Method | Path | Summary | Caller | Request | Response |
|---|---|---|---|---|---|
| GET | /admin/users | Admin list of users | Administrator | None | AdminUser[] |