From a27bd2280926b3770b1317e0b056f9951430b296 Mon Sep 17 00:00:00 2001 From: Nickk'z Date: Sun, 1 Nov 2026 11:45:16 +0530 Subject: [PATCH] Fix the artifact archive method and document the quality route The Artifacts product page said POST for the run archive, but the route is a GET and POST returns 404. GET /api/artifacts/:id/quality was not documented anywhere, so add it to the Artifacts API table with both responses and its 404. --- docs-site/docs/api/artifacts.mdx | 1 + docs-site/docs/product/artifacts.mdx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs-site/docs/api/artifacts.mdx b/docs-site/docs/api/artifacts.mdx index b2d05ec19..1c8ad7e19 100644 --- a/docs-site/docs/api/artifacts.mdx +++ b/docs-site/docs/api/artifacts.mdx @@ -19,6 +19,7 @@ immutable bytes and authorization. All routes are org-session scoped. See | GET | `/api/artifacts/:id` | Fetch an artifact descriptor. | `{artifact}`. `404 not found`. | | GET | `/api/artifacts/:id/content` | Stream artifact bytes (range-capable). | Query `download=1` forces attachment. Honors `Range`; `200` or `206`, `416` on a bad range, `410` when bytes are unavailable. `HEAD` is also served (headers only). | | GET | `/api/artifacts/:id/preview` | Rendered-PDF preview of an Office binary, inline. | `application/pdf`, `cache-control: private, max-age=300`. `404` no preview, `410` unavailable. | +| GET | `/api/artifacts/:id/quality` | The quality check result for the artifact's current revision. | `{status:"unverified", artifactRevision, subjectDigest}` with no receipt for that revision, or `{status:"verified", receipt}` where `receipt` has `id`, `artifactId`, `threadId`, `artifactRevision`, `subjectDigest`, `qualityProfile`, `exportFormat`, `exportDigest`, `visualDigest`, `inspectorVersion`, `createdAt`. `404 not found`. | | GET | `/api/artifacts/:id/workpiece` | The workpiece descriptor plus canonical (upgraded) state. | `{workpiece, state}`. `404` when the artifact is not a workpiece. | | PATCH | `/api/artifacts/:id/workpiece` | Update the workpiece state (optimistic concurrency). | Body: `expected_revision` (non-negative integer, required), `state` (parsed for the workpiece kind). `409 revision conflict` on a stale revision. | | GET | `/api/artifacts/:id/workpiece/export` | Export the workpiece to a downloadable file. | Query `format`. `409 invalid stored workpiece state` when canonicalization fails. | diff --git a/docs-site/docs/product/artifacts.mdx b/docs-site/docs/product/artifacts.mdx index a0bdb8a5f..3a778a233 100644 --- a/docs-site/docs/product/artifacts.mdx +++ b/docs-site/docs/product/artifacts.mdx @@ -21,7 +21,7 @@ its detail and, for a workpiece, an inline editor. | Fetch, content | `GET /api/artifacts/:id`, `/:id/content` | | Preview | `GET /api/artifacts/:id/preview` | | Workpiece, export | `/:id/workpiece`, `/:id/workpiece/export` | -| Archive a run's artifacts | `POST /api/artifacts/runs/:runId/archive` | +| Archive a run's artifacts | `GET /api/artifacts/runs/:runId/archive` | ## Workpieces