CCExtractor / CCExtractor/sample-platform
[PROPOSAL] Add versioned REST API endpoints for test results for NG frontend
- Dominant language
- Python
- Stars
- 30
- Forks
- 85
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 12
Description
## [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//summary`
- `GET /api/v1/tests//results`
- `GET /api/v1/tests//files`
- `GET /api/v1/tests//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]):**
- [X] I have read and understood the [contributors guide](https://github.com/CCExtractor/sample-platform/blob/master/.github/CONTRIBUTING.md).
- [X] I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
- [X] I have checked that the issue I'm posting isn't already reported.
- [X] I have checked that the issue I'm posting isn't already solved and no duplicates exist in [closed issues](https://github.com/CCExtractor/sample-platform/issues?q=is%3Aissue+is%3Aclosed) and in [opened issues](https://github.com/CCExtractor/sample-platform/issues)
- [X] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
**My familiarity with the project is as follows (check one, eg [X]):**
- [ ] I have never visited/used the platform.
- [ ] I have used the platform just a couple of times.
- [X] I have used the platform extensively, but have not contributed previously.
- [ ] I am an active contributor to the platform.
---
Contributor guide
Assessment
This issue has not been assessed yet.