Headless API returns 20 entries on certain GET methods
Brian Suh
更新
Issue
Headless API only displays 20 entries on certain GET methods
Environment
Liferay DXP 7.4
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.