- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
By default Query returns 2,000 records. Using REST API, how do I define a smaller batch size (e.g, 50 records) per query and use QueryMore to get the rest?
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
You can pass batchSize field in conf section in the request payload. Here is an example.
curl -X POST -H "apiAccessKeyId: my_username" -H "apiSecretAccessKey: my_password" -H "Content-Type: application/json" -d '{ "queryString": "select Id from Account", "conf": { "batchSize": "50" } }' "https://rest.zuora.com/v1/action/query"
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Limit the number of records returned by Query call with REST API
I'd suggest updating the documentation for Action (Query) with this information. I have an API use case where this information would have been useful up front versus digging around in Community posts.
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Limit the number of records returned by Query call with REST API
Hi @jwilliams, the conf
> batchSize
field is not shown in the request sample in the docs, but it is documented under REQUEST BODY SCHEMA:
Thanks for pointing this out!
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Limit the number of records returned by Query call with REST API
David -
Thanks for the pointer. I did not see the twistie to expand that section.
Warm regards,
Jim Williams