CCExtractor / CCExtractor/sample-platform
[PROPOSAL] Add versioned REST API endpoints for test results for NG frontend
- Lenguaje dominante
- Python
- Estrellas
- 30
- Forks
- 85
- Merge medio
- 6 d 21 h
- PR fusionados (30 d)
- 12
Descripción
## [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.
---
Guía de contribución
Línea de trabajo
Comienza revisando la lógica existente del modelo y del controlador, y determina después cómo encaja el blueprint mod_api propuesto en la aplicación. Añade los endpoints versionados de resultados de pruebas y categorías con respuestas JSON coherentes y gestión de pruebas inexistentes. Añade pruebas de integración para resultados correctos y no encontrados en tests/test_api/ y ejecuta la suite de pruebas de nose2.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- api, backend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100