Documentation
Your workspace
View .mdOpenAPI

Read one campaign as one object

GEThttps://weights.fyi/run/v1/workspace/campaigns/{campaign_id}scope: read
text
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

NameWhereRequiredMeaning
AuthorizationheaderyesBearer token with read.
campaign_idpathyesThe run_id your plans carry in their metadata.

Return value

200 OK with an object.

FieldMeaning
schemaweights.workspace.campaign/v1.
campaign_id, observed_atThe id asked for, and when the answer was read.
statusrunning, 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_openWhy, in one line; packs waiting for a retry or an accepted loss.
windowstarted_at, and ended_at once every plan ended (else null).
campaigns, plansThe metadata.campaign_name values named, and each plan's plan_id, state, outcome and coverage, as in its receipt.
timelineThe plans' events, oldest first: at, kind, plan_id, stage_id, summary.
producedPack 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.
costcharged_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.
failuresby_layer (weights_service, model_serving, your_harness), unclassified with by_reason, dead_letters and dead_letters_by_reason, stage_failures, refusals by HTTP status.
boundsrow_bound (2,000 rows of each source) and which source was truncated.

Errors

StatusCodeMeaning
401unauthorized, invalid_token, token_revoked, token_expiredSupply a valid token.
403scope_required, account_suspendedToken lacks read, or the account is suspended.
404campaign_not_foundNone of your plans names this campaign.

Examples

sh
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:

json
{"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.

See also