Docs / Sources Health
Sources Health
Per-source fetch failures (operator).
GET/v1/sources/health
- Auth
- X-Admin-Token
- Cache-Control
no-store- Source of truth
clients/openapi.jsonanddocs/API.md§12
One row per source in the curated registry (policies/sources.yaml), plus the newest usable run. The run log records fetch failures only, so this route reports failure evidence and says so in limitations.
last_run_reportedis one offetch_error_reported,no_fetch_error_reported,unknown.no_fetch_error_reportedis not proof of success: a source that delivered zero documents or was skipped by robots.txt also counts assources_ok. Measured in the same response: a source whose newest run did not name it readno_fetch_error_reportedwhile itslast_fetch_failurewas a real timeout from an older run.consecutive_failuresis a lower bound: it walks back through runs that did not name the source (a gap, not a reset) and stops at the first run whose detail is missing or whose error list was truncated.items/last_item_published_atare attribution by the stored payload'ssource.name. Withheld rows cannot be attributed; the withheld table stores onlysource_url.latest_runisnullwhen no run in the window has a readable detail blob.no-store. Admin token only.
Description: docs/API.md §12
Parameters
| Name | In | Required | Type | Example | Notes |
|---|---|---|---|---|---|
X-Admin-Token | header | no | string | Operator token (NEWS_ADMIN_TOKEN). A client bearer is refused here. |
Example request
curl -sS \
'https://vg.tempproject.online/v1/sources/health' \
-H "X-Admin-Token: $NEWS_ADMIN_TOKEN"import json
import os
import urllib.request
URL = "https://vg.tempproject.online/v1/sources/health"
def call() -> dict:
req = urllib.request.Request(URL, headers={
"X-Admin-Token": os.environ["NEWS_ADMIN_TOKEN"],
})
with urllib.request.urlopen(req, timeout=15) as res:
print(res.status, res.headers.get("ETag"))
return json.loads(res.read().decode("utf-8"))
if __name__ == "__main__":
body = call()
print(json.dumps(body, indent=2, ensure_ascii=False)[:2000])const res = await fetch(
"https://vg.tempproject.online/v1/sources/health",
{
method: "GET",
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
{
"generated_at": "2026-11-04T21:29:18.666380Z",
"runs_examined": 4,
"latest_run": {
"run_id": "c0ffee00d15a4c1e8b2a3f4d5e6f7a8b",
"status": "ok",
"started_at": "2026-11-04T20:55:00.000000Z",
"finished_at": "2026-11-04T21:35:54.830168Z",
"sources_ok": 27,
"sources_failed": 1,
"errors": 1,
"error_list_complete": true
},
"sources": [
{
"name": "Bank of Japan — What's New",
"enabled": true,
"category": "central_banks",
"language": "en",
"priority": 1,
"last_run_reported": "fetch_error_reported",
"last_fetch_failure": {
"run_id": "c0ffee00d15a4c1e8b2a3f4d5e6f7a8b",
"started_at": "2026-11-04T20:55:00.000000Z",
"stage": "fetch",
"url": "https://www.boj.or.jp/en/theme/new/index.htm",
"error": "HTTP 503 Service Unavailable"
},
"consecutive_failures": 2,
"items": 0,
"last_item_published_at": null
}
],
"limitations": [ "...", "...", "...", "..." ]
}Response example in docs/API.md §12 (GET /v1/sources/health)
Failures
This operation can answer 200, 400, 401, 404, 409, 422, 503. The full envelope for each status, with its body, is on Errors.