Claim-level evidence
Read the evidence chain returned with a documentation inventory page: its aggregate state, four claim records, catalogued source links, and the gaps that keep a claim from being treated as complete proof.
/api/inventory/pages/[slug]evidence is part of the JSON envelope01 / request
Supported input
This reference documents the existing public inventory lookup. It does not add a separate evidence endpoint: send a GET request with the required slug path segment. URL-encode the segment when needed.
| Field | Type | Required | Details |
|---|---|---|---|
| slug | string | Yes | Path segment identifying the inventory page. Unknown slugs return 404 with { "error": "not_found" }. No login is required. |
02 / response
One response envelope
A successful response is InventoryPageDetail. The evidence object is not a narrower wire response; it travels alongside the page score, supporting signals, and discrepancies.
| Field | Type | Description |
|---|---|---|
| page | InventoryScoreCard | Requested slug and name, overall score and status, aggregate evidence status, verification timestamp, and discrepancy count. |
| signals | InventorySignalRow[] | Four weighted score rows for spec, browser, examples, and compat; evidenceUrl is omitted if its source is unavailable. |
| discrepancies | InventoryDiscrepancy[] | Known issues with independently nullable sourceUrl and an optional claim association represented by claimId. |
| evidence | InventoryEvidence | Aggregate status and one detailed claim for each of the four claim IDs. |
03 / evidence status
What the states mean
evidence.status and each claim status use the same four-value enum. Scores are confidence summaries, not proof by themselves.
| Not tested | No matching source is catalogued for the claim. |
| Partially verified | A source exists, but the resolver knows that proof is incomplete. This is the deliberate result for source-backed claims today because specific proof details are unavailable. |
| Conflict detected | A linked drift discrepancy affects the claim or aggregate evidence state. |
| Verified | Part of the shared enum, but not a normal or guaranteed result for this resolver while its detailed proof fields remain unavailable. |
| id · label | spec, browser, examples, or compat; each also has a display label. |
| status · score | Shared evidence status enum; numeric score from 0 through 100. |
| text fields | specificationSource, specificationSection, specificationRevision, browserVerificationStatus, browser, browserVersion, exampleResult, compatibilityDetail, and gap are string | null. |
| source fields | specificationLink, browserSource, exampleSource, and compatibilitySource are URL strings or null. |
| exampleLastVerifiedAt | Integer Unix-millisecond inventory verification timestamp or null. |
04 / source behavior
Links are catalog references
The resolver maps specificationLink from the catalogued documentation relationship, exampleSource from the catalogued code-example relationship, and browserSource from the catalogued browser-compatibility relationship.compatibilitySource reuses that browser-compatibility source when available.
null; the related signals[].evidenceUrl is omitted when its source is unavailable, while discrepancies[].sourceUrl remains independently nullable.In particular, specificationRevision and browserVersion are not recorded by the current resolver. exampleResult is aggregate rather than a per-example artifact, exampleLastVerifiedAt is the inventory verification timestamp when an example source exists, and compatibilityDetail is an aggregate freshness string rather than exact BCD version data.
05 / example
Illustrative websocket-api payload
The request and response below use the known websocket-api slug. The JSON is contract-shaped and illustrative: inventory scores, timestamps, and discrepancies can change between requests.
curl "${APP_URL}/api/inventory/pages/websocket-api"{
"page": {
"slug": "websocket-api",
"name": "WebSocket API",
"score": 93,
"status": "Verified",
"evidenceStatus": "Partially verified",
"lastVerifiedAt": 1770000000000,
"discrepancyCount": 0
},
"signals": [
{
"id": "spec",
"label": "Specification",
"score": 96,
"weight": 0.2,
"evidenceUrl": "https://websockets.spec.whatwg.org/",
"explainer": "Normative specification freshness."
},
{
"id": "browser",
"label": "Browser behavior",
"score": 92,
"weight": 0.3,
"evidenceUrl": "https://github.com/mdn/browser-compat-data/tree/main/api/WebSocket.json",
"explainer": "Aggregate browser behavior cross-check."
},
{
"id": "examples",
"label": "Code examples",
"score": 92,
"weight": 0.3,
"evidenceUrl": "https://github.com/web-platform-tests/wpt/tree/master/websockets",
"explainer": "Share of executable examples passing."
},
{
"id": "compat",
"label": "Compatibility",
"score": 94,
"weight": 0.2,
"evidenceUrl": "https://github.com/mdn/browser-compat-data/tree/main/api/WebSocket.json",
"explainer": "Compatibility freshness from browser data."
}
],
"discrepancies": [],
"evidence": {
"status": "Partially verified",
"claims": [
{
"id": "spec",
"label": "Specification",
"status": "Partially verified",
"score": 96,
"specificationSource": "WHATWG WebSockets",
"specificationSection": null,
"specificationRevision": null,
"specificationLink": "https://websockets.spec.whatwg.org/",
"browserVerificationStatus": null,
"browser": null,
"browserVersion": null,
"browserSource": null,
"exampleResult": null,
"exampleSource": null,
"exampleLastVerifiedAt": null,
"compatibilitySource": null,
"compatibilityDetail": null,
"gap": "Specification revision is not recorded for this reference page."
},
{
"id": "browser",
"label": "Browser verification",
"status": "Partially verified",
"score": 92,
"specificationSource": null,
"specificationSection": null,
"specificationRevision": null,
"specificationLink": null,
"browserVerificationStatus": "Aggregate sandbox cross-check: 92/100",
"browser": "Chromium sandbox",
"browserVersion": null,
"browserSource": "https://github.com/mdn/browser-compat-data/tree/main/api/WebSocket.json",
"exampleResult": null,
"exampleSource": null,
"exampleLastVerifiedAt": null,
"compatibilitySource": null,
"compatibilityDetail": null,
"gap": "Browser-run version is not recorded for this reference page."
},
{
"id": "examples",
"label": "Executable examples",
"status": "Partially verified",
"score": 92,
"specificationSource": null,
"specificationSection": null,
"specificationRevision": null,
"specificationLink": null,
"browserVerificationStatus": null,
"browser": null,
"browserVersion": null,
"browserSource": null,
"exampleResult": "92% passing (aggregate)",
"exampleSource": "https://github.com/web-platform-tests/wpt/tree/master/websockets",
"exampleLastVerifiedAt": 1770000000000,
"compatibilitySource": null,
"compatibilityDetail": null,
"gap": "Example-level pass/fail artifacts are not available in the current store."
},
{
"id": "compat",
"label": "Compatibility",
"status": "Partially verified",
"score": 94,
"specificationSource": null,
"specificationSection": null,
"specificationRevision": null,
"specificationLink": null,
"browserVerificationStatus": null,
"browser": null,
"browserVersion": null,
"browserSource": null,
"exampleResult": null,
"exampleSource": null,
"exampleLastVerifiedAt": null,
"compatibilitySource": "https://github.com/mdn/browser-compat-data/tree/main/api/WebSocket.json",
"compatibilityDetail": "BCD compatibility freshness: 94/100",
"gap": "Exact BCD identifier and version details are not recorded for this reference page."
}
]
}
}