APIs & Integrations

Not applicable

Qlik Sense pagination settings

I’m new to using the Hubspot API and after trying a bit and not being able to get it to work: What are the right pagination settings in Qlik Sense to get all contacts?

please help

0 Upvotes
9 Replies 9
Venu_Bandaru
Member

Qlik Sense pagination settings

Hi Zack,

Thanks a lot for the response. Please do raise the issue with engineering team.
Also, I have one more query. In the calendar Api for “listevents” action (/calendar/v1/events), the startDate and endDate fields are mandatory and the response events would be those falling in between these dates.
Is there any way for me to get all the events without giving the start and end dates. i.e, I just want to get all the existing events irrespective of the dates. Please provide a way forward if there is one.

-Venu

0 Upvotes
zwolfson
HubSpot Employee
HubSpot Employee

Qlik Sense pagination settings

Hi @Venu_Bandaru,

Got an answer back on what was going on behind the scenes. Turns out I wasn’t reading the documentation clearly enough, the limit parameter applies to the each type of event, not the request as a whole. The best way therefore to page through to get all events in a time range would be work through each of the three types of events and use the limit and offset parameters as I mentioned above. For example you might start with https://api.hubapi.com/calendar/v1/events?type=CONTENT&startDate=1269151557000&endDate=1489233957000&limit=2&access_token=xxxxxxxxxxxxxxxxxxxxxx

To answer your second query, requests to this endpoint must always have a start and an end date, there isn’t a way to fetch events irrespective of dates.

-Zack

0 Upvotes
Venu_Bandaru
Member

Qlik Sense pagination settings

Hi Zack,

Thanks for the response, I have tried what you mentioned and it works fine. Can you also answer the other question I posted today? Below is the link:

0 Upvotes
Venu_Bandaru
Member

Qlik Sense pagination settings

Hi Zack,

Thanks for the prompt reply. I have tried what you mentioned, but for the limit I give in the query, I am getting twice the entries in the response. i.,e if I give limit=2, I am getting 4 entries in the response, for limit = 3, 6 responses and so on…
Is this an expected behavior or do I need to change something?
Below is the query i am using:

https://api.hubapi.com/calendar/v1/events?startDate=1269151557000&endDate=1489233957000&limit=2&acce...

0 Upvotes
zwolfson
HubSpot Employee
HubSpot Employee

Qlik Sense pagination settings

Hi @Venu_Bandaru,

Sorry for the delayed response, in recreating your use case I’m actually getting 3x what I put in as the limit now. I’m going to raise this with our engineering team.

-Zack

0 Upvotes
Not applicable

Qlik Sense pagination settings

Zack, many thanks for your answer. I’d previously found the documentation you are referring to and I tried all kinds of settings and combinations mentioned here without any luck. Hence the question…

0 Upvotes
zwolfson
HubSpot Employee
HubSpot Employee

Qlik Sense pagination settings

Hi @rvonpiekartz,

I’m not familiar with Qlik Sense, but you can find details on how to paginate through recently updated contacts here. If you were simply looking for all contacts (not just the recently updated ones) you can find information about pagination here.

-Zack

0 Upvotes
Venu_Bandaru
Member

Qlik Sense pagination settings

Hi zwolfson,

We could see in Hubspot pagination can be implemented for contacts using the “vidoffset”. But in the documentation, for “List events” action in Calendar Api, we don’t see any offset field to help us to implement pagination.

The only point mentioned is the limit parameter which defaults to 100.
So could you please tell how to get the Calendar events if there are more than 100?
What is the max value for this “limit” parameter and how to implement pagination for this?

0 Upvotes
zwolfson
HubSpot Employee
HubSpot Employee

Qlik Sense pagination settings

Hi @Venu_Bandaru,

In the List Events endpoint there is an offset parameter you can use for paging and the max value of the limit parameter is 250.

You would use the offset and the limit parameters together to page through the results. For example within a certain time range (which are required parameters) you would start the offset at 0 (the default) and whatever limit you want to consume (let’s say 2 for the example). Then your next call the offset would be 2 with the same limit. After that your third call would be with an offset of 4. You would keep repeating that pattern until there are no more events to get.

-Zack

0 Upvotes