2.7 KiB
API v2 Compatibility Spec
Purpose
Core Hub must preserve the Inter-Hub API surfaces that existing consumers rely on until each consumer has moved to a new explicit Core Hub contract.
Current Compatibility Semantics
The active ops-hub gate expects unauthenticated GET /api/v2/hubs to return 401, not 404 or public data. Core Hub therefore treats hub registry and bootstrap resources as protected, while keeping static catalogs and API documentation public.
The OpenAPI document served at /api/v2/openapi.json includes both FastAPI-native /api/v2/... paths and Inter-Hub-compatible unprefixed aliases such as /hubs, /hub-capability-manifests, /api-consumers, and /policy-scopes.
Public Catalog/Documentation Surfaces
GET /api/v2/widget-typesGET /api/v2/event-typesGET /api/v2/annotation-categoriesGET /api/v2/policy-scopesGET /api/v2/openapi.jsonGET /api/v2/openapi.yamlGET /api/v2/docs
Protected Bootstrap Surfaces
GET /api/v2/hubsPOST /api/v2/hubsGET /api/v2/hub-capability-manifestsPOST /api/v2/hub-capability-manifestsPATCH /api/v2/hub-capability-manifests/{manifest_id}POST /api/v2/hub-capability-manifests/{manifest_id}/activateGET /api/v2/api-consumersPOST /api/v2/api-consumersPOST /api/v2/api-consumers/{consumer_id}/api-keysGET /api/v2/widgetsPOST /api/v2/widgetsGET /api/v2/interaction-eventsPOST /api/v2/interaction-eventsGET /api/v2/hub-registryPOST /api/v2/token
Deferred protected surfaces currently return empty compatibility collections:
/api/v2/annotations/api/v2/requirement-candidates/api/v2/decision-records/api/v2/deployment-records/api/v2/outcome-signals
Known Consumers
ops-hubbootstrap and Inter-Hub gate probesactivity-coreoptional Inter-Hub sink- Custodian workplans and operator smokes
- Downstream docs or probes that check the hub registry
Acceptance Standard
A route is compatible when:
- method and path match;
- auth behavior matches public/protected expectations;
- success status and response shape satisfy captured fixtures;
- error shape is documented;
- at least one consumer smoke passes against Core Hub.
Current Evidence
2026-06-27 local evidence:
ops-hub/scripts/interhub-gate-probe.py --base http://127.0.0.1:8017passed.ops-hub/scripts/ops-hub-bootstrap-api.pypassed against local Core Hub with a throwaway operator token.- The bootstrap created an ops-hub record, activated manifest, API consumer, runtime API key, 14 widgets, and one
ops-endpoint-verifiedevent.
Transition Rule
Do not remove an Inter-Hub-compatible route until every known consumer either passes against the new Core Hub-native route or has a recorded cancellation decision.