Headless API returns 20 entries on certain GET methods
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- Headless API only displays 20 entries on certain GET methods
Resolution
- The resulting 20 records is because of the default pageSize value. If you would like to adjust the number of records that are returned, please adjust the pageSize to a higher value that will accommodate the number of records you wish for the method to return.
- If you would like to return all of the records, you can adjust the pageSize to the value of -1.
-
Please note that depending on the API that is in use and the number of records, this may be costly in terms of performance. Our documentation specifies that pagination is highly recommended for entities that can have many elements, to avoid very large requests.
Did this article resolve your issue ?