Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
N/A
Description
Scope
To make CrossReference data usable in scripts, applications, and dashboards (e.g., the Release dashboard), this patch exposes the data through a REST API.
Changes
This change will implement the route cr/api/testfailures/ which provides read-only access to the data via a ViewSet (i.e., ReadOnlyModelViewSet).
It reuses the existing TestFailure model (`class TestFailure(models.Model)`) that is also used to display data on the buildbot.mariadb.org/cr web page.
The select_test_failures function returns a QuerySet that is then serialized to JSON and returned to the client.
Query parameters will be validated using a special serializer APIQueryParamsSerializer.
Examples:
See screenshots attached.