Read one campaign as one object
GET https://weights.fyi/run/v1/workspace/campaigns/{campaign_id}
Authorization: Bearer <token> scope: read- Available since
- 2026-11-16: included in this build; see What is live for deployment status.
- Answer time
- synchronous; one read of your own plans, nothing is changed.
Returns one campaign as one object: every ComputePlan of your workspace whose submission named the campaign in metadata.run_id, with its window, its timeline, what it produced, what it was charged and why work failed. Plans of other workspaces that use the same id are never included, and an id none of your plans names returns 404.
Every figure is a Metric, {value, status, observed_at, reason}: a figure nobody recorded is null with its reason, never 0, and a charge we did not record is never $0.00. A campaign with dead letters is never done. A failure is counted under a layer only where its own record names that layer; every other failure is counted unclassified with the reason it carries.
Request
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer token with read. |
campaign_id | path | yes | The run_id your plans carry in their metadata. |
Return value
200 OK with an object.
| Field | Meaning |
|---|---|
schema | weights.workspace.campaign/v1. |
campaign_id, observed_at | The id asked for, and when the answer was read. |
status | running, failed, ended_with_losses, cancelled, ended_incomplete or done. Never done while a plan is open or failed, or a pack was dead-lettered, accepted as lost or expired. |
reason, dead_letters_open | Why, in one line; packs waiting for a retry or an accepted loss. |
window | started_at, and ended_at once every plan ended (else null). |
campaigns, plans | The metadata.campaign_name values named, and each plan's plan_id, state, outcome and coverage, as in its receipt. |
timeline | The plans' events, oldest first: at, kind, plan_id, stage_id, summary. |
produced | Pack outcomes as Metrics, assigned first: packs_assigned, packs_completed, items_completed. The harness's own figures (samples_assigned, samples_completed, samples_scored, verified_findings, empty_tasks) are unavailable here, and samples is unsupported. |
cost | charged_usd: what your plans were charged. chat_usd: chat charges of the plans' stage keys. chat_elsewhere_usd is unsupported: chat sent anywhere else is not recorded here. |
failures | by_layer (weights_service, model_serving, your_harness), unclassified with by_reason, dead_letters and dead_letters_by_reason, stage_failures, refusals by HTTP status. |
bounds | row_bound (2,000 rows of each source) and which source was truncated. |
Errors
| Status | Code | Meaning |
|---|---|---|
401 | unauthorized, invalid_token, token_revoked, token_expired | Supply a valid token. |
403 | scope_required, account_suspended | Token lacks read, or the account is suspended. |
404 | campaign_not_found | None of your plans names this campaign. |
Examples
curl -s https://weights.fyi/run/v1/workspace/campaigns/CAMPAIGN_ID \
-H "Authorization: Bearer $WEIGHTS_API_KEY"Selected fields of a campaign that ended over dead letters:
{"schema":"weights.workspace.campaign/v1","campaign_id":"nov-12","status":"ended_with_losses","reason":"2 plans ended; 2 packs dead-lettered, waiting for a retry or an accepted loss","dead_letters_open":2,"produced":{"packs_assigned":{"value":3,"status":"fresh","observed_at":"2026-11-12T18:00:00Z","reason":null,"unit":"packs"},"packs_completed":{"value":2,"status":"fresh","observed_at":"2026-11-12T18:00:00Z","reason":null,"unit":"packs"}},"cost":{"charged_usd":{"value":0.42,"status":"fresh","observed_at":"2026-11-12T18:00:00Z","reason":null,"unit":"USD"}}}History
- 2026-11-16: added.