[PROPOSAL] Add versioned REST API endpoints for test results to support Sample Platform NG frontend
Problem
The current platform primarily serves HTML pages and has very limited API surface. The NG frontend direction needs stable, versioned JSON endpoints for test summary/results/files/progress and category metadata.
Proposed endpoints
GET /api/v1/tests/<id>/summary
GET /api/v1/tests/<id>/results
GET /api/v1/tests/<id>/files
GET /api/v1/tests/<id>/progress
GET /api/v1/categories
Proposed implementation notes
- Introduce a dedicated
mod_api blueprint.
- Reuse existing model/controller logic where possible to avoid behavior drift.
- Return structured JSON with consistent status envelope and 404 handling for missing tests.
- Add focused API tests for success and not-found paths.
Why this is valuable
- Unblocks frontend/API decoupling for NG work.
- Creates a clear contract for external consumers and automation.
- Reduces coupling to server-rendered templates.
Verification plan
- Add integration tests under
tests/test_api/.
- Validate endpoint behavior locally with
nose2 test suite.
In raising this issue, I confirm the following (please check boxes, eg [X]):
My familiarity with the project is as follows (check one, eg [X]):