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

Pagination of endpoints that handle list of objects needs to be improved #2672

Closed
prernaadev01 opened this issue Sep 20, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working community

Comments

@prernaadev01
Copy link
Collaborator

Problem description

Currently, API endpoints, which handles list of objects (such as VPs) does not display properly if there are more pages in the response. One of the such endpoint is Trustchain API.

Requirements

We need all the API endpoints, which handle list of objects in their responses, needs to display in much properly manner like the response could have a field "next_url" field to help loop through the results or field such as "total_pages" and "total_results"

Definition of done

  1. Improving all the API endpoints involving pagination and make sure their responses are properly displayed.
  2. Updating documentation.

Acceptance criteria

100% completion as mentioned in DOD.

@artembuslaev
Copy link
Contributor

artembuslaev commented Dec 4, 2023

Guardian API returns "X-Total-Count" header for each endpoint which contains pagination data, here are some examples:

It's not clear where the issue has been observed, if this can be clarified it'd be great please. We suspect that the report here records the situation when the headers might have been (wrongly) expected for responses from inside the Policy. These would feature in such responses only when the Document block contains paginationBlock. When this is the case the response to the get request to the paginationBlock would contain total count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community
Projects
None yet
Development

No branches or pull requests

2 participants