Documentation
Compute plans and streams
View .mdOpenAPI

Retry a stream's dead-lettered packs

POSThttps://weights.fyi/run/v1/streams/{stage_id}/packs/retryscope: submit
text
POST https://weights.fyi/run/v1/streams/{stage_id}/packs/retry
Authorization: Bearer <token>                    scope: submit
Content-Type: application/json
Available since
2026-10-31: included in this build; see What is live for deployment status.
Answer time
synchronous count check, retry commit and scheduling refresh.

The stage retry addressed by stream, like registering packs and sealing: it returns a stream's dead-lettered packs to pending work. Body, checks, replay and answer are the stage call's.

Address the stream by its stream_id (plan_id~stage_id), or by its authored stage identifier with plan_id in the query. Read the plan first and send the stage's packs_dead_lettered as expected_dead_lettered; a changed count refuses the call without changing work.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer token with submit.
stage_idpathyesThe plan's stream_id, or an authored stage identifier.
plan_idquerynoDisambiguates an authored stage identifier; must agree with a qualified identifier.
Idempotency-KeyheaderconditionalUnique operation key, unless operation_key is supplied.
operation_keyJSON bodyconditionalOperation key; takes precedence over the header for durable replay.
expected_dead_letteredJSON bodyyesPositive integer matching the current stage count.
reasonJSON bodynoExplanation, at most 4,096 UTF-8 bytes after trimming.

Send a JSON object of at most 1 MiB. Unknown fields are rejected.

Return value

200 OK with the plan receipt, operation details and replayed, as the stage call answers.

Errors

StatusCodeMeaning
400invalid_json, invalid_compute_plan, invalid_idempotency_keyInvalid body, count or key.
401unauthorized, invalid_token, token_revoked, token_expiredSupply a valid token.
403scope_required, account_suspended, compute_tenancy_unauthorizedAccess is unavailable.
404compute_plan_not_found, compute_stage_not_foundAbsent or inaccessible work.
409ambiguous_compute_stageSupply plan_id or use stream_id.
409dead_letter_count_changedRefresh; includes expected and actual counts.
409compute_plan_conflict, compute_schedule_window_closed, compute_dependents_progressed, idempotency_key_in_progressState, schedule, dependencies or key prevent retry.
413body_too_largeBody exceeds 1 MiB.
422idempotency_key_reusedHeader key belongs to a different request.
429rate_limitedWait for Retry-After.

Examples

sh
curl -s 'https://weights.fyi/run/v1/streams/STREAM_ID/packs/retry' \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: retry-packs-1" -d '{"expected_dead_lettered":1}'

History

  • 2026-10-31: documented the retry by stream.

See also