Reputation: 2422
I've noticed that when making a GET
request to the Firestore's REST API with a Collection path, the response will be the whole collection(I didn't check with a big collection).
I would like to know how can I limit the number of retrieved documents when such request is made. For example, return only 15.
Upvotes: 0
Views: 117
Reputation: 317372
When using the list method to get documents in a collection, you can use the pageSize
query parameter along with pageToken
to limit the number of documents, as described in the documentation.
pageSize
The maximum number of documents to return.
pageToken
The nextPageToken value returned from a previous List request, if any.
Upvotes: 1