Cabinhub News API v1.0.0

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.json and docs/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.

Description: docs/API.md §12

Parameters

NameInRequiredTypeExampleNotes
X-Admin-TokenheadernostringOperator token (NEWS_ADMIN_TOKEN). A client bearer is refused here.

Example request

curl
Shell
curl -sS \
  'https://vg.tempproject.online/v1/sources/health' \
  -H "X-Admin-Token: $NEWS_ADMIN_TOKEN"
Python, standard library only
Python
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])
TypeScript, Node 18+, no dependencies
TypeScript
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

Response body
JSON
{
  "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.