action #121102
Updated by mkittler almost 2 years ago
## Motivation
Proper pagination is planned for every query and API route in #119428. After #120841 has been implemented we now have a prototype to replicate. So this needs to be done for `GET /api/v1/jobs`.
## Acceptance criteria
* **AC1:** API endpoint `GET /api/v1/jobs` has pagination
## Suggestions
* Use `limit`/`offset` query parameters and `prev`/`next`/`first` relations in `Link` headers
* If possible use the `DBIx::Class` features for `limit` and `offset`
* See official documentation (https://docs.mojolicious.org/Mojolicious/Plugin/DefaultHelpers, https://docs.mojolicious.org/Mojolicious/Validator/Validation, https://metacpan.org/pod/DBIx::Class::ResultSet)
* Use helper added in https://github.com/os-autoinst/openQA/pull/4934 for pagination headers