The Public Knowledge API

Everything on this website is also available as read-only JSON, with the same trust labels, the same provenance and the same stated unknowns.

Why it exists

The command line answers questions for a person; the website answers them for a reader; the API answers them for a tool. All three read the same published dataset, so a linter, a CI check or a dashboard reaches the conclusion a developer would reach by hand.

It is read-only in the strongest sense available: GET, HEAD and OPTIONS are the only methods it routes, and it serves a published dataset rather than any canonical store. There is nothing to authenticate, because there is nothing private in it and nothing to change.

Getting started

GET /api/v1/status
GET /api/v1/search?q=CVE-2025-3057
GET /api/v1/security/SA-CORE-2025-001
GET /api/v1/provenance/SA-CORE-2025-001
GET /api/v1/openapi.json

Every response carries api_version, dk_version and dataset_id, so a consumer always knows which state of Drupal Knowledge produced an answer. Every result carries trust_class and a trusted_knowledge boolean, so an integration cannot accidentally treat a security advisory as a reviewed Drupal Knowledge rule.

Run it locally from the repository — it binds to loopback by default:

python3 scripts/dk.py api serve

The contract

The API contract is versioned separately from Drupal Knowledge itself, so a release that adds advisories does not break a consumer. The full description is an OpenAPI 3.1 document, generated from the same route table the server dispatches, and the complete developer guide is docs/PUBLIC_API.md in the repository.

Project evidence, findings, upgrade assessments and discovery signals are not served, for the same reasons they are not published here. See the trust model.