<?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 Re: Question on the &amp;quot;after&amp;quot; parameter in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1061754#M77750</link>
    <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/602870"&gt;@DanaIrvine&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; I completely understand why this is confusing until you do it a few times.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't have 200+ Tickets in my test portal, but I think I can still give an example that is enough to get you started.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my test portal, I have 12 Tickets:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2024-10-28 at 16.42.45@2x.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/130348i8CB8DE433FF194F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2024-10-28 at 16.42.45@2x.png" alt="CleanShot 2024-10-28 at 16.42.45@2x.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For our example purposes, we'll make our request using a `Limit` of 5, and then use the `After` value to page through the others.&lt;/P&gt;
&lt;P&gt;Request one (to get `after` value)&lt;/P&gt;
&lt;P&gt;Request&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;POST https://api.hubapi.com/crm/v3/objects/tickets/search&lt;/LI-CODE&gt;
&lt;P&gt;Request body&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "limit": 5
}&lt;/LI-CODE&gt;
&lt;P&gt;Response&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "total": 12,
    "results": [
        {
            "id": ...
        }
    ],
    "paging": {
        "next": {
            "after": "5"
        }
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For all the following requests, we will include the `after` value in our requests in the body&lt;/P&gt;
&lt;P&gt;Request #2 (which will return the next five tickets)&lt;/P&gt;
&lt;P&gt;Body&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "limit": 5,
    "after": "5"
}&lt;/LI-CODE&gt;
&lt;P&gt;Request #3 (which will return the last two tickets)&lt;/P&gt;
&lt;P&gt;Body&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "limit": 5,
    "after": "10"
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, since you are not sending a `limit` value, I'd expect the `after` values to come in increments of 200 for each response —&amp;nbsp;&lt;SPAN&gt;"after"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"200",&amp;nbsp;"after": "400",&amp;nbsp;"after": "600", etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;For me personally, when I'm testing, I find Postman to be the easiest way to gain an understanding of how the Search API wants to behave. &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I hope this helps get you moving forward! — Jaycee&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 28 Oct 2024 22:59:08 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2024-10-28T22:59:08Z</dc:date>
    <item>
      <title>Question on the "after" parameter</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1061707#M77748</link>
      <description>&lt;P&gt;I am using&amp;nbsp;&lt;SPAN&gt;/crm/v3/objects/tickets/search to search tickets. The issue I am having is I am expecting more than 200 results, but there's a limit of 200 with a search. I believe the "after" parameter is my solution to query additional pages of data but I can't figure out what it is expecting there, or how it is used.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 20:54:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1061707#M77748</guid>
      <dc:creator>DanaIrvine</dc:creator>
      <dc:date>2024-10-28T20:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Question on the "after" parameter</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1061754#M77750</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/602870"&gt;@DanaIrvine&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; I completely understand why this is confusing until you do it a few times.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't have 200+ Tickets in my test portal, but I think I can still give an example that is enough to get you started.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my test portal, I have 12 Tickets:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2024-10-28 at 16.42.45@2x.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/130348i8CB8DE433FF194F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2024-10-28 at 16.42.45@2x.png" alt="CleanShot 2024-10-28 at 16.42.45@2x.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For our example purposes, we'll make our request using a `Limit` of 5, and then use the `After` value to page through the others.&lt;/P&gt;
