Docs / Requeue one DEAD delivery; a row that is not dead is refused 409
Requeue one DEAD delivery; a row that is not dead is refused 409
Requeue one DEAD delivery; a row that is not dead is refused 409
- Auth
- X-Admin-Token
- Cache-Control
no-store- Source of truth
clients/openapi.jsonanddocs/API.md§12
Move exactly one dead row back to `pending` with a fresh attempt budget.
No row is inserted and `attempts is reset (not incremented), so repeating the call can never create a second delivery or a second attempt: the second call finds the row no longer dead and is refused 409 with the status it now has. The check and the write are one conditional UPDATE inside webhooks.requeue_dead (WHERE status = 'dead'`), so two concurrent replays cannot both win.
Description: clients/openapi.json
Parameters
| Name | In | Required | Type | Example | Notes |
|---|---|---|---|---|---|
delivery_id | path | yes | string | whk_f985648811ce3df2e35ddf38203f214e | |
X-Admin-Token | header | no | string | Operator token (NEWS_ADMIN_TOKEN). A client bearer is refused here. |
Example request
curl -sS -X POST \
'https://vg.tempproject.online/v1/admin/webhooks/deliveries/whk_f985648811ce3df2e35ddf38203f214e/replay' \
-H "X-Admin-Token: $NEWS_ADMIN_TOKEN"import json
import os
import urllib.request
URL = "https://vg.tempproject.online/v1/admin/webhooks/deliveries/whk_f985648811ce3df2e35ddf38203f214e/replay"
def call() -> dict:
req = urllib.request.Request(URL, method="POST", headers={
"X-Admin-Token": os.environ["NEWS_ADMIN_TOKEN"],
})
with urllib.request.urlopen(req, timeout=15) as res:
print(res.status, res.headers.get("Location"))
text = res.read().decode("utf-8")
return json.loads(text) if text else {}
if __name__ == "__main__":
print(call())const res = await fetch(
"https://vg.tempproject.online/v1/admin/webhooks/deliveries/whk_f985648811ce3df2e35ddf38203f214e/replay",
{
method: "POST",
headers: {
"x-admin-token": process.env.NEWS_ADMIN_TOKEN!,
},
},
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(res.headers.get("etag"), await res.json());The requests are generated from the path template and the parameters in clients/openapi.json, so a new parameter appears here without an edit to this site.
Example response
cache-control: no-store
content-type: application/octet-streamNo JSON body on this route; the headers are the ones docs/API.md §2 documents for it
Failures
This operation can answer 200, 400, 401, 404, 409, 422, 503. The full envelope for each status, with its body, is on Errors.