<?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 Issue with ClickUp API Pagination in Qlik (Rest Connector) in Data Movement &amp; Streaming</title>
    <link>https://community.qlik.com/t5/Data-Movement-Streaming/Issue-with-ClickUp-API-Pagination-in-Qlik-Rest-Connector/m-p/2499115#M2954</link>
    <description>&lt;P&gt;I'm working with ClickUp's API using the REST connector and facing an issue with pagination. The ClickUp API provides only a &lt;CODE&gt;page&lt;/CODE&gt; query parameter for pagination, and the response includes a &lt;CODE&gt;last_page&lt;/CODE&gt; boolean in the JSON. However, I couldn't use the pagination feature provided in the Qlik REST connector since it only supports &lt;CODE&gt;next_page&lt;/CODE&gt; and &lt;CODE&gt;last_page&lt;/CODE&gt;, and I only have access to the &lt;CODE&gt;page&lt;/CODE&gt; parameter.&lt;/P&gt;
&lt;P&gt;To handle pagination manually, I implemented a &lt;CODE&gt;DO WHILE&lt;/CODE&gt; loop in the script. Despite this, I still face redundancy issues with many tasks having the same &lt;CODE&gt;key_task&lt;/CODE&gt;, resulting in duplicates + im not really getting all the tasks from the 9 pages some are still missing. Here’s a snippet of my code:&lt;/P&gt;
&lt;P&gt;LET page = 1; // Start with page 1&lt;/P&gt;
&lt;P&gt;//***************************************************************************************&lt;BR /&gt;LIB CONNECT TO 'Dev_Tasks';&lt;/P&gt;
&lt;P&gt;// Loop to fetch all pages&lt;BR /&gt;DO WHILE page &amp;lt;= 9&lt;BR /&gt;// Chargement des données depuis le connecteur REST&lt;BR /&gt;RestConnectorMasterTable:&lt;BR /&gt;SQL SELECT &lt;BR /&gt;"__KEY_root",&lt;BR /&gt;(SELECT &lt;BR /&gt;"id" AS "id_u9",&lt;BR /&gt;"custom_id",&lt;BR /&gt;"custom_item_id",&lt;BR /&gt;"name" AS "name_u4",&lt;BR /&gt;"text_content",&lt;BR /&gt;"description",&lt;BR /&gt;"orderindex" AS "orderindex_u1",&lt;BR /&gt;"date_created" AS "date_created_u1",&lt;BR /&gt;"date_updated",&lt;BR /&gt;"date_closed",&lt;BR /&gt;"date_done",&lt;BR /&gt;"archived",&lt;BR /&gt;"parent",&lt;BR /&gt;"top_level_parent",&lt;BR /&gt;"priority",&lt;BR /&gt;"due_date",&lt;BR /&gt;"start_date",&lt;BR /&gt;"points",&lt;BR /&gt;"time_estimate",&lt;BR /&gt;"team_id",&lt;BR /&gt;"url",&lt;BR /&gt;"permission_level",&lt;BR /&gt;"__KEY_tasks",&lt;BR /&gt;"__FK_tasks",&lt;BR /&gt;(SELECT &lt;BR /&gt;"status",&lt;BR /&gt;"id",&lt;BR /&gt;"color",&lt;BR /&gt;"type",&lt;BR /&gt;"orderindex",&lt;BR /&gt;"__FK_status"&lt;BR /&gt;FROM "status" FK "__FK_status"),&lt;BR /&gt;(SELECT &lt;BR /&gt;"id" AS "id_u0",&lt;BR /&gt;"username",&lt;BR /&gt;"color" AS "color_u0",&lt;BR /&gt;"email",&lt;BR /&gt;"profilePicture",&lt;BR /&gt;"__FK_creator"&lt;BR /&gt;FROM "creator" FK "__FK_creator"),&lt;BR /&gt;(SELECT &lt;BR /&gt;"id" AS "id_u1",&lt;BR /&gt;"username" AS "username_u0",&lt;BR /&gt;"color" AS "color_u1",&lt;BR /&gt;"initials",&lt;BR /&gt;"email" AS "email_u0",&lt;BR /&gt;"profilePicture" AS "profilePicture_u0",&lt;BR /&gt;"__FK_assignees"&lt;BR /&gt;FROM "assignees" FK "__FK_assignees")&lt;BR /&gt;FROM "tasks" PK "__KEY_tasks" FK "__FK_tasks")&lt;BR /&gt;FROM JSON (wrap on) "root" PK "__KEY_root" FK "__FK_tasks"&lt;BR /&gt;WITH CONNECTION (&lt;BR /&gt;URL "&lt;A href="https://api.clickup.com/api/v2/list/901800546921/task?subtasks=true&amp;amp;include_closed=true&amp;amp;page=$(page" target="_blank" rel="noopener"&gt;https://api.clickup.com/api/v2/list/901800546921/task?subtasks=true&amp;amp;include_closed=true&amp;amp;page=$(page&lt;/A&gt;)"&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;// Increment the page number&lt;BR /&gt;LET page = $(page) + 1;&lt;/P&gt;
&lt;P&gt;// Trace the current page number for debugging&lt;BR /&gt;TRACE Page Number: $(page);&lt;/P&gt;
&lt;P&gt;LOOP;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Mar 2025 21:46:28 GMT</pubDate>
    <dc:creator>cyrine</dc:creator>
    <dc:date>2025-03-19T21:46:28Z</dc:date>
    <item>
      <title>Issue with ClickUp API Pagination in Qlik (Rest Connector)</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/Issue-with-ClickUp-API-Pagination-in-Qlik-Rest-Connector/m-p/2499115#M2954</link>
      <description>&lt;P&gt;I'm working with ClickUp's API using the REST connector and facing an issue with pagination. The ClickUp API provides only a &lt;CODE&gt;page&lt;/CODE&gt; query parameter for pagination, and the response includes a &lt;CODE&gt;last_page&lt;/CODE&gt; boolean in the JSON. However, I couldn't use the pagination feature provided in the Qlik REST connector since it only supports &lt;CODE&gt;next_page&lt;/CODE&gt; and &lt;CODE&gt;last_page&lt;/CODE&gt;, and I only have access to the &lt;CODE&gt;page&lt;/CODE&gt; parameter.&lt;/P&gt;
