action #121102
coordination #80142: [saga][epic] Scale out: Redundant/load-balancing deployments of openQA, easy containers, containers on kubernetes
coordination #92854: [epic] limit overload of openQA webUI by heavy requests
action #97190: Limit size of initial requests everywhere, e.g. /, /tests, etc., over webUI and API
action #119428: Ensure users can get all the data for limited queries, e.g. with pagination
Add pagination for GET /api/v1/jobs size:M
0%
Description
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 andprev
/next
/first
relations inLink
headers - If possible use the
DBIx::Class
features forlimit
andoffset
- 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
Related issues
History
#1
Updated by kraih 2 months ago
- Copied from action #121099: Add pagination for GET /api/v1/jobs/<job_id:num>/comments added
#2
Updated by kraih 2 months ago
- Copied to action #121105: Add pagination for GET /api/v1/test_suites, GET /api/v1/test_suites/:id, GET /api/v1/machines, GET api/v1/machines/:id, GET /api/v1/products, GET /api/v1/products:id added
#3
Updated by kraih 2 months ago
- Copied to action #121108: Add pagination for GET /api/v1/workers added
#5
Updated by okurz about 2 months ago
- Due date deleted (
2022-12-07) - Target version changed from future to Ready
- Start date deleted (
2022-11-22)
#6
Updated by dheidler about 1 month ago
- Assignee set to dheidler
#7
Updated by mkittler about 1 month ago
- Subject changed from Add pagination for GET /api/v1/jobs to Add pagination for GET /api/v1/jobs size:M
- Description updated (diff)
- Status changed from New to Workable
#8
Updated by dheidler about 1 month ago
#9
Updated by dheidler about 1 month ago
- Status changed from Workable to Feedback
#10
Updated by okurz 28 days ago
- Due date set to 2023-01-18
dheidler can you add the comment to the git comment and handle https://github.com/os-autoinst/openQA/pull/4964/files#r1060660506 and as suggested or should we take over?
#13
Updated by kraih 22 days ago
- Status changed from Feedback to In Progress
Cleaning up the PR now: https://github.com/os-autoinst/openQA/pull/4979
#16
Updated by kraih 21 days ago
- Related to action #122959: Add pagination for /api/v1/jobs with latest=1 feature active added
#18
Updated by okurz about 3 hours ago
- Due date deleted (
2023-01-18)