Hubspot api,Only 100 tickets per request!

tickets

#1

Hi team, I came across this situation were I was trying to find a newly created ticket but I could not see it in the response I was requesting, found it bit odd that I always got a array of 100 elements, so I check documentation and it only allows 100 tickets per request -> https://developers.hubspot.com/docs/methods/tickets/get-all-tickets

Blockquote Get all tickets from a portal, up to 100 per request.

I can get ticket by id ( https://developers.hubspot.com/docs/methods/tickets/get_ticket_by_id ) but...I need to get all tickets....how can I solve this?

best regards


#3

Hi @codeling,

Happy to clarify.

When you make that first request, it will return a hasMore boolean and an offset value. You can then append the offset value to the request URL to get the next 100 tickets in your second call, and so on until "hasMore": false.

There are a number of ways to approach this, but Connor's repo here may be a good place to start if you're not sure how to set up the looping requests.