&lt;P&gt;To handle pagination manually, I implemented a &lt;CODE&gt;DO WHILE&lt;/CODE&gt; loop in the script. Despite this, I still face redundancy issues with many tasks having the same &lt;CODE&gt;key_task&lt;/CODE&gt;, resulting in duplicates + im not really getting all the tasks from the 9 pages some are still missing. Here’s a snippet of my code:&lt;/P&gt;
&lt;P&gt;LET page = 1; // Start with page 1&lt;/P&gt;
&lt;P&gt;//***************************************************************************************&lt;BR /&gt;LIB CONNECT TO 'Dev_Tasks';&lt;/P&gt;
&lt;P&gt;// Loop to fetch all pages&lt;BR /&gt;DO WHILE page &amp;lt;= 9&lt;BR /&gt;// Chargement des données depuis le connecteur REST&lt;BR /&gt;RestConnectorMasterTable:&lt;BR /&gt;SQL SELECT &lt;BR /&gt;"__KEY_root",&lt;BR /&gt;(SELECT &lt;BR /&gt;"id" AS "id_u9",&lt;BR /&gt;"custom_id",&lt;BR /&gt;"custom_item_id",&lt;BR /&gt;"name" AS "name_u4",&lt;BR /&gt;"text_content",&lt;BR /&gt;"description",&lt;BR /&gt;"orderindex" AS "orderindex_u1",&lt;BR /&gt;"date_created" AS "date_created_u1",&lt;BR /&gt;"date_updated",&lt;BR /&gt;"date_closed",&lt;BR /&gt;"date_done",&lt;BR /&gt;"archived",&lt;BR /&gt;"parent",&lt;BR /&gt;"top_level_parent",&lt;BR /&gt;"priority",&lt;BR /&gt;"due_date",&lt;BR /&gt;"start_date",&lt;BR /&gt;"points",&lt;BR /&gt;"time_estimate",&lt;BR /&gt;"team_id",&lt;BR /&gt;"url",&lt;BR /&gt;"permission_level",&lt;BR /&gt;"__KEY_tasks",&lt;BR /&gt;"__FK_tasks",&lt;BR /&gt;(SELECT &lt;BR /&gt;"status",&lt;BR /&gt;"id",&lt;BR /&gt;"color",&lt;BR /&gt;"type",&lt;BR /&gt;"orderindex",&lt;BR /&gt;"__FK_status"&lt;BR /&gt;FROM "status" FK "__FK_status"),&lt;BR /&gt;(SELECT &lt;BR /&gt;"id" AS "id_u0",&lt;BR /&gt;"username",&lt;BR /&gt;"color" AS "color_u0",&lt;BR /&gt;"email",&lt;BR /&gt;"profilePicture",&lt;BR /&gt;"__FK_creator"&lt;BR /&gt;FROM "creator" FK "__FK_creator"),&lt;BR /&gt;(SELECT &lt;BR /&gt;"id" AS "id_u1",&lt;BR /&gt;"username" AS "username_u0",&lt;BR /&gt;"color" AS "color_u1",&lt;BR /&gt;"initials",&lt;BR /&gt;"email" AS "email_u0",&lt;BR /&gt;"profilePicture" AS "profilePicture_u0",&lt;BR /&gt;"__FK_assignees"&lt;BR /&gt;FROM "assignees" FK "__FK_assignees")&lt;BR /&gt;FROM "tasks" PK "__KEY_tasks" FK "__FK_tasks")&lt;BR /&gt;FROM JSON (wrap on) "root" PK "__KEY_root" FK "__FK_tasks"&lt;BR /&gt;WITH CONNECTION (&lt;BR /&gt;URL "&lt;A href="https://api.clickup.com/api/v2/list/901800546921/task?subtasks=true&amp;amp;include_closed=true&amp;amp;page=$(page" target="_blank" rel="noopener"&gt;https://api.clickup.com/api/v2/list/901800546921/task?subtasks=true&amp;amp;include_closed=true&amp;amp;page=$(page&lt;/A&gt;)"&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;// Increment the page number&lt;BR /&gt;LET page = $(page) + 1;&lt;/P&gt;
&lt;P&gt;// Trace the current page number for debugging&lt;BR /&gt;TRACE Page Number: $(page);&lt;/P&gt;
&lt;P&gt;LOOP;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 21:46:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/Issue-with-ClickUp-API-Pagination-in-Qlik-Rest-Connector/m-p/2499115#M2954</guid>
      <dc:creator>cyrine</dc:creator>
      <dc:date>2025-03-19T21:46:28Z</dc:date>
    </item>
  </channel>
</rss>

