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 paginated assets #710

Open
13 of 14 tasks
c8y3 opened this issue Feb 4, 2025 · 1 comment · Fixed by #715
Open
13 of 14 tasks

API v2 paginated assets #710

c8y3 opened this issue Feb 4, 2025 · 1 comment · Fixed by #715
Assignees
Labels
enhancement New feature or request

Comments

@c8y3
Copy link
Contributor

c8y3 commented Feb 4, 2025

Implement endpoint GET /api/v2/cases/{case_identifier}/assets to get a paginated list of assets:

  • successful GET should return 200
  • in case the case is not found, return 404
  • field data should be present
  • fields data should be [] when there are no assets
  • field total should return 1 when there is an asset
  • it should accept page, per_page parameters
  • it should accept order_by and sort_dir parameters
  • fields last_page, current_page and next_page should be present in result
  • introduce a method at the business level rather than going directly to the database
  • use object PaginationParameter
  • check returned object is uniform with other endpoints, use the correct schema object
  • deprecate GET /case/assets/list
  • openapi document GET /api/v2/cases/{case_identifier}/assets
  • openapi deprecate GET /case/assets/filter
@c8y3 c8y3 added the enhancement New feature or request label Feb 4, 2025
@c8y3 c8y3 self-assigned this Feb 4, 2025
@c8y3
Copy link
Contributor Author

c8y3 commented Feb 7, 2025

Note "GET /case/assets/filter" was not documented in the openapi document, so no need to deprecate it there.

@c8y3 c8y3 linked a pull request Feb 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant