APIs & Integrations

RafaelAMello
Member

Get all Tickets API returning incorrect offset

SOLVE

There is an issue where the offset param in the get all tickets is returning the same offset param used in the API call:

Here is what is happening from my end (using python):

>>> response = requests.get('https://api.hubapi.com/crm-objects/v1/objects/tickets/paged?hapikey=HAPIKEY')
>>> response.json()
>>> {'hasMore': True, 'objects': [{'isDeleted': False, 'objectId': 911191, 'objectType': 'TICKET',  'portalId': 1960791, 'properties': {}}, {'isDeleted': False,  'objectId': 911196, 'objectType': 'TICKET','portalId': 1960791,'properties': {}}],'offset': 914346}
>>> new_response = requests.get('https://api.hubapi.com/crm-objects/v1/objects/tickets/paged?hapikey=HAPIKEYoffset=914346')
>>> new_response.json()
>>>  {'hasMore': True,
'objects': [{'isDeleted': False,
'objectId': 911191,
'objectType': 'TICKET',
'portalId': 1960791,
'properties': {}},
{'isDeleted': False,
'objectId': 911196,
'objectType': 'TICKET',
'portalId': 1960791,
'properties': {}}],
'offset': 914346}
>>>  new_response = requests.get('https://api.hubapi.com/crm-objects/v1/objects/tickets/paged?hapikey=HAPIKEYoffset=914346')
>>> new_response.json()
>>> {'hasMore': True,
'objects': [{'isDeleted': False,
'objectId': 911191,
'objectType': 'TICKET',
'portalId': 1960791,
'properties': {}},
{'isDeleted': False,
'objectId': 911196,
'objectType': 'TICKET',
'portalId': 1960791,
'properties': {}}],
'offset': 914346}

And do so - this gets us stuck in an infinite loop where we never get the next page of results

Any advice on what I am doing wrong? This looks like a bit of a bug?

0 Upvotes
1 Accepted solution
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

Get all Tickets API returning incorrect offset

SOLVE

Hi @RafaelAMello, the team has addressed the issue that was causing the same ticket number to be returned in each offset. You should be all set moving forward!

View solution in original post

3 Replies 3
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

Get all Tickets API returning incorrect offset

SOLVE

Hi @RafaelAMello, the team has addressed the issue that was causing the same ticket number to be returned in each offset. You should be all set moving forward!

cbarley
HubSpot Alumni
HubSpot Alumni

Get all Tickets API returning incorrect offset

SOLVE

Hey @RafaelAMello, the endpoint is still in developer preview, so there are a few kinks here. The CRM team is currently investigating the issue but I do not have an update at this time. Thanks for your patience

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Get all Tickets API returning incorrect offset

SOLVE

Hi @RafaelAMello, that seems strange. I can reproduce using an internal REST client. I'm going to reach out to my team and get back to you with what I find.