<?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: Offset makes static lists API v1 endpoint unusable (can't paginate records for enterprise custom in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Offset-makes-static-lists-API-v1-endpoint-unusable-can-t/m-p/805530#M64772</link>
    <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/581643"&gt;@RichSteinmetz&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Welcome to our community!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a few initial questions to help get us started:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;For your initial requests, are you sending a `count` and `offset`? Or just an offset?&lt;/LI&gt;
&lt;LI&gt;What's the result and returned `offset` when you make use an initial request URL like this?&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;https://api.hubapi.com/contacts/v1/lists/static?count=250​&lt;/LI-CODE&gt;Do you get an offset returned?&lt;/LI&gt;
&lt;LI&gt;For this portal specifically, have you observed this issue with other endpoints or only with the static lists endpoint?&lt;/LI&gt;
&lt;LI&gt;Could you please confirm the language/library you are using to make these API calls? It looks like Ruby from the code snippets you provided, but I want to be certain &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thank you very much for the additional information! — Jaycee&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 22:39:53 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2023-06-09T22:39:53Z</dc:date>
    <item>
      <title>Offset makes static lists API v1 endpoint unusable (can't paginate records for enterprise customer)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Offset-makes-static-lists-API-v1-endpoint-unusable-can-t/m-p/805043#M64738</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hey folks, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We have a technical issue that currently affects 1 customer and it's not apparent from the API responses how to handle it (it might be an API bug).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A customer has more than 250 static lists. We try to paginate but the behavior of the offset is very strange.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With 3 records the endpoint always returns an offset of 12. Or 14 if we don't provide an offset. Or 1 if the offset is very high. Here are some example requests that we tried:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;irb(main):025:0&amp;gt; Integration::Hubspot.last.service.client.request.get("&lt;A class="" href="https://api.hubapi.com/contacts/v1/lists/static?count=1&amp;amp;offset=1" target="_blank" rel="noopener noreferrer"&gt;https://api.hubapi.com/contacts/v1/lists/static?count=1&amp;amp;offset=1&lt;/A&gt;").parse(:json)
=&amp;gt;
{"offset"=&amp;gt;12,
 "total"=&amp;gt;1,
 "lists"=&amp;gt;
  [{"portalId"=&amp;gt;21303762,
    "listId"=&amp;gt;2,
    "createdAt"=&amp;gt;1649406615866,
    "updatedAt"=&amp;gt;1649406615932,
    "name"=&amp;gt;"ali-contact-list-static",
    "listType"=&amp;gt;"STATIC",
    "authorId"=&amp;gt;3969928,
    "filters"=&amp;gt;[],
    "metaData"=&amp;gt;{"size"=&amp;gt;1, "lastSizeChangeAt"=&amp;gt;1649426380447, "processing"=&amp;gt;"DONE", "lastProcessingStateChangeAt"=&amp;gt;1649406616513, "error"=&amp;gt;"", "listReferencesCount"=&amp;gt;nil, "parentFolderId"=&amp;gt;nil},
    "archived"=&amp;gt;false,
    "teamIds"=&amp;gt;[],
    "ilsFilterBranch"=&amp;gt;"",
    "readOnly"=&amp;gt;false,
    "internal"=&amp;gt;false,
    "limitExempt"=&amp;gt;false,
    "dynamic"=&amp;gt;false}],
 "has-more"=&amp;gt;true}&lt;/PRE&gt;&lt;PRE&gt;irb(main):026:0&amp;gt; Integration::Hubspot.last.service.client.request.get("&lt;A class="" href="https://api.hubapi.com/contacts/v1/lists/static?count=1&amp;amp;offset=2" target="_blank" rel="noopener noreferrer"&gt;https://api.hubapi.com/contacts/v1/lists/static?count=1&amp;amp;offset=2&lt;/A&gt;").parse(:json)
=&amp;gt;
{"offset"=&amp;gt;12,
 "total"=&amp;gt;1,
 "lists"=&amp;gt;
  [{"portalId"=&amp;gt;21303762,
    "listId"=&amp;gt;2,
    "createdAt"=&amp;gt;1649406615866,
    "updatedAt"=&amp;gt;1649406615932,
    "name"=&amp;gt;"ali-contact-list-static",
    "listType"=&amp;gt;"STATIC",
    "authorId"=&amp;gt;3969928,
    "filters"=&amp;gt;[],
    "metaData"=&amp;gt;{"size"=&amp;gt;1, "lastSizeChangeAt"=&amp;gt;1649426380447, "processing"=&amp;gt;"DONE", "lastProcessingStateChangeAt"=&amp;gt;1649406616513, "error"=&amp;gt;"", "listReferencesCount"=&amp;gt;nil, "parentFolderId"=&amp;gt;nil},
    "archived"=&amp;gt;false,
    "teamIds"=&amp;gt;[],
    "ilsFilterBranch"=&amp;gt;"",
    "readOnly"=&amp;gt;false,
    "dynamic"=&amp;gt;false,
    "limitExempt"=&amp;gt;false,
    "internal"=&amp;gt;false}],
 "has-more"=&amp;gt;true}&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;irb(main):027:0&amp;gt; Integration::Hubspot.last.service.client.request.get("&lt;A class="" href="https://api.hubapi.com/contacts/v1/lists/static?count=1&amp;amp;offset=0" target="_blank" rel="noopener noreferrer"&gt;https://api.hubapi.com/contacts/v1/lists/static?count=1&amp;amp;offset=0&lt;/A&gt;").parse(:json)
=&amp;gt;
{"offset"=&amp;gt;12,
 "total"=&amp;gt;1,
 "lists"=&amp;gt;
  [{"portalId"=&amp;gt;21303762,
    "listId"=&amp;gt;2,
    "createdAt"=&amp;gt;1649406615866,
    "updatedAt"=&amp;gt;1649406615932,
    "name"=&amp;gt;"ali-contact-list-static",
    "listType"=&amp;gt;"STATIC",
    "authorId"=&amp;gt;3969928,
    "filters"=&amp;gt;[],
    "metaData"=&amp;gt;{"size"=&amp;gt;1, "lastSizeChangeAt"=&amp;gt;1649426380447, "processing"=&amp;gt;"DONE", "lastProcessingStateChangeAt"=&amp;gt;1649406616513, "error"=&amp;gt;"", "listReferencesCount"=&amp;gt;nil, "parentFolderId"=&amp;gt;nil},
    "archived"=&amp;gt;false,
    "teamIds"=&amp;gt;[],
    "ilsFilterBranch"=&amp;gt;"",
    "readOnly"=&amp;gt;false,
    "internal"=&amp;gt;false,
    "limitExempt"=&amp;gt;false,
    "dynamic"=&amp;gt;false}],
 "has-more"=&amp;gt;true}&lt;/PRE&gt;&lt;PRE&gt;irb(main):028:0&amp;gt; Integration::Hubspot.last.service.client.request.get("&lt;A class="" href="https://api.hubapi.com/contacts/v1/lists/static?count=1&amp;amp;offset=100" target="_blank" rel="noopener noreferrer"&gt;https://api.hubapi.com/contacts/v1/lists/static?count=1&amp;amp;offset=100&lt;/A&gt;").parse(:json)
=&amp;gt;
{"offset"=&amp;gt;1, "total"=&amp;gt;0, "lists"=&amp;gt;[], "has-more"=&amp;gt;false}&lt;/PRE&gt;&lt;PRE&gt;irb(main):029:0&amp;gt; Integration::Hubspot.last.service.client.request.get("&lt;A class="" href="https://api.hubapi.com/contacts/v1/lists/static" target="_blank" rel="noopener noreferrer"&gt;https://api.hubapi.com/contacts/v1/lists/static&lt;/A&gt;").parse(:json)
=&amp;gt;
{"offset"=&amp;gt;14,
 "total"=&amp;gt;3,
 "lists"=&amp;gt;
  [{"portalId"=&amp;gt;21303762,
    "listId"=&amp;gt;2,
    "createdAt"=&amp;gt;1649406615866,
    "updatedAt"=&amp;gt;1649406615932,
    "name"=&amp;gt;"ali-contact-list-static",
    "listType"=&amp;gt;"STATIC",
    "authorId"=&amp;gt;3969928,
    "filters"=&amp;gt;[],
    "metaData"=&amp;gt;{"size"=&amp;gt;1, "lastSizeChangeAt"=&amp;gt;1649426380447, "processing"=&amp;gt;"DONE", "lastProcessingStateChangeAt"=&amp;gt;1649406616513, "error"=&amp;gt;"", "listReferencesCount"=&amp;gt;nil, "parentFolderId"=&amp;gt;nil},
    "archived"=&amp;gt;false,
    "teamIds"=&amp;gt;[],
    "ilsFilterBranch"=&amp;gt;"",
    "readOnly"=&amp;gt;false,
    "dynamic"=&amp;gt;false,
    "limitExempt"=&amp;gt;false,
    "internal"=&amp;gt;false},
   {"portalId"=&amp;gt;21303762,
    "listId"=&amp;gt;3,
    "createdAt"=&amp;gt;1686215954821,
    "updatedAt"=&amp;gt;1686215955134,
    "name"=&amp;gt;"ali-contact-list-static (cloned)",
    "listType"=&amp;gt;"STATIC",
    "authorId"=&amp;gt;45561614,
    "filters"=&amp;gt;[],
    "metaData"=&amp;gt;{"size"=&amp;gt;1, "lastSizeChangeAt"=&amp;gt;1686215955434, "processing"=&amp;gt;"DONE", "lastProcessingStateChangeAt"=&amp;gt;1686215955216, "error"=&amp;gt;"", "listReferencesCount"=&amp;gt;nil, "parentFolderId"=&amp;gt;nil},
    "archived"=&amp;gt;false,
    "teamIds"=&amp;gt;[],
    "ilsFilterBranch"=&amp;gt;"",
    "readOnly"=&amp;gt;false,
    "dynamic"=&amp;gt;false,
    "limitExempt"=&amp;gt;false,
    "internal"=&amp;gt;false},
   {"portalId"=&amp;gt;21303762,
    "listId"=&amp;gt;4,
    "createdAt"=&amp;gt;1686215989072,
    "updatedAt"=&amp;gt;1686215989357,
    "name"=&amp;gt;"ali-contact-list-static (cloned) 2",
    "listType"=&amp;gt;"STATIC",
    "authorId"=&amp;gt;45561614,
    "filters"=&amp;gt;[],
    "metaData"=&amp;gt;{"size"=&amp;gt;1, "lastSizeChangeAt"=&amp;gt;1686215989857, "processing"=&amp;gt;"DONE", "lastProcessingStateChangeAt"=&amp;gt;1686215989473, "error"=&amp;gt;"", "listReferencesCount"=&amp;gt;nil, "parentFolderId"=&amp;gt;nil},
    "archived"=&amp;gt;false,
    "teamIds"=&amp;gt;[],
    "ilsFilterBranch"=&amp;gt;"",
    "readOnly"=&amp;gt;false,
    "dynamic"=&amp;gt;false,
    "limitExempt"=&amp;gt;false,
    "internal"=&amp;gt;false}],
 "has-more"=&amp;gt;false}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 07:15:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Offset-makes-static-lists-API-v1-endpoint-unusable-can-t/m-p/805043#M64738</guid>
      <dc:creator>RichSteinmetz</dc:creator>
      <dc:date>2023-06-09T07:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Offset makes static lists API v1 endpoint unusable (can't paginate records for enterprise custom</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Offset-makes-static-lists-API-v1-endpoint-unusable-can-t/m-p/805530#M64772</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/581643"&gt;@RichSteinmetz&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Welcome to our community!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a few initial questions to help get us started:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;For your initial requests, are you sending a `count` and `offset`? Or just an offset?&lt;/LI&gt;
&lt;LI&gt;What's the result and returned `offset` when you make use an initial request URL like this?&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;https://api.hubapi.com/contacts/v1/lists/static?count=250​&lt;/LI-CODE&gt;Do you get an offset returned?&lt;/LI&gt;
&lt;LI&gt;For this portal specifically, have you observed this issue with other endpoints or only with the static lists endpoint?&lt;/LI&gt;
&lt;LI&gt;Could you please confirm the language/library you are using to make these API calls? It looks like Ruby from the code snippets you provided, but I want to be certain &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thank you very much for the additional information! — Jaycee&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:39:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Offset-makes-static-lists-API-v1-endpoint-unusable-can-t/m-p/805530#M64772</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-06-09T22:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Offset makes static lists API v1 endpoint unusable (can't paginate records for enterprise custom</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Offset-makes-static-lists-API-v1-endpoint-unusable-can-t/m-p/805860#M64784</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;, thanks for the welcome and for checking it :))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For your initial requests, are you sending a `count` and `offset`? Or just an offset?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Each code block examples starts with a piece of code that shows the URL that we are hitting, in both cases we are passing both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;What's the result and returned `offset` when you make use an initial request URL like this?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;It's the same as not passing a count at all. The offset is 14 which to me seems pretty random given that in this dummy account we only have 3 static lists:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;&amp;gt;&amp;gt; Integration::Hubspot.last.service.client.request.get("https://api.hubapi.com/contacts/v1/lists/static?count=250").parse(:json)

=&amp;gt; 
{"offset"=&amp;gt;14,
 "total"=&amp;gt;3,
 "lists"=&amp;gt;
  [{"portalId"=&amp;gt;21303762,
    "listId"=&amp;gt;2,
    "createdAt"=&amp;gt;1649406615866,
    "updatedAt"=&amp;gt;1649406615932,
    "name"=&amp;gt;"ali-contact-list-static",
    "listType"=&amp;gt;"STATIC",
    "authorId"=&amp;gt;3969928,
    "filters"=&amp;gt;[],
    "metaData"=&amp;gt;
     {"size"=&amp;gt;1,
      "lastSizeChangeAt"=&amp;gt;1649426380447,
      "processing"=&amp;gt;"DONE",
      "lastProcessingStateChangeAt"=&amp;gt;1649406616513,
      "error"=&amp;gt;"",
      "listReferencesCount"=&amp;gt;nil,
      "parentFolderId"=&amp;gt;nil},
    "archived"=&amp;gt;false,
    "teamIds"=&amp;gt;[],
    "ilsFilterBranch"=&amp;gt;"",
    "readOnly"=&amp;gt;false,
    "limitExempt"=&amp;gt;false,
    "internal"=&amp;gt;false,
    "dynamic"=&amp;gt;false},
   {"portalId"=&amp;gt;21303762,
    "listId"=&amp;gt;3,
    "createdAt"=&amp;gt;1686215954821,
    "updatedAt"=&amp;gt;1686215955134,
    "name"=&amp;gt;"ali-contact-list-static (cloned)",
    "listType"=&amp;gt;"STATIC",
    "authorId"=&amp;gt;45561614,
    "filters"=&amp;gt;[],
    "metaData"=&amp;gt;
     {"size"=&amp;gt;1,
      "lastSizeChangeAt"=&amp;gt;1686215955434,
      "processing"=&amp;gt;"DONE",
      "lastProcessingStateChangeAt"=&amp;gt;1686215955216,
      "error"=&amp;gt;"",
      "listReferencesCount"=&amp;gt;nil,
      "parentFolderId"=&amp;gt;nil},
    "archived"=&amp;gt;false,
    "teamIds"=&amp;gt;[],
    "ilsFilterBranch"=&amp;gt;"",
    "readOnly"=&amp;gt;false,
    "limitExempt"=&amp;gt;false,
    "internal"=&amp;gt;false,
    "dynamic"=&amp;gt;false},
   {"portalId"=&amp;gt;21303762,
    "listId"=&amp;gt;4,
    "createdAt"=&amp;gt;1686215989072,
    "updatedAt"=&amp;gt;1686215989357,
    "name"=&amp;gt;"ali-contact-list-static (cloned) 2",
    "listType"=&amp;gt;"STATIC",
    "authorId"=&amp;gt;45561614,
    "filters"=&amp;gt;[],
    "metaData"=&amp;gt;
     {"size"=&amp;gt;1,
      "lastSizeChangeAt"=&amp;gt;1686215989857,
      "processing"=&amp;gt;"DONE",
      "lastProcessingStateChangeAt"=&amp;gt;1686215989473,
      "error"=&amp;gt;"",
      "listReferencesCount"=&amp;gt;nil,
      "parentFolderId"=&amp;gt;nil},
    "archived"=&amp;gt;false,
    "teamIds"=&amp;gt;[],
    "ilsFilterBranch"=&amp;gt;"",
    "readOnly"=&amp;gt;false,
    "limitExempt"=&amp;gt;false,
    "internal"=&amp;gt;false,
    "dynamic"=&amp;gt;false}],
 "has-more"=&amp;gt;false}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For this portal specifically, have you observed this issue with other endpoints or only with the static lists endpoint?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So far, we haven't noticed similar issues elsewhere, but we are also not paginating results anywhere else yet, I think.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Could you please confirm the language/library you are using to make these API calls? It looks like Ruby from the code snippets you provided, but I want to be certain&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="lia-unicode-emoji"&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It is Ruby indeed with our self-rolled client &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; (no additional libraries/gems used)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again and see you around! &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 07:10:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Offset-makes-static-lists-API-v1-endpoint-unusable-can-t/m-p/805860#M64784</guid>
      <dc:creator>RichSteinmetz</dc:creator>
      <dc:date>2023-06-12T07:10:17Z</dc:date>
    </item>
  </channel>
</rss>

