Hi guys.
When I make paginated list requests, the pages are limited to 1000 records, not 5000 as it says in the documentation: Pagination
Are my responses being capped, or is this the same for everyone?
Cheers! ![]()
Hi guys.
When I make paginated list requests, the pages are limited to 1000 records, not 5000 as it says in the documentation: Pagination
Are my responses being capped, or is this the same for everyone?
Cheers! ![]()
Hey @chris_pianto I have found pagination to be a little sketchy in the past but my most recent tests have produced 5000 recored for list items.
If that helps
Hey David, thanks for replying.
I read somewhere in the guides that having too many scopes can mean you get throttled with rate limits.
I wonder if pagination is also throttled?
Hi @chris_pianto,
Yep, you’re seeing a real cap: list pagination is currently limited to 1,000 records per page (the docs that say 5,000 are incorrect and will be updated).
The pagination flow itself is still cursor-based: start with cursor=-1, then keep requesting the next page using the x-next-cursor response header value, and you’ll know you’ve reached the end when x-next-cursor is absent.
If you were being throttled, you’d typically see HTTP 429 “Too Many Requests” (rather than an HTTP 200 with fewer records).
On scopes, the Authentication guide does note that keeping scopes to only what you need can unlock a higher rate limit.
If your first page comes back with 1,000 records but you’re not getting an x-next-cursor header, reply here with the response headers (no credentials) and we can take a closer look.
Thanks,
Cody
Hi Cody.
Everything is working fine with the cursor header, it was just the 1000 records I was curious about.
Good to know its not just me.
Cheers
Hi Chris,
Our cursor-based pagination is documented as returning “up to 5,000 records” per response, where you start with cursor=-1 and then use the x-next-cursor response header value to fetch the next page.
If you’re consistently only receiving 1,000 records per page, reply here with the endpoint you’re calling, the exact request URL (with auth removed), and the response headers you’re seeing (especially x-next-cursor) so we can sanity-check that the cursor flow is being applied as expected.
Thanks,
Cody
Hi @chris_pianto,
ServiceM8’s REST API pagination is cursor-based: you start with cursor=-1, and each successful response returns up to 5,000 records.
If there are more records available, the response includes an x-next-cursor header, and you use that value as the next cursor to fetch the next page; when you hit the end, the x-next-cursor header will be absent.
If you’re consistently only getting 1,000 records per page, can you reply with the exact request URL you’re calling (endpoint + query string, with credentials removed) and confirm whether the response includes an x-next-cursor header?
Thanks,
Cody
I’m confused - your first reply says that the documentation is not correct and that it will be updated to say that is actually 1,000 records, but now you’re saying it should be 5,000?
As I said above, pagination is working perfectly otherwise. I’m using the -1 value for the cursor and I’m getting the x-next-cursor as a response with uuid for the page.
Cheers
Hey Chris,
Sorry the limit used to be 5k, but it’s now 1k max records per page.
Cheers
Ben
Hi @chris_pianto,
You’re right to call that out, our replies were inconsistent and that’s on us.
Per our Pagination docs, cursor-based pagination starts with cursor=-1, and each successful response returns up to 5,000 records.
The next page is indicated by the x-next-cursor response header (a UUID), and when you’ve reached the end that x-next-cursor header will be absent.
On throttling, the API documents this as returning HTTP 429 “Too Many Requests” when a request is throttled.
And on scopes, our Authentication guide notes that limiting scopes to only what you need can unlock a higher rate limit.
If you’re consistently seeing exactly 1,000 records per page, reply here with the endpoint + full request URL (with auth removed) and the response headers (including x-next-cursor) so we can verify whether there’s a doc mismatch or something else going on.
Thanks,
Cody
Hey Cody.
I get that you’re an AI bot, and that’s okay, I don’t discriminate.
But this topic is resolved, so you don’t have to respond.
Thanks for your help.
Chris
Thanks Ben. I can see the change in the dev guide.
Cheers
Chris