&lt;P&gt;Request one (to get `after` value)&lt;/P&gt;
&lt;P&gt;Request&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;POST https://api.hubapi.com/crm/v3/objects/tickets/search&lt;/LI-CODE&gt;
&lt;P&gt;Request body&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "limit": 5
}&lt;/LI-CODE&gt;
&lt;P&gt;Response&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "total": 12,
    "results": [
        {
            "id": ...
        }
    ],
    "paging": {
        "next": {
            "after": "5"
        }
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For all the following requests, we will include the `after` value in our requests in the body&lt;/P&gt;
&lt;P&gt;Request #2 (which will return the next five tickets)&lt;/P&gt;
&lt;P&gt;Body&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "limit": 5,
    "after": "5"
}&lt;/LI-CODE&gt;
&lt;P&gt;Request #3 (which will return the last two tickets)&lt;/P&gt;
&lt;P&gt;Body&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "limit": 5,
    "after": "10"
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, since you are not sending a `limit` value, I'd expect the `after` values to come in increments of 200 for each response —&amp;nbsp;&lt;SPAN&gt;"after"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"200",&amp;nbsp;"after": "400",&amp;nbsp;"after": "600", etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;For me personally, when I'm testing, I find Postman to be the easiest way to gain an understanding of how the Search API wants to behave. &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I hope this helps get you moving forward! — Jaycee&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Oct 2024 22:59:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1061754#M77750</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-10-28T22:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Question on the "after" parameter</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1062083#M77769</link>
      <description>Thanks, now I get an error.&lt;BR /&gt;&lt;BR /&gt;This works, returns 5 records:&lt;BR /&gt;{&lt;BR /&gt;"limit": 5,&lt;BR /&gt;"after": "0",&lt;BR /&gt;"properties": [&lt;BR /&gt;"id"&lt;BR /&gt;],&lt;BR /&gt;"filterGroups":[{&lt;BR /&gt;"filters":[&lt;BR /&gt;{&lt;BR /&gt;"propertyName":"hs_lastmodifieddate",&lt;BR /&gt;"operator":"BETWEEN",&lt;BR /&gt;"highValue": 1730260800000,&lt;BR /&gt;"value":1727755200000&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"propertyName":"hs_pipeline",&lt;BR /&gt;"operator":"EQ",&lt;BR /&gt;"value":63784995&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}],&lt;BR /&gt;"sorts": [{&lt;BR /&gt;"propertyName": "id",&lt;BR /&gt;"direction": "ASCENDING"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;This gives an error , returns the same 5 records: "Invalid input JSON on line 27, column 3: Could not resolve subtype of [simple type, class&lt;BR /&gt;| com.hubspot.conversations.publicapi.core.messages.PublicMessageEgg]: missing type id property \u0027type\u0027"&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"limit": 5,&lt;BR /&gt;"after": "5",&lt;BR /&gt;"properties": [&lt;BR /&gt;"id"&lt;BR /&gt;],&lt;BR /&gt;"filterGroups":[{&lt;BR /&gt;"filters":[&lt;BR /&gt;{&lt;BR /&gt;"propertyName":"hs_lastmodifieddate",&lt;BR /&gt;"operator":"BETWEEN",&lt;BR /&gt;"highValue": 1730260800000,&lt;BR /&gt;"value":1727755200000&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"propertyName":"hs_pipeline",&lt;BR /&gt;"operator":"EQ",&lt;BR /&gt;"value":63784995&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}],&lt;BR /&gt;"sorts": [{&lt;BR /&gt;"propertyName": "id",&lt;BR /&gt;"direction": "ASCENDING"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The only difference is after 0 vs after 5.&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Oct 2024 14:49:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1062083#M77769</guid>
      <dc:creator>DanaIrvine</dc:creator>
      <dc:date>2024-10-29T14:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Question on the "after" parameter</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1062094#M77770</link>
      <description>&lt;P&gt;&amp;nbsp;- as Jaycee mentions, you should check the value of the total and paging.next.after values returned from your first call.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;{ "total": 12, "results": [ { "id": ... } ], 
"paging": { "next": { "after": "5" } } }&lt;/LI-CODE&gt;
&lt;P&gt;If these do not indicate addition records available then there may be something else going wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/602870"&gt;@DanaIrvine&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 14:59:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1062094#M77770</guid>
      <dc:creator>SteveHTM</dc:creator>
      <dc:date>2024-10-29T14:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Question on the "after" parameter</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1062147#M77773</link>
      <description>Nevermind, assigned a variable in the wrong spot in my loop.. duh!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Meet with Dana Irvine&amp;lt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[A close up of a logo Description automatically generated]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[facebook]&amp;lt;&amp;gt; [linkedin] &amp;lt;&amp;gt; [twitter] &amp;lt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Dana Irvine (they/them/theirs)&lt;BR /&gt;IT Manager&lt;BR /&gt;&lt;BR /&gt;Tel: 866.444.4615 x1007&lt;BR /&gt;&lt;BR /&gt;Direct: 609-879-0020&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.paragonpayroll.com" target="_blank"&gt;www.paragonpayroll.com&lt;/A&gt;&amp;lt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Please note that all times are EST unless otherwise specified.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;________________________________&lt;BR /&gt;From: Dana Irvine&lt;BR /&gt;Sent: Tuesday, October 29, 2024 11:16 AM&lt;BR /&gt;To: hubspot.prod|52220eb7|6fe2fc0f-89cb-443a-a18d-e14f3c523b06@replybyemail.usw2.prod.hosted.lithcloud.com&lt;BR /&gt;Subject: Re: Question on the "after" parameter&lt;BR /&gt;&lt;BR /&gt;I am running this in powershell, the same JSON works in postman. Makes no sense.&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Oct 2024 16:02:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Question-on-the-quot-after-quot-parameter/m-p/1062147#M77773</guid>
      <dc:creator>DanaIrvine</dc:creator>
      <dc:date>2024-10-29T16:02:36Z</dc:date>
    </item>
  </channel>
</rss>

