<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Web service integration with specific paging</title><link>https://community.appian.com/discussions/f/integrations/37444/web-service-integration-with-specific-paging</link><description>Hi Community, 
 
 I need to create a record type based on an external Airtable table. AirTable provides a REST API for querying the data, so I decided to create a Web Service based record type. 
 I already created a connected system and confirm that is</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Web service integration with specific paging</title><link>https://community.appian.com/thread/140243?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 14:42:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2aaad815-6c41-448f-aa42-d18d8051e015</guid><dc:creator>Habibija Safet</dc:creator><description>&lt;p&gt;Thx for prompt response. I&amp;nbsp;was not aware of this plugin. Need to check.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Web service integration with specific paging</title><link>https://community.appian.com/thread/140238?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 14:24:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:10daf262-c91c-46aa-8ba3-e33e2bf40260</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Hm ... you could try to use the textcache plugin to &amp;quot;remember&amp;quot; that value across iterations. I never tried to use it for such a scenario.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Web service integration with specific paging</title><link>https://community.appian.com/thread/140235?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 14:05:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bc2d860-fa3c-47b9-ae7f-d765845818e8</guid><dc:creator>Habibija Safet</dc:creator><description>&lt;p&gt;Dear Stefan,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m afraid I didn&amp;#39;t explain it well enough&amp;nbsp;-&amp;nbsp;offset in AirTable REST API is not a numeric value but a string (it looks like an internal rowid, i.e. &amp;quot;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;itrh6WQn9QiECOUcx/rec2ll6BYnfG79HJk&lt;/span&gt;&lt;/span&gt;&amp;quot;. It cannot be calculated - it is returned as part of the WebService response and has to be&amp;nbsp;send in the next call as is (to obtain the next page). To detect the last page, we can check if the offset in response is null (as I already explained, stop condition is not an issue here).&lt;/p&gt;
&lt;p&gt;The ultimate issue here is how to store and reuse the offset when record type sync data in batches.&lt;/p&gt;
&lt;p&gt;Sure, we could probably have an auxiliary table where we could store the offset in one iteration and read it in the next one, but I hoped that there is a more elegant (=simple) solution.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Web service integration with specific paging</title><link>https://community.appian.com/thread/140209?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2024 14:44:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16102b2f-81eb-4a97-a20a-a1cd4c46b637</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Please check the following assumption: &amp;quot;Airtable always returns as many rows a specified in the pageSize parameter, except for the last call&amp;quot;.&lt;/p&gt;
&lt;p&gt;If this is true, then you can just count the offset yourself like in the example in the documentation.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/24.3/configure-record-data-source.html#create-a-record-data-source"&gt;https://docs.appian.com/suite/help/24.3/configure-record-data-source.html#create-a-record-data-source&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Web service integration with specific paging</title><link>https://community.appian.com/thread/140207?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2024 14:33:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7f0fee84-e4cb-470b-8a98-f64a55daf534</guid><dc:creator>Habibija Safet</dc:creator><description>&lt;p&gt;My intention is to make the record type synced, but due the paging and the stopping mechanism I&amp;#39;m not able to do so.&lt;/p&gt;
&lt;p&gt;My idea was:&lt;/p&gt;
&lt;p&gt;1. Create connected system for AirTable cloud - successfully completed&lt;/p&gt;
&lt;p&gt;2. Create integration object based on the connected system where I would&lt;/p&gt;
&lt;p&gt;*&amp;nbsp;pick the offset from the previous batch and send it as a query parameter to the web service (to get the next page of records) - this is the tricky part I&amp;#39;m not able to solve as apparently there is no &amp;quot;session&amp;quot; where the offset could be stored (during a record type full resync).&lt;/p&gt;
&lt;p&gt;* check for existence of the offset attribute in Web service response - if not found (that means that we have reached the last page), I would return null; else the result from the WS is returned - that would solve the stopping mechanism&lt;/p&gt;
&lt;p&gt;3. Create a record type based on the integration object (easy)&lt;/p&gt;
&lt;p&gt;The more I look at this, I realize that it won&amp;#39;t work as I have no mean to pass the offset from one iteration to the next one.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying now a another approach - creating a process model that is timer based and that will invoke the integration object, fetch the data and send it to a record type using the Write Records Smart Service (in a loop of course). That way, I&amp;nbsp;should be able to store the offset and reuse it in the next iteration and check of exit conditions. I expect that the&amp;nbsp;final outcome should be the same - a record type synced with the remote AirTable table.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Web service integration with specific paging</title><link>https://community.appian.com/thread/140193?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2024 11:44:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:40a56cca-5aed-443d-bbbd-bca1412d321d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Do you make this a synced record? The mechanism to stop syncing is different. It relies on the last batch returning zero items. When synced, you have all the data available in a way more flexible way.&lt;/p&gt;
&lt;p&gt;If that does not fit your use case, can you describe it in more detail?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>