---
title: "Get Repo Health"
method: GET
path: "/repos/{owner}/{name}/health"
tags: ["repos"]
---

# Get Repo Health

`GET /repos/{owner}/{name}/health`

## Request

- Base URL: `https://api.codeofpaper.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.codeofpaper.com/repos/{owner}/{name}/health`
- Auth: none declared

Return the cached liveness state of a repo by `owner/name`.

This is intentionally a DB-only lookup, not a live HEAD against GitHub,
so it stays cheap to call from the frontend on every paper page render.
The nightly `repo_health_sweep` job is what flips the underlying state.

Response shape:
    {
      "full_name": "owner/name",
      "alive": bool,
      "stale": bool,           # true when last_verified_at is missing or > 14d
      "http_status": int|null,
      "last_verified_at": iso|null
    }

Returns 404 only when we have never heard of the repo at all (so the
frontend can't use this endpoint to enumerate our DB).

## Path parameters

- `owner` string, required
- `name` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/codeofpaper/apis/code-of-paper-dev-api.md) · [All operations](https://skmtc.dev/codeofpaper/apis/code-of-paper-dev-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codeofpaper/apis/code-of-paper-dev-api/revisions/94ea47fd4aa1?raw)
