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

Add pagination info to the API response #23870

Closed
1 task
fmontes opened this issue Jan 23, 2023 · 3 comments · Fixed by #24287
Closed
1 task

Add pagination info to the API response #23870

fmontes opened this issue Jan 23, 2023 · 3 comments · Fixed by #24287

Comments

@fmontes
Copy link
Member

fmontes commented Jan 23, 2023

User Story

As a user, I need the pagination in the response API object, so I can work with the API using proxies that can remove the headers where we have the pagination right now.

Acceptance Criteria

  • All endpoints should include pagination like:
{
    "entity": [],
    "pagination": {
        "currentPage": 3,
        "linkPages": 5,
        "perPage": 5,
        "totalEntries": 14
    }
}

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Sub-Tasks & Estimates

No response

@fmontes
Copy link
Member Author

fmontes commented Mar 7, 2023

x-pagination-link-pages dont' worry about it @jcastro-dotcms

fmontes pushed a commit that referenced this issue Mar 10, 2023
* #23870 : Add pagination info to the API response.

* As per Freddy Montes' feedback, removing the unnecessary value for the `x-pagination-link-pages` header.

* Implementing SonarQube feedback.
@fmontes fmontes reopened this Mar 10, 2023
@fmontes fmontes self-assigned this Mar 30, 2023
@rjvelazco
Copy link
Contributor

Passed Internal QA

Docker Image: [dotcms/dotcms:master_4ea0b063]

I tested it on the following endpoints:

  • /api/v1/containers
  • /api/v1/templates
  • /api/v1/contenttype
  • /api/v1/users/filter?page=0&per_page=30&includeAnonymous=true&includeDefault=true

Screenshot

internalqa-issue-23870-add-pagination-info-to-the-API-response

@josemejias11
Copy link

Approved QA - Tested on 23.05_054e1d36_SNAPSHOT // Docker // macOS 13.0 // FF v111.0

Screenshot 2023-04-06 at 11 08 00 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment