Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api v2 get paginated tasks #705

Merged
merged 30 commits into from
Feb 3, 2025
Merged

Api v2 get paginated tasks #705

merged 30 commits into from
Feb 3, 2025

Conversation

c8y3
Copy link
Contributor

@c8y3 c8y3 commented Jan 31, 2025

This PR adds endpoint GET /api/v2/cases/{case_identifier}/tasks.
Here is the work done in its scope:

  • added the new endpoint and tests
  • deprecated GET /case/tasks/list
  • factored pagination parameters page, per_page, order_by and sort_dir (which are common to all pagination endpoints) with the introduction of the PaginationParameter object
  • factored the construction of the paginated result from the sqlalchemy paginate result with the other similar endpoints (it was always the same code), with the help of the new response method response_api_paginated
  • factored the code to pick the ordering function (order_func = desc if pagination_parameters.get_direction() == 'desc' else asc) with method convert_sort_direction
  • some work on the CI to break the monolithic job which was getting too large into several jobs, each doing a specific task (in case of an error we get the result faster and see which check failed at a glance)

This PR goes hand in hand with the accompanying documentation update iris-doc-src/PR38

c8y3 added 30 commits January 31, 2025 07:47
@c8y3 c8y3 requested a review from whikernel January 31, 2025 09:25
@c8y3 c8y3 linked an issue Jan 31, 2025 that may be closed by this pull request
10 tasks
@whikernel whikernel merged commit 8b401c4 into develop Feb 3, 2025
18 checks passed
@whikernel whikernel deleted the api_v2_get_paginated_tasks branch February 3, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API v2 paginated tasks
2 participants