<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is there a way to speed up the Email Event get campaign IDs API? in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Is-there-a-way-to-speed-up-the-Email-Event-get-campaign-IDs-API/m-p/322345#M31059</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to retrieve the email event (campaign) data from Hubspot into our database.&amp;nbsp; I'm trying to get the unique campaign ID using the following API.&lt;/P&gt;&lt;P&gt;All IDs:&amp;nbsp;&amp;nbsp;&lt;A href="https://api.hubapi.com/email/public/v1/campaigns/by-id?hapikey=demo&amp;amp;limit=3" target="_blank"&gt;https://api.hubapi.com/email/public/v1/campaigns/by-id&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Recent IDs:&amp;nbsp;&amp;nbsp;&lt;A href="https://api.hubapi.com/email/public/v1/campaigns" target="_blank"&gt;https://api.hubapi.com/email/public/v1/campaigns&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Both of these API seems to take a very long time to run and they seem trying to retrieve over a million of records...Is there a way to make any of these two API run faster?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to get the unique campaign IDs using either of the menioned API and then combine them with with another API to get the detailed data about each campaign.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;--Allan&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 16:36:47 GMT</pubDate>
    <dc:creator>Benchmark_achen</dc:creator>
    <dc:date>2020-02-27T16:36:47Z</dc:date>
    <item>
      <title>Is there a way to speed up the Email Event get campaign IDs API?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Is-there-a-way-to-speed-up-the-Email-Event-get-campaign-IDs-API/m-p/322345#M31059</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to retrieve the email event (campaign) data from Hubspot into our database.&amp;nbsp; I'm trying to get the unique campaign ID using the following API.&lt;/P&gt;&lt;P&gt;All IDs:&amp;nbsp;&amp;nbsp;&lt;A href="https://api.hubapi.com/email/public/v1/campaigns/by-id?hapikey=demo&amp;amp;limit=3" target="_blank"&gt;https://api.hubapi.com/email/public/v1/campaigns/by-id&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Recent IDs:&amp;nbsp;&amp;nbsp;&lt;A href="https://api.hubapi.com/email/public/v1/campaigns" target="_blank"&gt;https://api.hubapi.com/email/public/v1/campaigns&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Both of these API seems to take a very long time to run and they seem trying to retrieve over a million of records...Is there a way to make any of these two API run faster?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to get the unique campaign IDs using either of the menioned API and then combine them with with another API to get the detailed data about each campaign.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;--Allan&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 16:36:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Is-there-a-way-to-speed-up-the-Email-Event-get-campaign-IDs-API/m-p/322345#M31059</guid>
      <dc:creator>Benchmark_achen</dc:creator>
      <dc:date>2020-02-27T16:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to speed up the Email Event get campaign IDs API?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Is-there-a-way-to-speed-up-the-Email-Event-get-campaign-IDs-API/m-p/322599#M31074</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/94325"&gt;@Benchmark_achen&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried setting a limit and loop through the results based on the hasMore and offset value? On my end, I have tried using the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/email/get_campaigns" target="_blank"&gt;Get campaign IDs sorted by recent activity for a portal | Email Events API&lt;/A&gt; to retrieve all campaign IDs on portal 563xxxx and set a limit of 100 e.g.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;https://api.hubspot.com/email/public/v1/campaigns?hapikey={{hapikey}}&amp;amp;limit=100&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The response returned was pretty instant. In this case, would you mind clarifying how long it took for you when you run the two endpoints?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 03:03:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Is-there-a-way-to-speed-up-the-Email-Event-get-campaign-IDs-API/m-p/322599#M31074</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-02-28T03:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to speed up the Email Event get campaign IDs API?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Is-there-a-way-to-speed-up-the-Email-Event-get-campaign-IDs-API/m-p/322725#M31092</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/66274"&gt;@WendyGoh&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on your response and the fact that I wasn't able to get any of these two APIs to finish during my testing (I stopped them after a few hours), I finally realized that there must have something to do with stop indicator.&amp;nbsp; I use ZappySys JSON Source SSIS component to run these APIs.&amp;nbsp; In the component, I set the Array Filter to $.campaign which is one level down from the parent.&amp;nbsp; But, the hasMore indiciator is at the parent level.&amp;nbsp; Therefore, when I use the default $.hasMore = false to stop the execution, it has no effect.&amp;nbsp; I have to manually type in $.P_hasMore to resolve the issue&amp;nbsp; (P_ indicate the parent level).&amp;nbsp; Now, the API complete in an instant...just like you said.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;--Allan&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 14:36:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Is-there-a-way-to-speed-up-the-Email-Event-get-campaign-IDs-API/m-p/322725#M31092</guid>
      <dc:creator>Benchmark_achen</dc:creator>
      <dc:date>2020-02-28T14:36:06Z</dc:date>
    </item>
  </channel>
</rss>

