<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>soap Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/soap/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/soap/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 19 Mar 2025 14:03:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>soap Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/soap/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Read data from SharePoint List in SSIS (On-Premises SOAP API)</title>
		<link>https://zappysys.com/blog/ssis-read-data-sharepoint-premises-soap-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 18 Feb 2022 13:26:38 +0000</pubDate>
				<category><![CDATA[SSIS XML Source (File / SOAP)]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9545</guid>

					<description><![CDATA[<p>Introduction In this article, we learn how to call SharePoint (on-premises) SOAP API Service in SSIS. If you intend to call SharePoint Online (part of Office 365), we suggest reading SSIS SharePoint Online Connector article. Using SOAP API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint on-premises is a nice Microsoft [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-read-data-sharepoint-premises-soap-api/">Read data from SharePoint List in SSIS (On-Premises SOAP API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/">API Connector for SharePoint Online</a> which makes it much simpler to <strong>Read/Write SharePoint Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
In this article, we learn how to call SharePoint (on-premises) SOAP API Service in SSIS. If you intend to call SharePoint Online (part of Office 365), we suggest reading <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/ssis" target="_blank" rel="noopener">SSIS SharePoint Online Connector</a> article.</p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg"><img loading="lazy" decoding="async" class="alignleft wp-image-3731 " src="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg" alt="icon SharePoint" width="86" height="86" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg 150w, https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg 225w" sizes="(max-width: 86px) 100vw, 86px" /></a>Using SOAP API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint on-premises is a nice Microsoft application used to share documents and collaborate with the company. You can have schedules, projects, documents, and more shared using a Web platform.</p>
<p>In addition, it is a very useful tool that your company may need. It is also possible to automate, administer tasks using SOAP API.<br />
In this article, we will learn how to create SOAP API queries to SharePoint on-premises.</p>
<p>Also, we will show our ZappySys SSIS PowerPack that includes very powerful tools to export SharePoint data from REST API to any other source.<br />
<div class="su-table su-table-alternate">
<table style="width: 494px" width="300">
<tbody>
<tr style="line-height: 0px">
<td style="width: 48.0625px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-rest-api-web-service-task.png" alt="REST API Web Service Task SSIS" width="50" height="50" /></a></td>
<td style="vertical-align: middle;width: 429.938px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener">SSIS REST API Web Service Task<br />
</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 50px;width: 48.0625px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" rel="noopener"><br />
</a><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/images/SSIS-PowerPack/ssis-xml-source.png" alt="SSIS XML Source (File, SOAP, REST Connector) " width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px;width: 429.938px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" rel="noopener">SSIS XML Source (File, REST, SOAP Web Service)</a></td>
</tr>
</tbody>
</table>
</div>
<h2>Requirements</h2>
<ol>
<li>Firstly, you will need SSDT installed.</li>
<li>Secondly, <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> installed.</li>
<li><a href="https://www.soapui.org/downloads/soapui/" target="_blank" rel="noopener">SoapUI installed</a>.</li>
</ol>
<h2>Getting started</h2>
<p>We will start with SoapUI application. It will help us to get all the possible methods SharePoint SOAP API allows. Also, it will show the inner workings of how the requests should look, which we will later replicate on XML Source. SoapUI will be our polestar.</p>
<h2>How to call SharePoint SOAP API (On-Premises)</h2>
<p>To call SOAP API in SSIS you have to perform the following steps at a high level. Detailed steps are described in the next section</p>
<ol>
<li>Import WSDL file or URL for your Service in SoapUI for testing.
<ol>
<li>File &gt; New SOAP Project.</li>
<li>In the <em>Initial WSDL</em> field enter<br />
<em>http://your.domain.com/_vti_bin/Lists.asmx?wsdl<br />
or<br />
http://your.domain.com/my-site/_vti_bin/Lists.asmx?wsdl</em></li>
</ol>
</li>
<li>Add credentials for SOAP Web service (Basic Auth or WSS)</li>
<li>Create SOAP Request XML (Edit default parameters) and <strong>Click Play Button </strong>to test your request. Associative photo:
<div id="attachment_2543" style="width: 745px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2543" class="size-full wp-image-2543" src="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png" alt="Create SOAP Request Body from WSDL (Using SoapUI tool)" width="735" height="451" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png 735w, https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body-300x184.png 300w" sizes="(max-width: 735px) 100vw, 735px" /></a><p id="caption-attachment-2543" class="wp-caption-text">Create SOAP Request Body from WSDL (Using SoapUI tool)</p></div></li>
<li>If your test works in SoapUI then you are ready to move to SSIS part.</li>
<li>Copy Service URL, Request Body and Headers to Notepad &#8212; we will use it in SSIS.<br />
For Header see <strong>Raw</strong> Tab on SoapUI &gt; Copy two lines <strong>Content-Type</strong> and <strong>SOAPAction.</strong></p>
<div id="attachment_7355" style="width: 638px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7355" class="size-full wp-image-7355" src="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png" alt="Get ContentType and SOAPAction Headers from SoapUI Raw tab" width="628" height="457" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png 628w, https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab-300x218.png 300w" sizes="(max-width: 628px) 100vw, 628px" /></a><p id="caption-attachment-7355" class="wp-caption-text">Get ContentType and SOAPAction Headers from SoapUI Raw tab</p></div></li>
</ol>
<p>In the next section, we will see how to call SharePoint SOAP Web Service in SSIS.</p>
<h2>How to read data from a SharePoint List via SOAP Web Service</h2>
<p>Now let&#8217;s move onto SSIS and get some data from SharePoint using <em>XML Source</em>.</p>
<ol>
<li>Open SSIS, create a new Integration project and create a new SSIS package.</li>
<li>Drag and drop Data Flow onto the Control Flow from SSIS Toolbox.</li>
<li>Then drag and drop <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">XML Source</a> onto Data Flow (you may also use other similar connectors such as <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">REST API Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a>).</li>
<li>Then configure <em>XML Source</em> in this way:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-9553" src="https://zappysys.com/blog/wp-content/uploads/2022/02/how-to-read-data-from-sharepoint-via-soap-api-webservice.png" alt="" width="636" height="750" srcset="https://zappysys.com/blog/wp-content/uploads/2022/02/how-to-read-data-from-sharepoint-via-soap-api-webservice.png 636w, https://zappysys.com/blog/wp-content/uploads/2022/02/how-to-read-data-from-sharepoint-via-soap-api-webservice-254x300.png 254w" sizes="(max-width: 636px) 100vw, 636px" /></p>
<ol>
<li>Enter URL:<br />
<span style="text-decoration: underline;">https://my.sharepoint.site.com/sites/mysite/_vti_bin/Lists.asmx</span><br />
or<br />
<span style="text-decoration: underline;">https://my.sharepoint.site.com/_vti_bin/Lists.asmx</span> (depends if you have many sites or just one).</li>
<li>Check <strong>Use Credentials</strong> checkbox and create <strong>ZS-HTTP</strong> connection. Use <strong>Basic</strong> or <strong>NTLM</strong> authorization scheme.</li>
<li>Then copy configuration from SoapUI to XML Source. E.g. <strong>HTTP Request Method</strong>, <strong>Body</strong>, <strong>Body Content-Type, HTTP Headers </strong>(e.g. SOAPAction header).</li>
<li>Use <strong>$.soap:Envelope.soap:Body.GetListItemsResponse.GetListItemsResult.listitems.rs:data.z:row[*]</strong> as filter. If it doesn&#8217;t work, use <strong>Select Filter</strong> button to select the path manually and select <strong>row</strong> node.</li>
</ol>
</li>
<li>What&#8217;s left is to connect XML Source with OLEDB Destination or a similar destination component:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-9554" src="https://zappysys.com/blog/wp-content/uploads/2022/02/sharepoint-on-premises-load-list-using-soap-webservice-api-into-database.png" alt="" width="351" height="289" srcset="https://zappysys.com/blog/wp-content/uploads/2022/02/sharepoint-on-premises-load-list-using-soap-webservice-api-into-database.png 351w, https://zappysys.com/blog/wp-content/uploads/2022/02/sharepoint-on-premises-load-list-using-soap-webservice-api-into-database-300x247.png 300w" sizes="(max-width: 351px) 100vw, 351px" /></li>
</ol>
<h2>Conclusion</h2>
<p>To conclude, we can say that using SSIS PowerPack component XML Source and SoapUI we could achieve our goal of getting data from SharePoint On-Premises. The next step could be writing data to SharePoint via the same SOAP API interface, but this time using <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> component.</p>
<p>The post <a href="https://zappysys.com/blog/ssis-read-data-sharepoint-premises-soap-api/">Read data from SharePoint List in SSIS (On-Premises SOAP API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import Bing Ads data into SQL Server (Performance Reports)</title>
		<link>https://zappysys.com/blog/import-bing-ads-data-sql-server-performance-reports/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 13 Jun 2019 21:04:57 +0000</pubDate>
				<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[T-SQL (SQL Server)]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[Bing Ads]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7217</guid>

					<description><![CDATA[<p>Introduction In our previous blog post we saw how to import REST / SOAP API in SQL Server. Using same concepts let&#8217;s look at how to import Bing Ads data into SQL Server. We will explore many techniques to call Bing Ads API and learn how to automate data extraction without doing any ETL. You [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-bing-ads-data-sql-server-performance-reports/">Import Bing Ads data into SQL Server (Performance Reports)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/bing-ads-logo.png"><img loading="lazy" decoding="async" class=" wp-image-7363 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/06/bing-ads-logo.png" alt="" width="190" height="158" /></a>In our previous blog post we saw how to <a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">import REST / SOAP API in SQL Server</a>. Using same concepts let&#8217;s look at how to import Bing Ads data into SQL Server. We will explore many techniques to call Bing Ads API and learn how to automate data extraction without doing any ETL. You can call Bing Ads API just using T-SQL code (Yes you heard it right). At the end of this article you will learn how to <strong>Download Performance Reports from Bing Ads Account</strong> without any coding (See sample screenshot below). Please go through full article carefully.</p>
<p><strong>NOTE:</strong> Bing Ads now renamed as Microsoft Advertising but this article will use popular name for time being.</p>
<h2></h2>
<div id="attachment_7218" style="width: 841px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7218" class="size-full wp-image-7218" src="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png" alt="Import Bing Ads data into SQL Server (Using SSMS T-SQL Code)" width="831" height="741" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png 831w, https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table-768x685.png 768w" sizes="(max-width: 831px) 100vw, 831px" /></a><p id="caption-attachment-7218" class="wp-caption-text">Import Bing Ads data into SQL Server (Using SSMS T-SQL Code)</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-7048"><h2>Requirements</h2>
This article talks about few tools and techniques in order to load API data in SQL Server. Please make sure following prerequisites are met.
<ol>
 	<li>Download and Install <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> (This includes XML / JSON / REST API and few other drivers for SQL Server and ODBC connectivity in tools like Excel, Power BI, SSRS)</li>
 	<li>Make sure you have access to SQL Server Instance. If you cant find one still want to try what is mentioned in this article then install <a href="https://www.microsoft.com/en-us/sql-server/sql-server-editions-express" target="_blank" rel="noopener">FREE SQL Express Edition</a></li>
 	<li>Confirm that you have SSMS Installed. If you don't have then you can download <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017">from here</a>.</li>
</ol></div>
<h2>About Bing Ads API / SOAP Web Service</h2>
<p>If you are new to Bing Ads API then <a href="https://docs.microsoft.com/en-us/advertising/" target="_blank" rel="noopener">start from here</a>. Bing Ads APIs are SOAP XML APIs. You can call it to automate <a href="https://docs.microsoft.com/en-us/advertising/guides/?view=bingads-13" target="_blank" rel="noopener">many scenarios</a> for Bing Ads. In this article we will mainly focus on read scenario (e.g. Read Performance Data) but you can use these techniques to write / update (e.g. Create New Campaign).</p>
<p>If you are new to SOAP WebService then <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn more. It will explain you how to use tools like <strong>SoapUI</strong> tool to craft SOAP Requests for Bing API or any other SOAP API.</p>
<p>For Bing API you can use Service WSDL files <a href="https://docs.microsoft.com/en-us/advertising/guides/web-service-addresses?view=bingads-13" target="_blank" rel="noopener">found here</a>. Use URL ending <strong>?wsdl</strong> to import in SoapUI.</p>
<h2>Example Bing API Request</h2>
<p>Here is raw API request for Bing API. This sample assumes you have completed 3-Legged OAuth Authorization to obtain AccessToken and RefreshToken (Explained later in this article). Below request uses AccessToken you might have already obtained via <a href="https://docs.microsoft.com/en-us/advertising/guides/get-started?view=bingads-13#get-developer-token" target="_blank" rel="noopener">process like this</a>. If you are using ZappySys tools then this will be generated automatically for you.</p>
<p><strong>Request Method / URL:</strong></p><pre class="crayon-plain-tag">POST https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc</pre><p>
<strong>Headers:<br />
</strong>Notice that for each Api you may need correct <strong>SOAPAction</strong> in Header. If you are not sure then use SoapUI Tool. Execute request in SoapUI and then go to <strong>Raw tab </strong><a href="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png" target="_blank" rel="noopener">like this one</a>.</p><pre class="crayon-plain-tag">Content-Type: text/xml; charset=utf-8
SOAPAction: "GetUser"</pre><p>
<strong>Body:<br />
</strong>Notice that you have to replace <strong>AuthenticationToken</strong> and <strong>DeveloperToken</strong> in below request. AccessToken is placed inside AuthenticationToken tag. This Auth token is short lived and extracted via OAuth Process and DeveloperToken you can extract as mentioned in the previous section <a href="https://developers.ads.microsoft.com/Account">or get it from here</a>.</p><pre class="crayon-plain-tag"><s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Customer/v13">
    <Action mustUnderstand="1">GetUser</Action>
    <AuthenticationToken i:nil="false"><%access_token%></AuthenticationToken>
    <DeveloperToken i:nil="false">1052Bxxxxxxxxxxxxxx</DeveloperToken>
  </s:Header>
  <s:Body>
    <GetUserRequest xmlns="https://bingads.microsoft.com/Customer/v13">
      <UserId i:nil="true"></UserId>
    </GetUserRequest>
  </s:Body>
</s:Envelope></pre><p>
<strong>Response:</strong></p><pre class="crayon-plain-tag">&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:TrackingId xmlns:h="https://bingads.microsoft.com/Customer/v13"&gt;fddf3cb9-e4c2-4e75-9546-f3bc20ea91a8&lt;/h:TrackingId&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;GetUserResponse xmlns="https://bingads.microsoft.com/Customer/v13"&gt;
      &lt;User xmlns:a="https://bingads.microsoft.com/Customer/v13/Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
        &lt;a:ContactInfo&gt;
          &lt;a:Address&gt;
            &lt;a:City i:nil="true" /&gt;
            &lt;a:CountryCode&gt;US&lt;/a:CountryCode&gt;
            &lt;a:Id i:nil="true" /&gt;
            &lt;a:Line1 i:nil="true" /&gt;
            &lt;a:Line2 i:nil="true" /&gt;
            &lt;a:Line3 i:nil="true" /&gt;
            &lt;a:Line4 i:nil="true" /&gt;
            &lt;a:PostalCode i:nil="true" /&gt;
            &lt;a:StateOrProvince i:nil="true" /&gt;
            &lt;a:TimeStamp i:nil="true" /&gt;
            &lt;a:BusinessName i:nil="true" /&gt;
          &lt;/a:Address&gt;
          &lt;a:ContactByPhone&gt;false&lt;/a:ContactByPhone&gt;
          &lt;a:ContactByPostalMail&gt;false&lt;/a:ContactByPostalMail&gt;
          &lt;a:Email&gt;someone@zappysys.com&lt;/a:Email&gt;
          &lt;a:EmailFormat i:nil="true" /&gt;
          &lt;a:Fax i:nil="true" /&gt;
          &lt;a:HomePhone i:nil="true" /&gt;
          &lt;a:Id&gt;48045678&lt;/a:Id&gt;
          &lt;a:Mobile i:nil="true" /&gt;
          &lt;a:Phone1&gt;111-222-3333&lt;/a:Phone1&gt;
          &lt;a:Phone2 i:nil="true" /&gt;
        &lt;/a:ContactInfo&gt;
        &lt;a:CustomerId&gt;19112345&lt;/a:CustomerId&gt;
        &lt;a:Id&gt;48012345&lt;/a:Id&gt;
        &lt;a:JobTitle i:nil="true" /&gt;
        &lt;a:LastModifiedByUserId&gt;48012345&lt;/a:LastModifiedByUserId&gt;
        &lt;a:LastModifiedTime&gt;2019-06-04T14:22:35.38&lt;/a:LastModifiedTime&gt;
        &lt;a:Lcid&gt;EnglishUS&lt;/a:Lcid&gt;
        &lt;a:Name&gt;
          &lt;a:FirstName&gt;Someone&lt;/a:FirstName&gt;
          &lt;a:LastName&gt;Good&lt;/a:LastName&gt;
          &lt;a:MiddleInitial i:nil="true" /&gt;
        &lt;/a:Name&gt;
        &lt;a:Password i:nil="true" /&gt;
        &lt;a:SecretAnswer i:nil="true" /&gt;
        &lt;a:SecretQuestion&gt;None&lt;/a:SecretQuestion&gt;
        &lt;a:UserLifeCycleStatus&gt;Active&lt;/a:UserLifeCycleStatus&gt;
        &lt;a:TimeStamp&gt;AAAAAJiX/cU=&lt;/a:TimeStamp&gt;
        &lt;a:UserName&gt;someone@zappysys.com&lt;/a:UserName&gt;
        &lt;a:ForwardCompatibilityMap i:nil="true" xmlns:b="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /&gt;
      &lt;/User&gt;
      &lt;CustomerRoles xmlns:a="https://bingads.microsoft.com/Customer/v13/Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
        &lt;a:CustomerRole&gt;
          &lt;a:RoleId&gt;41&lt;/a:RoleId&gt;
          &lt;a:CustomerId&gt;19160000&lt;/a:CustomerId&gt;
          &lt;a:AccountIds i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /&gt;
          &lt;a:LinkedAccountIds xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /&gt;
          &lt;a:CustomerLinkPermission i:nil="true" /&gt;
        &lt;/a:CustomerRole&gt;
      &lt;/CustomerRoles&gt;
    &lt;/GetUserResponse&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;</pre><p>
<div class="content_block" id="custom_post_widget-7357"><h2>Things to know about REST / SOAP API</h2>
Before we deep dive into calling your specific APIs you like to integrate, you must have basic understanding what is REST API / SOAP API. In this section we will cover few important concepts and difference about these two API styles REST vs SOAP.
<h3><strong>What is REST API (or RESTful API)</strong></h3>
As per wikipedia <a href="https://en.wikipedia.org/wiki/Representational_state_transfer" target="_blank" rel="noopener">REST</a> is an architecture style which can be used to to expose data over the internet using http / https. Using REST style you can expose data operations / functions which can be called by other users. With API calls You can read / write data or just call business functions which triggers some workflow.

Most APIs documents various aspects of calling API (REST or SOAP). You need to pass these details accurately. Refer to your API documentation <a href="https://developer.zendesk.com/rest_api/docs/support/introduction" target="_blank" rel="noopener">like this one for example</a> . If its an internal API then contact API developer to get more details.
<ul>
 	<li><strong>URL and Parameters</strong>  (or sometimes referred as endpoint)</li>
 	<li><strong>Request Method</strong> (or sometimes referred as Verb)- e.g. GET, POST, PUT, PATCH .....</li>
 	<li><strong>HTTP Headers</strong></li>
 	<li><strong>Request Body</strong></li>
</ul>
<strong>Sample REST API Call</strong>

<strong>Request:</strong>
<pre class="lang:default decode:true">POST http://myhost/api/v2/customers/new
X-SecretKey: Abcdxxxxxxxxxxxxxx
Content-Type: application/json

{ firstname: "Someone", lastname: "Good" }</pre>
<strong>Response:</strong>
<pre class="lang:default highlight:0 decode:true">{
 request_status: "CreatedOK",
 new_customer_id: "1234566"
}</pre>
<h3>What is SOAP Web Service (XML API)</h3>
<a href="https://en.wikipedia.org/wiki/SOAP" target="_blank" rel="noopener">SOAP Web Service</a> is an old standard developed before REST Style got popular. SOAP is strictly XML based API on the other hand RESTful API can be any format. As we said earlier REST is an architecture style,  and SOAP is a standard (XML Based Protocol to transfer data).

For more information on SOAP API <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">refer to this link / videos</a>
<h3>Other Concepts Calling REST / SOAP</h3>
There are few things you have to find out from your API Provider (Read their documentation <a href="https://developer.zendesk.com/rest_api/docs/support/introduction" target="_blank" rel="noopener">like this for example</a>). Few important concepts for API calling listed below.
<ul>
 	<li><strong>Authentication</strong> - Most APIs need some sort of credentials to verify your identity. Here are some common Auth mechanism
<ul>
 	<li><a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/">Basic Authentication</a>,</li>
 	<li><a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">OAuth 1a or 2.0</a></li>
 	<li><a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic Token Auth </a></li>
 	<li>Pass API key via URL Parameter
e.g. <span class="lang:default decode:true  crayon-inline">http://myhost/api/v1/getcustomers?apikey=###some-secret-key####</span></li>
 	<li>Pass API key via Header</li>
</ul>
</li>
 	<li><strong>Pagination</strong> - Most APIs don't return huge amount of data in a single requests so you must call next request to continue fetch more data until all rows are fetched. There is no standard around pagination so find out from your API provider how to paginate. <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">Check this article for example</a> to learn about various pagination patterns.</li>
 	<li><strong>Throttling (API calls rate limit)</strong> - Most API providers enforce API call rate limit. Which means you cannot call it more than X times in a given time. If you ever face such issue, You can enable <a href="https://zappysys.com/blog/wp-content/uploads/2018/09/http-retry-settings-oauth-connection.png" target="_blank" rel="noopener">error retry option like this</a> or simply <a href="https://zappysys.com/blog/wp-content/uploads/2016/01/rest-api-limit-throttling-pause-request-per-seconds.png" target="_blank" rel="noopener">add delay like this</a> to slow down.</li>
</ul>
<h3>Must have Tools for API Testing / Debugging</h3>
Before you start integrating API calls in ZappySys products like <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a> or <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> you can start testing API using tools like CURL, Postman or Fiddler.
<h4><strong>Fiddler</strong></h4>
Fiddler is the best API API debugger out there. It acts like a small Proxy server so you can see all Web requests on your system in a raw format. You can also use this tool to Test API requests (See Composer tab in Fiddler) however if API testing is your primary use case then use POSTMAN (see next) because it has more UI elements compared to Fiddler. Here is <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/">small tutorial to get started with Fiddler</a>.
<h4><strong>Postman</strong></h4>
<a href="https://www.getpostman.com/" target="_blank" rel="noopener">Postman</a> is probably the most popular tool to test API with full User interface. It's not data processing like ZappySys but you can pass various parts of API we talked earlier and test API before you can start using ZappySys for Data integration. Here is <a href="https://www.youtube.com/watch?v=t5n07Ybz7yI">Video Tutorial to get started with Postman</a>.
<h4><strong>cURL</strong></h4>
<a href="https://curl.haxx.se/">CURL</a> is a simple yet most popular command line tool to call / test APIs. It doesn't have UI elements like previous two tools so have to learn about each options you can pass to this command line.</div>
<h2>Step-By-Step: How to Import Bing Ads Data into SQL Server</h2>
<p>Now let&#8217;s look at how to import Bing Ads Data into SQL Server Table. This tutorial will require 10-15 mins of your time. At the end of this tutorial you will be able to Read Bing Ads Performance Report and Import data into SQL Server. Step listed in this tutorial may help you to call Bing API in other tools like <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/">SSIS</a>, <a href="https://zappysys.com/blog/call-soap-api-power-bi-read-xml-web-service-data/">Power BI</a>, SSRS, Tableau and so on.</p>
<p>So let&#8217;s get started.</p>
<h3>Register OAuth App for Bing Ads API (Azure Active Directory App)</h3>
<p>Very first thing to call any Bing API is to register OAuth App (Under Azure Active Directory Tab).</p>
<p>Here is how to register OAuth App which can be used to call Bing Ads API later on.</p>
<ol>
<li>
    <strong>Login to Azure Portal:</strong></p>
<ul>
<li>Navigate to the <a href="https://portal.azure.com/#home" target="_blank" rel="noopener"><strong>Azure Portal</strong></a> and log in using your credentials.</li>
</ul>
</li>
<li>
    <strong>Access Azure Active Directory:</strong></p>
<ul>
<li>In the left-hand menu, click on <a target="_blank" href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview" rel="noopener"><strong>Azure Active Directory</strong></a>.</li>
</ul>
</li>
<li>
    <strong>Register a New Application:</strong></p>
<ul>
<li>Go to <a target="_blank" href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps" rel="noopener"><strong>App registrations</strong></a> and click on <strong>New registration</strong>.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2019/07/register-azure-active-directory-oauth-app.png"><img loading="lazy" decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/07/register-azure-active-directory-oauth-app.png" alt="" width="638" height="368" class="alignnone size-full wp-image-7344" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/register-azure-active-directory-oauth-app.png 638w, https://zappysys.com/blog/wp-content/uploads/2019/07/register-azure-active-directory-oauth-app-300x173.png 300w" sizes="(max-width: 638px) 100vw, 638px" /></a>
</li>
<li><strong>Application Name:</strong> Enter a name for your application.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2019/07/create-new-azure-oauth-app-select-type.png"><img loading="lazy" decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/07/create-new-azure-oauth-app-select-type.png" alt="" width="392" height="567" class="alignnone size-full wp-image-7345" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/create-new-azure-oauth-app-select-type.png 392w, https://zappysys.com/blog/wp-content/uploads/2019/07/create-new-azure-oauth-app-select-type-207x300.png 207w" sizes="(max-width: 392px) 100vw, 392px" /></a>
</li>
<li><strong>Supported Account Types:</strong> Choose the account types your app will support. For example, select <strong>Accounts in this organizational directory only</strong> if you need access to data in your organization only.</li>
<li><strong>Redirect URI:</strong>
<ul>
<li>Set the type to <strong>Web</strong>.</li>
<li>In the textbox enter <b>https://login.microsoftonline.com/common/oauth2/nativeclient</b> as the Redirect URI or any other valid redirect URL, e.g., <b>https://zappysys.com/oauth</b>.</li>
<li>Use this Redirect URI in the <strong>Redirect URL</strong> grid row.</li>
</ul>
</li>
</ul>
</li>
<li>
    <strong>Save Client ID:</strong></p>
<ul>
<li>After registering the app, copy the <strong>Application (client) ID</strong> and paste it into the <strong>Client ID</strong> field in the API Connection Manager configuration.</li>
</ul>
</li>
<li>
    <strong>Set Authorization &amp; Token URLs:</strong></p>
<ul>
<li>Click on the <strong>Endpoints</strong> link in the App registration overview.</li>
<li><strong>Authorization URL:</strong> Copy the <strong>OAuth 2.0 authorization endpoint (v2)</strong> URL (e.g., <code>https://login.microsoftonline.com/{your-tenant-id}/oauth2/v2.0/authorize</code>) and paste it into the <strong>Authorization URL</strong> field in the configuration grid.</li>
<li><strong>Token URL:</strong> Copy the <strong>OAuth 2.0 token endpoint (v2)</strong> URL (e.g., <code>https://login.microsoftonline.com/{your-tenant-id}/oauth2/v2.0/token</code>) and paste it into the <strong>Token URL</strong> field.</li>
</ul>
</li>
<li>
    <strong>Create a Client Secret:</strong></p>
<ul>
<li>In the <strong>Certificates &amp; secrets</strong> tab, click <strong>New client secret</strong>.</li>
<li>Set an expiration period for the secret.</li>
<li>Copy the generated client secret and paste it into the <strong>Client Secret</strong> field in the API Connection Manager configuration.</li>
</ul>
</li>
<li>
    <strong>Configure API Permissions:</strong></p>
<ul>
<li>Go to the <strong>API Permissions</strong> section.</li>
<li>Click on <strong>Add a permission</strong>, select <strong>Microsoft Graph</strong>, and choose <strong>Delegated Permissions</strong>.</li>
<li>Add the required permissions:
<ul>
<li>offline_access</li>
<li>openid</li>
<li>profile</li>
<li>Sites.Read.All</li>
<li>Sites.ReadWrite.All</li>
<li>User.Read</li>
<li>email</li>
</ul>
<div id="attachment_11177" style="width: 903px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11177" src="https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions.jpg" alt="azure-ad-app-required-app-permissions" width="893" height="681" class="size-full wp-image-11177" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions.jpg 893w, https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions-300x229.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions-768x586.jpg 768w" sizes="(max-width: 893px) 100vw, 893px" /></a><p id="caption-attachment-11177" class="wp-caption-text">Azure AD App &#8211; Required API Permissions</p></div>
      </li>
<li><strong>Grant Admin Consent</strong> for the permissions that require it.</li>
</ul>
</li>
<li>
    <strong>Generate Tokens:</strong></p>
<ul>
<li>Use the <strong>Generate Token</strong> feature in the API Connection Manager to generate authentication tokens.</li>
</ul>
</li>
<li>
    <strong>Use a Generic Account for Automation:</strong></p>
<div style="background-color: #f5f2c4; border-style: solid; border-color: #000000; border-width: 1px; margin-top: 3px; margin-bottom: 6px; padding: 6px;">
		<b>NOTE</b>: If you are planning to use your current data connection/token for automated processes, we recommend that you use a generic account for token generation when the login box appears (e.g. sales_automation@mycompany.com instead of bob_smith@mycompany.com). When you use a personal account which is tied to a specific employee profile and that employee leaves the company, the token may become invalid and any automated processes using that token will fail. Another potentially unwanted effect of using a personal token is incorrect logging; the API calls (e.g. Read, Edit, Delete, Upload) made with that token will record the specific user as performing the calls instead of an automated process.
    </div>
</li>
<li>That&#8217;s it!</li>
</ol>
<h3>Get Bing API Developer Token</h3>
<p>Once we have OAuth App registered next thing is to obtain Developer Token for Bing Ads API. <a href="https://developers.ads.microsoft.com/Account" target="_blank" rel="noopener">Click here to request new token</a> or view existing Developer token.</p>
<div class="content_block" id="custom_post_widget-5411"><h3><span style="font-size: 14pt;">Configure ZappySys Data Gateway</span></h3>
Now let's look at steps to configure Data Gateway after installation.
<ol style="margin-left: 0;">
 	<li style="text-align: left;">Assuming you have installed <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> using default options (Which also enables Data Gateway Service)</li>
 	<li style="text-align: left;">Search "Gateway" in your start menu and click ZappySys Data Gateway
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Opening ZappySys Data Gateway</p>

</div></li>
 	<li>First, make sure Gateway Service is running (Verify Start icon is disabled)</li>
 	<li>Also, verify Port on General Tab
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ZappySys-data-gateway-port-5000.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ZappySys-data-gateway-port-5000.png" alt="Port Number setting on ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Checking port number setting on ZappySys Data Gateway</p>

</div></li>
 	<li>Now go to Users tab. <strong>Click Add</strong> icon to add a new user. Check Is admin to give access to all data sources you add in future. If you don't check admin then you have to manually configure user permission for each data source.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user.png">
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5453" src="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-configure-add-user.png" alt="" width="564" height="438" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-configure-add-user.png 564w, https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-configure-add-user-300x233.png 300w" sizes="(max-width: 564px) 100vw, 564px" /></a>
<p class="wp-caption-text">Adding the Gateway user</p>

</div></li>
</ol>
&nbsp;</div>
<h3>Create new Bing Ads API Data Source in Gateway</h3>
<p>Once you setup Data Gateway user we can move to next step. To call Bing API we need to setup Connection for XML Driver in ZappySys Data Gateway.</p>
<ol>
<li>Click on Add New Data source. Name as <strong>BingAds</strong> and select <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener"><strong>Native &#8211; ZappySys XML Driver</strong></a> option.
<div id="attachment_5557" style="width: 572px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_add_native_driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5557" class="size-full wp-image-5557" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_add_native_driver.png" alt="Add Gateway Data Source" width="562" height="539" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_add_native_driver.png 562w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_add_native_driver-300x288.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></a><p id="caption-attachment-5557" class="wp-caption-text">Add Gateway Data Source</p></div></li>
<li>Now click Edit to Configure Settings. For now we will only care OAuth Connection settings. All other options are overwritten in SQL Query.
<div id="attachment_5440" style="width: 572px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5440" class="size-full wp-image-5440" src="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png" alt="Edit Gateway Data Source Settings" width="562" height="385" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png 562w, https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2-300x206.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></a><p id="caption-attachment-5440" class="wp-caption-text">Edit Gateway Data Source Settings</p></div></li>
<li>When UI opens Click on Load ConnectionString and Paste below connection string after changing some items (<strong>Screenshot may be differ</strong>). Make sure to replace following attributes.<strong>RefreshTokenFilePath</strong> &#8211; Enter some valid file path which will hold refresh token<br />
<strong>ClientId</strong> &#8211; get Application Id from Azure Portal under App we created earlier)<br />
<strong>DeveloperToken</strong> &#8211; Replace 1052Bxxxxxxxxxxxx with your own devloper token.</p>
<div id="attachment_7024" style="width: 996px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7024" class="size-full wp-image-7024" src="https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring.png" alt="Load ZappySys Driver ConnectionString to configure UI" width="986" height="454" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring.png 986w, https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring-300x138.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring-768x354.png 768w" sizes="(max-width: 986px) 100vw, 986px" /></a><p id="caption-attachment-7024" class="wp-caption-text">Load ZappySys Driver ConnectionString to configure UI</p></div>
<p><strong>Use below string and replace parameters </strong></p><pre class="crayon-plain-tag">DRIVER={ZappySys XML Driver};
DataPath='https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc';
DataConnectionType=OAuth;
AuthUrl='https://login.microsoftonline.com/common/oauth2/v2.0/authorize';
TokenUrl='https://login.microsoftonline.com/common/oauth2/v2.0/token';
ReturnUrl='https://login.microsoftonline.com/common/oauth2/nativeclient';
RefreshTokenFilePath='c:\xxxxxx_some_folder_xxxxxxx\BingAds_RefreshToken.txt';
ScopeSeparator='{space}';
Scope='https://ads.microsoft.com/ads.manage offline_access';
ClientId='xxxxxxxxxxxxxx';
UseCustomApp=True;
RequestData='&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:ApplicationToken i:nil="true" xmlns:h="https://bingads.microsoft.com/Customer/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:AuthenticationToken xmlns:h="https://bingads.microsoft.com/Customer/v13"&gt;&lt;%access_token%&gt;&lt;/h:AuthenticationToken&gt;
    &lt;h:DeveloperToken xmlns:h="https://bingads.microsoft.com/Customer/v13"&gt;1052Bxxxxxxxxxxxx&lt;/h:DeveloperToken&gt;
    &lt;h:Password i:nil="true" xmlns:h="https://bingads.microsoft.com/Customer/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:UserName i:nil="true" xmlns:h="https://bingads.microsoft.com/Customer/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;GetUserRequest xmlns="https://bingads.microsoft.com/Customer/v13"&gt;
      &lt;UserId i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;/GetUserRequest&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;';
RequestContentTypeCode=TextXml;
RequestMethod='POST';
RequestHeaders='SOAPAction: "GetUser"'</pre><p>
</li>
<li>Next to <strong>OAuth</strong> Click on <strong>Configure Settings</strong></li>
<li>By default most of settings on OAuth connections should be pre-populated for you but still lets Notice few things. This is how to setup redirect URI</li>
<li>
<div id="attachment_7360" style="width: 1027px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7360" class="size-full wp-image-7360" src="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app.png" alt="Configure Redirect URI for Bing Ads API OAuth Connection" width="1017" height="486" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app.png 1017w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app-300x143.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app-768x367.png 768w" sizes="(max-width: 1017px) 100vw, 1017px" /></a><p id="caption-attachment-7360" class="wp-caption-text">Configure Redirect URI for Bing Ads API OAuth Connection</p></div></li>
<li>Here is where you setup <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004555334-How-to-handle-Changing-OAuth-RefreshToken-in-SSIS-ODBC-" target="_blank" rel="noopener">Changing Refresh Token File path</a>. if you dont supply this path then your refresh token extracted first time will expire in 60 days.
<div id="attachment_7361" style="width: 609px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/handle-oauth-changing-refresh-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7361" class="size-full wp-image-7361" src="https://zappysys.com/blog/wp-content/uploads/2019/06/handle-oauth-changing-refresh-token.png" alt="Refresh Token File path (Only needed if API issues new Refresh Token when you request AccessToken)" width="599" height="355" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/handle-oauth-changing-refresh-token.png 599w, https://zappysys.com/blog/wp-content/uploads/2019/06/handle-oauth-changing-refresh-token-300x178.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></a><p id="caption-attachment-7361" class="wp-caption-text">Refresh Token File path (Only needed if API issues new Refresh Token when you request AccessToken)</p></div></li>
<li>Once you verify all settings <strong>click</strong> <strong>Generate Token</strong> and Finish the process. It will populate <strong>AccessToken</strong> and <strong>RefreshToken</strong> Fields if everything goes well.
<div id="attachment_7359" style="width: 1054px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7359" class="size-full wp-image-7359" src="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection.png" alt="Configure Bing Ads API Connection (OAuth 2.0)" width="1044" height="605" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection.png 1044w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection-300x174.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection-768x445.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection-1024x593.png 1024w" sizes="(max-width: 1044px) 100vw, 1044px" /></a><p id="caption-attachment-7359" class="wp-caption-text">Configure Bing Ads API Connection (OAuth 2.0)</p></div></li>
<li>Click OK to save OAuth Connection UI to go back to main UI</li>
<li>You can now <strong>Click Test Connection</strong> to confirm everything</li>
<li>If you need to access Gateway from Other machine then go to <strong>Firewall tab</strong> and Click Add Rule</li>
<li><strong>Click Save</strong> button <strong>on Gateway UI</strong> to save and restart the service.</li>
</ol>
<h3>Create a new Linked Server for Bing Ads API</h3>
<p>Once we setup setup Bing Ads Data Source in Gateway we can move to next step which is create a Linked Server which points to Data gateway Data source we created. This will create a bridge between ZappySys Driver and SQL Server so you can call API via T-SQL.</p>
<ol>
<li>If you are using Latest ODBC PowerPack then on Data gateway UI you will See <strong>App Integration Tab</strong>. Copy Code and run it in SSMS to create a new linked server.
<div id="attachment_7366" style="width: 774px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/data-gateway-code-generator-sql-linked-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7366" class="size-full wp-image-7366" src="https://zappysys.com/blog/wp-content/uploads/2019/06/data-gateway-code-generator-sql-linked-server.png" alt="ZappySys Data Gateway code generator for Linked Server" width="764" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/data-gateway-code-generator-sql-linked-server.png 764w, https://zappysys.com/blog/wp-content/uploads/2019/06/data-gateway-code-generator-sql-linked-server-300x276.png 300w" sizes="(max-width: 764px) 100vw, 764px" /></a><p id="caption-attachment-7366" class="wp-caption-text">ZappySys Data Gateway code generator for Linked Server</p></div></li>
<li>If things go well when you execute code you may see some result in grid.</li>
</ol>
<h3>Run sample Queries to call Bing API in SQL Server / Import Data</h3>
<p>Once Linked Server is created we can run various queries like below.</p>
<p><strong>Example-1</strong></p><pre class="crayon-plain-tag">--use all default settings from gateway data source UI
--Read
Select * from OPENQUERY( [YourLinkedServer] , 'select * from $')&amp;nbsp;

/*
--import
Select * into #tempTable from OPENQUERY( [YourLinkedServer] , 'select * from $') 
Select * from #tempTable
*/</pre><p>
<strong>Example-2</strong></p><pre class="crayon-plain-tag">--use Filter to extract specific Node from response XML
Select * from OPENQUERY( [YourLinkedServer] , 
'select * from $
WITH(Filter=''$.s:Envelope.s:Body.GetUserRequest[*]'', 
  ElementsToTreatAsArray=''GetUserResponse'' 
   )'
)</pre><p>
&nbsp;</p>
<p><strong>Example-3</strong></p><pre class="crayon-plain-tag">--Override URL, Headers and Body Settings. Change DeveloperToken in below request
--Header, Filter, URL, Request data is different for each Endpoint

SELECT * FROM OPENQUERY([YourLinkedServer]
, 'SELECT * FROM $
WITH(
	 ElementsToTreatAsArray=''GetUserResponse''
	,Src=''https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc''
	,Filter=''$.s:Envelope.s:Body.GetUserResponse[*]''	
	,Header=''SOAPAction: "GetUser"''	
	,RequestData=''&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v13="https://bingads.microsoft.com/Customer/v13"&gt;
&lt;soapenv:Header&gt;
   &lt;v13:DeveloperToken&gt;1052xxxxxxxxxxxxx&lt;/v13:DeveloperToken&gt;
   &lt;v13:AuthenticationToken&gt;&lt;%access_token%&gt;&lt;/v13:AuthenticationToken&gt;
&lt;/soapenv:Header&gt;
&lt;soapenv:Body&gt;
   &lt;v13:GetUserRequest&gt;
      &lt;v13:UserId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
   &lt;/v13:GetUserRequest&gt;
&lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;''
)')</pre><p>
&nbsp;</p>
<h3>Download Bing Ads Performance Data in SQL Server Table</h3>
<p>Now lets look at more complex example to read data from Bing Performance Report. Calling This API is tricky due to many steps involved in data extraction. But not to worry if you use ZappySys Drivers. This is API is somewhat similar as <a href="https://zappysys.com/blog/import-amazon-mws-data-sql-server-t-sql/" target="_blank" rel="noopener">Amazon MWS Report Request (See last section)</a>.</p>
<p>Here are high level steps needs to be performed to call API for Bing Ads Report (e.g. Performance Report)</p>
<ol>
<li>Call <a href="https://docs.microsoft.com/en-us/advertising/reporting-service/submitgeneratereport?view=bingads-13" target="_blank" rel="noopener">SubmitGenerateReportResponse</a> API to request new Report. This returns ReportRequestId</li>
<li>Now we have to keep checking every few seconds see report is ready or not. Call <a href="https://docs.microsoft.com/en-us/advertising/reporting-service/pollgeneratereport?view=bingads-13" target="_blank" rel="noopener">PollGenerateReport</a> until Status field is Success from Pending</li>
<li>Once previous step returns Success extract Report Download URL (Its Zip File which may contain data in CSV or XML)</li>
</ol>
<p>So lets get started to implement above login in a single T-SQL Query and load data into Table. There is a known limitation with Query Size we can send to data gateway from SSMS so we can use some tricks to read Body from File rather than hard coding in SQL. We can use IsMultiPart=True and then supply Filepath in RequestBody (Path must start with @ symbol)</p>
<ol>
<li>Bing Report API needs 2 additional values along with DeveloperToken we got earlier. You need to supply <strong>AccountId</strong> and <strong>CustomerId</strong> part of Body so obtain it by visiting below page in your bing account.<br />
Visit <a href="https://ads.microsoft.com/cc/accounts" target="_blank" rel="noopener">https://ads.microsoft.com/cc/accounts</a></p>
<div id="attachment_7362" style="width: 666px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/how-to-get-bing-ads-accountid-customerid.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7362" class="size-full wp-image-7362" src="https://zappysys.com/blog/wp-content/uploads/2019/06/how-to-get-bing-ads-accountid-customerid.png" alt="Obtain Bing Ads AccountId, ClientId for APi calls" width="656" height="556" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/how-to-get-bing-ads-accountid-customerid.png 656w, https://zappysys.com/blog/wp-content/uploads/2019/06/how-to-get-bing-ads-accountid-customerid-300x254.png 300w" sizes="(max-width: 656px) 100vw, 656px" /></a><p id="caption-attachment-7362" class="wp-caption-text">Obtain Bing Ads AccountId, ClientId for APi calls</p></div></li>
<li>Create new XML file for first step in a Notepad. Enter below content and save as <strong>C:\Requests\BingAds\sql_body1.xml</strong><br />
Replace Following Values as per your settingsCustomerAccountId (Found 2 places)<br />
CustomerId<br />
DeveloperToken<br />
<pre class="crayon-plain-tag">&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:ApplicationToken i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:AuthenticationToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;&lt;%access_token%&gt;&lt;/h:AuthenticationToken&gt;
    &lt;h:CustomerAccountId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;481xxxxxxxxxxx&lt;/h:CustomerAccountId&gt;
    &lt;h:CustomerId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;191xxxxxxxxxxx&lt;/h:CustomerId&gt;
    &lt;h:DeveloperToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;1052Bxxxxxxxxxxx&lt;/h:DeveloperToken&gt;
    &lt;h:Password i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:UserName i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;SubmitGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13"&gt;
      &lt;ReportRequest i:type="CampaignPerformanceReportRequest" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
        &lt;ExcludeColumnHeaders&gt;false&lt;/ExcludeColumnHeaders&gt;
        &lt;ExcludeReportFooter&gt;false&lt;/ExcludeReportFooter&gt;
        &lt;ExcludeReportHeader&gt;false&lt;/ExcludeReportHeader&gt;
        &lt;Format&gt;Xml&lt;/Format&gt;
        &lt;ReportName&gt;My Campaign Performance Report&lt;/ReportName&gt;
        &lt;ReturnOnlyCompleteData&gt;false&lt;/ReturnOnlyCompleteData&gt;
        &lt;Aggregation&gt;Hourly&lt;/Aggregation&gt;
        &lt;Columns&gt;
          &lt;CampaignPerformanceReportColumn&gt;TimePeriod&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AccountId&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;CampaignId&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;CampaignName&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;CampaignStatus&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;DeviceType&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;BidMatchType&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;QualityScore&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AdRelevance&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;LandingPageExperience&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Revenue&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Assists&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;ExpectedCtr&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;DeliveredMatchType&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AveragePosition&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Conversions&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AdDistribution&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Network&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Clicks&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Impressions&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Ctr&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AverageCpc&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Spend&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;LowQualityClicks&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;LowQualityConversionRate&lt;/CampaignPerformanceReportColumn&gt;
        &lt;/Columns&gt;
        &lt;Filter&gt;
          &lt;AccountStatus i:nil="true" /&gt;
          &lt;AdDistribution i:nil="true" /&gt;
          &lt;DeviceOS i:nil="true" /&gt;
          &lt;DeviceType i:nil="true" /&gt;
          &lt;Status i:nil="true" /&gt;
        &lt;/Filter&gt;
        &lt;Scope&gt;
          &lt;AccountIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"&gt;
            &lt;a:long&gt;481xxxxxxxxxxx&lt;/a:long&gt;
          &lt;/AccountIds&gt;
          &lt;Campaigns i:nil="true" /&gt;
        &lt;/Scope&gt;
        &lt;Time&gt;
          &lt;CustomDateRangeEnd i:nil="true" /&gt;
          &lt;CustomDateRangeStart i:nil="true" /&gt;
          &lt;PredefinedTime&gt;Yesterday&lt;/PredefinedTime&gt;
          &lt;ReportTimeZone&gt;PacificTimeUSCanadaTijuana&lt;/ReportTimeZone&gt;
        &lt;/Time&gt;
      &lt;/ReportRequest&gt;
    &lt;/SubmitGenerateReportRequest&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;</pre>
&nbsp;</li>
<li>Create another XML file for second step in a Notepad. Enter below content and save as <strong>C:\Requests\BingAds\sql_body2.xml</strong><br />
Replace following values as per your need.<br />
<pre class="crayon-plain-tag">&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:ApplicationToken i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:AuthenticationToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;&lt;%access_token%&gt;&lt;/h:AuthenticationToken&gt;
    &lt;h:CustomerAccountId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;480xxxxxxxxxxx&lt;/h:CustomerAccountId&gt;
    &lt;h:CustomerId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;191xxxxxxxxxxx&lt;/h:CustomerId&gt;
    &lt;h:DeveloperToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;1052Bxxxxxxxxxxx&lt;/h:DeveloperToken&gt;
    &lt;h:Password i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:UserName i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;PollGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13"&gt;
      &lt;ReportRequestId&gt;[$a.ReportRequestId$]&lt;/ReportRequestId&gt;
    &lt;/PollGenerateReportRequest&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;</pre>
&nbsp;</li>
<li>Now try to execute below query. This should generate Performance report and download it in a SQL table for you.<br />
<pre class="crayon-plain-tag">select * into tmpBingAdsReport from OPENQUERY(Zs_BingAds,
'SELECT c.* FROM $
WITH(
	--submit report request for XML format

	 alias=''a'' 
	,Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
	,Filter=''$.s:Envelope.s:Body.SubmitGenerateReportResponse''
	,RequestData=''@C:\Requests\BingAds\sql_body1.xml''
	,IsMultiPart=''True''
	,RequestContentTypeCode=''TextXml''
	,Header=''SOAPAction: "SubmitGenerateReport"''
	,RequestMethod=''POST''
	,EnableBodyPlaceholderForMultiPart=''True''
	,Meta=''[{"Name": "ReportRequestId","Type": "Int64"}]''

	--keep checking status until report is ready - returns final url when done

	,join1_alias=''b''
	,join1_Filter=''$.s:Envelope.s:Body.PollGenerateReportResponse.ReportRequestStatus''
	,join1_RequestData=''@C:\Requests\BingAds\sql_body2.xml''
	,join1_IsMultiPart=''True''
	,join1_Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
	,join1_RequestContentTypeCode=''TextXml''
	,join1_Header=''SOAPAction: "PollGenerateReport"''
	,join1_RequestMethod=''POST''
	,join1_EnableBodyPlaceholderForMultiPart=''True''
	,join1_EnableStatusCheck=''True'', 
	,join1_StatucCheckMaxWaitSeconds=300, --wait max 5 mins?
	,join1_StatucCheckIterationWaitSeconds=5, --check every 5 sec?
	,join1_StatusSuccessValue=''Success'', --look for success word in response

	--Download report (Zip file) and Parse rows

	,join2_alias=''c''
	,join2_DataConnectionType=''Default''
	,join2_Src=''[$b.ReportDownloadUrl$]''
	,join2_Filter=''$.Report.Table.Row[*]''
	,join2_ElementsToTreatAsArray=''Row''	
	,join2_RequestMethod=''GET''
	,join2_IsMultiPart=''False''
	,join2_FileCompressionType=''Zip''	
)')

select * from tmpBingAdsReport</pre>
<div id="attachment_7218" style="width: 841px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7218" class="size-full wp-image-7218" src="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png" alt="" width="831" height="741" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png 831w, https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table-768x685.png 768w" sizes="(max-width: 831px) 100vw, 831px" /></a><p id="caption-attachment-7218" class="wp-caption-text">Import Bing Ads data into SQL Server</p></div></li>
</ol>
<h2>Multi Step Query to download Report</h2>
<p>So in previous section we saw how to write a single query to get your Performance Report from Bing Ads. However there will be time you want to split 3 steps into seperate queries.</p>
<p>Here is how to do.</p><pre class="crayon-plain-tag">/*
RPC and RPC OUT options must be turned on to run this proc

EXEC master.dbo.sp_serveroption @server=N'Zs_BingAds', @optname=N'rpc', @optvalue=N'true'
EXEC master.dbo.sp_serveroption @server=N'Zs_BingAds', @optname=N'rpc out', @optvalue=N'true'
--Below needed to support EXEC + INSERT (dynamic query)
EXEC master.dbo.sp_serveroption @server=N'Zs_BingAds, @optname=N'remote proc transaction promotion', @optvalue=N'false'
Also 
1. Change Body file path
2. Change CustomerAccountId, CustomerId, DeveloperToken
*/

ALTER proc usp_Api_BingAds_Reports
as
--///////////////////////////////////////////////////////////////////////////////
--Step-1 - submit report request for XML format
--///////////////////////////////////////////////////////////////////////////////
create table #tmpBingAdsReport_Step1(ReportRequestId bigint)
INSERT into #tmpBingAdsReport_Step1
EXEC(
'SELECT * FROM $
WITH(
 Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
,Filter=''$.s:Envelope.s:Body.SubmitGenerateReportResponse''
,RequestData=''@c:\BWProjects\Requests\BingAds\sql_body1.xml''
,IsMultiPart=''True''
,RequestContentTypeCode=''TextXml''
,Header=''SOAPAction: "SubmitGenerateReport"''
,RequestMethod=''POST''
,EnableBodyPlaceholderForMultiPart=''True''
,Meta=''[{"Name": "ReportRequestId","Type": "Int64"}]''
)') AT zs_BingAds


--///////////////////////////////////////////////////////////////////////////////
--Step2 - keep checking status until report is ready - returns final url when done
--///////////////////////////////////////////////////////////////////////////////

declare @reportid varchar(100)
select top 1 @reportid=cast(ReportRequestId as varchar(100)) from #tmpBingAdsReport_Step1

create table #tmpBingAdsReport_Step2(ReportDownloadUrl varchar(500))
INSERT into #tmpBingAdsReport_Step2 
EXEC(
'SELECT * FROM $
WITH(
 Filter=''$.s:Envelope.s:Body.PollGenerateReportResponse.ReportRequestStatus''
,RequestData=''&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:ApplicationToken i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:AuthenticationToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;&lt;%access_token%&gt;&lt;/h:AuthenticationToken&gt;
    &lt;h:CustomerAccountId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;480xxxxxxxxx&lt;/h:CustomerAccountId&gt;
    &lt;h:CustomerId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;191xxxxxxxxx&lt;/h:CustomerId&gt;
    &lt;h:DeveloperToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;105xxxxxxxxxxx&lt;/h:DeveloperToken&gt;
    &lt;h:Password i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:UserName i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;PollGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13"&gt;
      &lt;ReportRequestId&gt;'+ @reportid +'&lt;/ReportRequestId&gt;
    &lt;/PollGenerateReportRequest&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;''
--,IsMultiPart=''True''
,Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
,RequestContentTypeCode=''TextXml''
,Header=''SOAPAction: "PollGenerateReport"''
,RequestMethod=''POST''
--,EnableBodyPlaceholderForMultiPart=''True''
,EnableStatusCheck=''True'', 
,StatucCheckMaxWaitSeconds=300, --wait max 5 mins?
,StatucCheckIterationWaitSeconds=5, --check every 5 sec?
,StatusSuccessValue=''Success'', --look for success word in response
,Meta=''[{"Name": "ReportDownloadUrl","Type": "String",Length:"300"}]''
)') AT zs_BingAds


declare @reportpath varchar(500)
select top 1 @reportpath=ReportDownloadUrl from #tmpBingAdsReport_Step2

select * from #tmpBingAdsReport_Step1
select * from #tmpBingAdsReport_Step2

--///////////////////////////////////////////////////////////////////////////////
--Step-3 - Get report file
--///////////////////////////////////////////////////////////////////////////////
--Static table
--//INSERT INTO BingAdsReport
EXEC(
'SELECT * FROM $
WITH(
 DataConnectionType=''Default''
,Src='''+ @reportpath +'''
,Filter=''$.Report.Table.Row[*]''
,ElementsToTreatAsArray=''Row''	
,RequestMethod=''GET''
,IsMultiPart=''False''
,FileCompressionType=''Zip''	
)') AT zs_BingAds


--select * from tmpBingAdsReport_Step3
--select * from openquery(Bing, 'select * from $')


/*
select * into tmpBingAdsReport from OPENQUERY(zs_BingAds,
'SELECT c.* FROM $
WITH(
--submit report request for XML format

alias=''a'' 
,Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
,Filter=''$.s:Envelope.s:Body.SubmitGenerateReportResponse''
,RequestData=''@c:\BWProjects\Requests\BingAds\sql_body1.xml''
,IsMultiPart=''True''
,RequestContentTypeCode=''TextXml''
,Header=''SOAPAction: "SubmitGenerateReport"''
,RequestMethod=''POST''
,EnableBodyPlaceholderForMultiPart=''True''
,Meta=''[{"Name": "ReportRequestId","Type": "Int64"}]''

--keep checking status until report is ready - returns final url when done

,join1_alias=''b''
,join1_Filter=''$.s:Envelope.s:Body.PollGenerateReportResponse.ReportRequestStatus''
,join1_RequestData=''@c:\BWProjects\Requests\BingAds\sql_body2.xml''
,join1_IsMultiPart=''True''
,join1_Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
,join1_RequestContentTypeCode=''TextXml''
,join1_Header=''SOAPAction: "PollGenerateReport"''
,join1_RequestMethod=''POST''
,join1_EnableBodyPlaceholderForMultiPart=''True''
,join1_EnableStatusCheck=''True'', 
,join1_StatucCheckMaxWaitSeconds=300, --wait max 5 mins?
,join1_StatucCheckIterationWaitSeconds=5, --check every 5 sec?
,join1_StatusSuccessValue=''Success'', --look for success word in response

--Download report (Zip file) and Parse rows

,join2_alias=''c''
,join2_DataConnectionType=''Default''
,join2_Src=''[$b.ReportDownloadUrl$]''
,join2_Filter=''$.Report.Table.Row[*]''
,join2_ElementsToTreatAsArray=''Row''	
,join2_RequestMethod=''GET''
,join2_IsMultiPart=''False''
,join2_FileCompressionType=''Zip''	
)')

select * from tmpBingAdsReport

select * from openquery(Bing, 'select * from $')
*/
go</pre><p>
&nbsp;</p>
<h2>Conclusion</h2>
<p>In this article we saw how to import Bing Ads API data in SQL Server without any coding using <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack (SOAP / XML Driver)</a>. Download it it and try it for FREE to explore many API integration features not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/import-bing-ads-data-sql-server-performance-reports/">Import Bing Ads data into SQL Server (Performance Reports)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read / Write REST API data in Talend (JSON / XML / SOAP)</title>
		<link>https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 12 Jan 2019 20:18:31 +0000</pubDate>
				<category><![CDATA[ETL - Talend]]></category>
		<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[etl]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[talend]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6012</guid>

					<description><![CDATA[<p>Introduction In this post we will learn how to read / write REST API data in Talend Open Studio. We will create a simple Talend Job using ZappySys JSON  Driver to read from REST API / JSON Files and load into Target (e.g. File / DB). Techniques listed in this article can be also used to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/">Read / Write REST API data in Talend (JSON / XML / SOAP)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> Please visit <a href="https://zappysys.com/api/integration-hub/apps/talend-studio">Talend Studio Connectors</a> page in <a href="https://zappysys.com/api/integration-hub">API Integration Hub</a> to find updated articles on various Talend Studio integrations, including integrations with <a href="https://zappysys.com/api/integration-hub/rest-api-connector/talend-studio">REST API</a>, <a href="https://zappysys.com/api/integration-hub/soap-connector/talend-studio">SOAP API</a>, <a href="https://zappysys.com/api/integration-hub/json-file-connector/talend-studio">JSON file</a>, and <a href="https://zappysys.com/api/integration-hub/xml-file-connector/talend-studio">XML file</a>.</div></div>
<p><img loading="lazy" decoding="async" class="wp-image-11136 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-logo-2.png" alt="" width="150" height="151" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-logo-2.png 177w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-logo-2-150x150.png 150w" sizes="(max-width: 150px) 100vw, 150px" />In this post we will learn how to read / write REST API data in Talend Open Studio. We will create a simple Talend Job using <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ZappySys JSON  Driver</a> to read from REST API / JSON Files and load into Target (e.g. File / DB). Techniques listed in this article can be also used to read from SOAP API / XML Files or CSV Files / API using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/">XML Driver</a> / <a href="https://zappysys.com/products/odbc-powerpack/odbc-csv-rest-api-driver/">CSV Driver</a>.</p>
<p>These drivers support familiar SQL query language. Using SQL you can query virtually any API services just like relational database table. It can flatten nested hierarchy and provide output in rows / columns. Many complex REST API / SOAP API complexity is taken care automatically (e.g. Authentication, Pagination, Security, Error Handling).</p>
<p>So let&#8217;s get started.</p>
<p>&nbsp;</p>
<h2>Requirements</h2>
<ol>
<li>Download and install Talend Open Studio (FREE) <a href="https://www.talend.com/products/data-integration/data-integration-open-studio/" target="_blank" rel="noopener">from here</a>. Skip this step if you already installed.</li>
<li>Download <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> (JSON / XML Drivers)</li>
<li>Get Microsoft <strong>JDBC driver</strong> for <strong>SQL Server</strong> <a href="https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&amp;id=11774">from here</a> (Download <strong>sqljdbc_6.0.8112.200_enu.exe</strong> which is self extracting file you can run and extract to some folder)<br />
After you extract jdbc files, go to sqljdbc_6.0\enu\jre8\ folder rename <strong>sqljdbc42.jar</strong> to  <strong>mssql-jdbc.jar</strong> (name must be this). We will load this file in Talend later in this article.</li>
<li>Basic knowledge about REST API and JSON / XML format.</li>
</ol>
<h2>Configure Data Gateway</h2>
<div class="content_block" id="custom_post_widget-5282">Now let's look at how to configure <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a>. This feature acts as a bridge between Client App and ZappySys Drivers. Using data gateway you can use ZappySys Drivers inside applications / operating systems where ZappySys drivers may not be available directly for some reason (e.g. You don't have access to Server for Installation or System does not support ODBC drivers like JAVA programs). <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-gateway/">Click here to read more</a> on various use cases of Data Gateway.
<h4><span style="font-size: 14pt;">Configure Data Gateway User / Port</span></h4>
Now let's look at steps to configure Data Gateway after installation. We will also create a sample data source for ODATA API (i.e. JSON based REST API Service).
<ol>
 	<li>Assuming you have installed <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> using default options (Which also enables Data Gateway Service)</li>
 	<li>Search "Gateway" in your start menu and click ZappySys Data Gateway
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Open ZappySys Data Gateway</p>

</div></li>
 	<li>First make sure Gateway Service is running (Verify Start icon is disabled)</li>
 	<li>Also verify Port on General Tab
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-1.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-1.png" alt="Port Number setting on ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Port Number setting on ZappySys Data Gateway</p>

</div></li>
 	<li>Now go to Users tab. <strong>Click Add</strong> icon to add a new user. Check Is admin to give access to all data sources you add in future. If you don't check admin then you have to manually configure user permission for each data source.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-2.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-2.png" alt="Add Data Gateway User" /></a>
<p class="wp-caption-text">Add Data Gateway User</p>

</div></li>
</ol>
&nbsp;
<h4><span style="font-size: 14pt;">Configure Data Source</span></h4>
<ol>
 	<li>After user is added, go to Data Sources tab. <strong>Click Add</strong> icon to create new data source. Select appropriate driver based on your API / File format. You can choose Generic ODBC option to read data from ODBC DSN or use Native Driver option.
<pre class=""><strong>NOTE:</strong> Whenever possible use native driver option for better performance / security and ease of use.</pre>
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-3.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-3.png" alt="Add Gateway Data Source (Native JSON Driver)" /></a>
<p class="wp-caption-text">Add Gateway Data Source (Native JSON Driver)</p>

</div></li>
 	<li>Click on "Edit" under Data source and configure as per your need (e.g. Url, Connection, Request Method, Content Type, Body, Pagination etc.). For this demo we are going to pick simple JSON REST API which doesn't need any authentication.  Enter following URL.
<pre class="">https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json</pre>
</li>
 	<li>You can also view response structure and select default hierarchy (i.e. Filter) like below (Select Array Icon) for data extraction.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-4.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-4.png" alt="Configure JSON API Data source" /></a>
<p class="wp-caption-text">Configure JSON API Data source</p>

</div></li>
</ol>
<h4><span style="font-size: 14pt;">Test SQL Query / Preview Data</span></h4>
<ol>
 	<li>Now go to Preview Tab. You can click Preview button to execute default query
OR
Select Table name from dropdown to generate SQL with column names.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-5.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-5.png" alt="JSON / REST API Driver Query Preview / Query Examples (Read REST API or JSON Files)" /></a>
<p class="wp-caption-text">JSON / REST API Driver Query Preview / Query Examples (Read REST API or JSON Files)</p>

</div></li>
 	<li>You can also click Query Builder to generate SQL using different options in WITH clause. ANy setting you specify in WITH clause will override UI settings we applied in previous steps.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-6.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-6.png" alt="Using SQL Query Builder (For Files or REST / SOAP API - JSON / XML / CSV Format)" /></a>
<p class="wp-caption-text">Using SQL Query Builder (For Files or REST / SOAP API - JSON / XML / CSV Format)</p>

</div></li>
 	<li>There is another useful option for code generation. Select your Language and quickly copy code snippet. See below Example of XML Driver Query to call SOAP API.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-7.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-7.png" alt="Generate Example Code for ZappySys Driver" /></a>
<p class="wp-caption-text">Generate Example Code for ZappySys Driver</p>

</div></li>
 	<li><strong>Click OK</strong> to Close Data Source UI</li>
 	<li>Once data source is tested and configured you can <strong>click Save </strong>button in the Gateway UI toolbar and click <strong>Yes</strong> for <strong>Restart Service</strong>.</li>
</ol>
&nbsp;</div>
<h2>Register MS SQL JDBC driver in Talend</h2>
<p>Now lets register Microsoft JDBC Driver in Talend. This is very important step because MSSQL JDBC driver is used to communicate with ZappySys Data Gateway we configured in previous step.</p>
<p>If you missed steps mentioned in the Requirements section then make sure you first download JDBC driver using below steps.</p>
<p>Get Microsoft <strong>JDBC driver</strong> for <strong>SQL Server</strong> <a href="https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&amp;id=11774">from here</a> (Download <strong>sqljdbc_6.0.8112.200_enu.exe</strong> which is self extracting file you can run and extract to some folder). After you extract jdbc files, go to sqljdbc_6.0\enu\jre8\ folder rename <strong>sqljdbc42.jar</strong> to  <strong>mssql-jdbc.jar</strong> (name must be this).</p>
<p>Now lets go through the steps to register MSSQL jdbc driver in Talend.</p>
<ol>
<li>Open Talend Open Studio</li>
<li>Go to <strong>Windows</strong> &gt; Click <strong><strong>Show View</strong></strong>
<div id="attachment_6038" style="width: 456px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-views-menu.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6038" class="size-full wp-image-6038" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-views-menu.png" alt="Talend - Show View" width="446" height="184" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-views-menu.png 446w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-views-menu-300x124.png 300w" sizes="(max-width: 446px) 100vw, 446px" /></a><p id="caption-attachment-6038" class="wp-caption-text">Talend &#8211; Show View</p></div></li>
<li>When you see Popup selection under <strong>Talend</strong> &gt; Select <strong><strong><strong>Modules</strong></strong></strong>
<div id="attachment_6037" style="width: 342px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-modules-option.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6037" class="size-full wp-image-6037" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-modules-option.png" alt="Talend - Select Modules Window" width="332" height="399" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-modules-option.png 332w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-modules-option-250x300.png 250w" sizes="(max-width: 332px) 100vw, 332px" /></a><p id="caption-attachment-6037" class="wp-caption-text">Talend &#8211; Select Modules Window</p></div></li>
<li>When Module window is visible click on Little Jar Icon (Bottle icon) in the toolbar.</li>
<li>Select <strong>mssql-jdbc.jar</strong> file we renamed earlier and load this file.
<div id="attachment_6036" style="width: 870px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6036" class="size-full wp-image-6036" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar.png" alt="Talend - Import JAR file / module (Register MS SQL JDBC Driver Example)" width="860" height="348" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar.png 860w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar-300x121.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar-768x311.png 768w" sizes="(max-width: 860px) 100vw, 860px" /></a><p id="caption-attachment-6036" class="wp-caption-text">Talend &#8211; Import JAR file / module (Register MS SQL JDBC Driver Example)</p></div></li>
<li>That&#8217;s it. Now we ready to make API calls / read from JSON / XML in the next section.</li>
</ol>
<h2>Setup Talend REST API Connection (JSON / XML / CSV)</h2>
<p>Now let&#8217;s configure REST API Connection in Talend. To read from JSON / XML Files you can use same steps too. We will use MSSQL JDBC Driver to connect to ZappySys Data Gateway.</p>
<ol>
<li>In Talend Go to Metadata &gt; Db Connections (Right click) &gt; Create Connection
<div id="attachment_6030" style="width: 353px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-create-new-db-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6030" class="size-full wp-image-6030" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-create-new-db-connection.png" alt="Talend - Create new DB connection (JSON / REST API Example)" width="343" height="364" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-create-new-db-connection.png 343w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-create-new-db-connection-283x300.png 283w" sizes="(max-width: 343px) 100vw, 343px" /></a><p id="caption-attachment-6030" class="wp-caption-text">Talend &#8211; Create new DB connection (JSON / REST API Example)</p></div></li>
<li>On the connection Wizard specify following attributes.<br />
<strong>DB Version :</strong> Microsoft<br />
<strong>Login :</strong>  username you setup in zappysys data gateway<br />
<strong>Password :</strong>  password of data gateway user<br />
<strong>Server :</strong> machine name or IP where zappysys data gateway is running<br />
<strong>Port :</strong> &lt;default is 5000&gt; Port on which zappysys data gateway is listening<br />
<strong>DataBase :</strong>  Data source name you setup in zappysys data gateway (case-sensitive)</p>
<div id="attachment_6029" style="width: 977px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6029" class="size-full wp-image-6029" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc.png" alt="Talend - Connect to JSON / REST API using ZappySys Gateway (Use MS SQL JDBC Driver)" width="967" height="716" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc.png 967w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc-300x222.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc-768x569.png 768w" sizes="(max-width: 967px) 100vw, 967px" /></a><p id="caption-attachment-6029" class="wp-caption-text">Talend &#8211; Connect to JSON / REST API using ZappySys Gateway (Use MS SQL JDBC Driver)</p></div></li>
<li>That&#8217;s all we need to do to setup a connection which can be used to read / write REST API data in Talend. In the next section we will see how to create a job to read data from REST API Service using this connection.</li>
</ol>
<p>&nbsp;</p>
<h2>Read from REST API in Talend</h2>
<p>Now let&#8217;s look at how to read data from REST API source or JSON / XML File using the connection we configured in the previous section.</p>
<h3>Configure REST API Source</h3>
<ol>
<li>Create a Talend JOB and double click to open designer</li>
<li>Now drag and drop MSSQL Connection we created for ZappySys Data gateway, drop it on the designer surface. It will popup UI like below.</li>
<li>Select <strong>tDBInput</strong> (Microsoft SQL Server). Remember that we are using MSSQL JDBC Driver to connect to ZappySys Data Gateway for REST API Call. This gateway uses Microsoft TDS Protocol so MSSQL JDBC driver is used to communicate.</li>
<li>Now rename Source to something meaningful (e.g. Read from JSON REST API)</li>
<li>Double click REST Source to configure.</li>
<li>Enter <strong>Query</strong> like below (Make sure to <strong>enter between double quotes</strong>). See below examples to read from URL or File. If you have double quote in SQL then escape using \&#8221; character (e.g. select \&#8221;my col\&#8221; from $ )<strong>Read From REST API Url</strong><br />
<pre class="crayon-plain-tag">"SELECT * FROM value 
WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json')"</pre>
<strong>Read from Local File (Wildcard Pattern Search allowed)</strong><br />
<pre class="crayon-plain-tag">"SELECT * FROM value 
WITH (SRC='c:\data\Customers_*.json')"</pre>
</li>
<li>Click on <strong>Guess Schema</strong> button and Click OK to accept detected schema.
<div id="attachment_6028" style="width: 972px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6028" class="size-full wp-image-6028" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source.png" alt="Talend - Configure REST API / JSON Source (Enter SQL Query / Guess Schema)" width="962" height="723" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source.png 962w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source-300x225.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source-768x577.png 768w" sizes="(max-width: 962px) 100vw, 962px" /></a><p id="caption-attachment-6028" class="wp-caption-text">Talend &#8211; Configure REST API / JSON Source (Enter SQL Query / Guess Schema)</p></div></li>
<li>Now we will configure target in the next section.</li>
</ol>
<h3>Configure Target (Delimited File)</h3>
<ol>
<li>Now search for &#8220;FileOut&#8221; in the toolbox (Hit Enter). You will see <strong>tFileOutputDelimited</strong> so just select that for now and drag on the surface.
<div id="attachment_6035" style="width: 828px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6035" class="size-full wp-image-6035" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file.png" alt="Talend - Add File Output (tFileOutputDelimited)" width="818" height="307" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file.png 818w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file-768x288.png 768w" sizes="(max-width: 818px) 100vw, 818px" /></a><p id="caption-attachment-6035" class="wp-caption-text">Talend &#8211; Add File Output (tFileOutputDelimited)</p></div></li>
<li>Double click it to configure.</li>
<li>Enter correct file path (e.g. &#8220;C:/Talend/workspace/rest-api-output.csv&#8221; )</li>
<li>On Advanced Tab you can configure some additional settings (e.g. Throw an error if file already exists)</li>
</ol>
<h3>Connect and Run</h3>
<ol>
<li>Once you have configured Source and Target its time to connect them</li>
<li>Drag Source Port to Target to connect like below.
<div id="attachment_6033" style="width: 539px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-load-json-rest-api-data-to-csv-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6033" class="size-full wp-image-6033" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-load-json-rest-api-data-to-csv-file.png" alt="Talend - Connect REST / JSON Source to File Target" width="529" height="176" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-load-json-rest-api-data-to-csv-file.png 529w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-load-json-rest-api-data-to-csv-file-300x100.png 300w" sizes="(max-width: 529px) 100vw, 529px" /></a><p id="caption-attachment-6033" class="wp-caption-text">Talend &#8211; Connect REST / JSON Source to File Target</p></div></li>
<li>Run the job
<div id="attachment_6034" style="width: 863px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6034" class="wp-image-6034 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table.png" alt="Run Talend Job - Loading REST API data into File (Read JSON / XML / CSV)" width="853" height="510" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table.png 853w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table-300x179.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table-768x459.png 768w" sizes="(max-width: 853px) 100vw, 853px" /></a><p id="caption-attachment-6034" class="wp-caption-text">Run Talend Job &#8211; Loading REST API data into File (Read JSON / XML / CSV)</p></div></li>
<li>That&#8217;s it. So in few clicks you loaded data from REST API to File in Talend Open Studio.</li>
</ol>
<h2>Write / Send data to REST API (POST Example)</h2>
<p>There will be a time when you want to POST data to REST API service. Let&#8217;s check how to write POST query to submit data to REST API.</p>
<p>Just like how we did Read query in previous example, we can set POST Body in the SQL Query to send data. Use query like below and click Guess Schema button. If Blank Filter gives you no data error then make sure you remove Filter on Data Gateway Data source. (Notice we used \&#8221; to escape double quote inside query )</p><pre class="crayon-plain-tag">"SELECT * FROM _root_
WITH (
 METHOD='POST'
,HEADER='Content-Type: text/plain || first-header: AAA || second-header: BBB'
,SRC='http://httpbin.org/post'
,BODY='{id:1,notes:\"Some notes\"}'
,FILTER=''
)
"</pre><p>
<div id="attachment_6040" style="width: 848px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6040" class="size-full wp-image-6040" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url.png" alt="Talend - POST data to REST API URL" width="838" height="641" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url.png 838w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url-300x229.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url-768x587.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-6040" class="wp-caption-text">Talend &#8211; POST data to REST API URL</p></div>
<h2>SQL Query Examples</h2>
<p>Click on below link to learn more writing SQL Query using ZappySys Drivers.</p>
<p><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">JSON / REST Driver &#8211; SQL Query Examples</a></p>
<p><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/xml-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">XML / SOAP Driver &#8211; SQL Query Examples</a></p>
<p><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/csv-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">CSV / REST Driver &#8211; SQL Query Examples</a></p>
<h2>REST API / XML SOAP Pagination Settings for Talend</h2>
<div class="content_block" id="custom_post_widget-3892"><div style="margin-bottom: 1em;">Even we set up ODBC Data Source to get the data, it may not be enough. Usually, if you are getting a huge data set from API provider, it won't give it to you in one HTTP response. Instead, it gives back only a subset of data and provides a mechanism for data pagination. The good news is that <em>ZappySys ODBC Driver</em> includes many options to cover virtually any pagination method.</div>
<div><span style="font-size: 16px;">Below you will find a few examples of API pagination. If you need something more sophisticated check the below link (the article was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too):</span></div>
<div style="margin-bottom: 1em;"><a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/</a></div>
<h3>Paginate by Response Attribute</h3>
This example shows how to paginate API calls where you need to paginate until the last page detected. In this example, next page is indicated by some attribute called nextlink (found in response). If this attribute is missing or null then it stops fetching the next page.
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH(
SRC=@'https://zappysys.com/downloads/files/test/pagination_nextlink_inarray_1.json'
,NextUrlAttributeOrExpr = '$.nextlink'  --keep reading until this attribute is missing. If attribute name contains dot then use brackets like this $.['my.attr.name']
)</pre>
<h3>Paginate by URL Parameter (Loop until certain StatusCode)</h3>
This example shows how to paginate API calls where you need to pass page number via URL. The driver keeps incrementing page number and calls next URL until the last page detected (401 error). There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/page-xml.aspx?page=1&amp;mode=DetectBasedOnResponseStatusCode'
,PagingMode='ByUrlParameter'
,PagingByUrlAttributeName='page'
,PagingByUrlEndStrategy='DetectBasedOnResponseStatusCode'
,PagingByUrlCheckResponseStatusCode=401
,IncrementBy=1
)</pre>
<h3>Paginate by URL Path (Loop until no record)</h3>
This example shows how to paginate API calls where you need to pass page number via URL Path. The driver keeps incrementing page number and calls next URL until the last page is detected. There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/cust-&lt;%page%&gt;.xml'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='&lt;%page%&gt;'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)</pre>
<h3>Paginate by Header Link (RFC 5988)</h3>
API like GitHub / Wordpress use Next link in Headers (<a href="https://tools.ietf.org/html/rfc5988" target="_blank" rel="noopener">RFC 5988</a>)
<pre class="lang:default decode:true ">SELECT * FROM $
LIMIT 25
WITH(
	 Src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)</pre>
&nbsp;</div>
<h2>REST API / SOAP Web Service Connection Settings for Talend</h2>
<div class="content_block" id="custom_post_widget-3896"><div style="margin-bottom: 1em;">If you need to authenticate or authorize your user to access a web resource, you will need to use one of the <em>Connections:</em></div>
<ul>
 	<li>HTTP</li>
 	<li>OAuth</li>
</ul>
<img loading="lazy" decoding="async" class="wp-image-4078 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png" alt="ZappySys XML Driver - HTTP and OAuth Connection Types" width="577" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png 577w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252-300x157.png 300w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>HTTP Connection</h3>
<div style="margin-bottom: 1em;">Use <em>HTTP Connection</em> for simple Windows, Basic, NTLM or Kerberos authentication. Just fill in a username and a password and you are good to go!</div>
<div style="margin-bottom: 1em;">You can also use <em>HTTP Connection</em> for more sophisticated authentication like:</div>
<ul>
 	<li><strong>SOAP WSS</strong> (when accessing a SOAP WebService)</li>
 	<li><strong>Static Token / API Key</strong> (when need to pass an API key in HTTP header)</li>
 	<li><strong>Dynamic Token</strong> (same as Static Token method except that each time you need to log in and retrieve a fresh API key)</li>
 	<li><strong>JWT Token</strong> (As per RFC 7519)</li>
</ul>
<img loading="lazy" decoding="async" class="alignnone wp-image-4091 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-1.png" alt="" width="622" height="570" />
<h3>OAuth</h3>
If you are trying to access REST API resource, it is a huge chance, you will need to use <em>OAuth Connection</em>. <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">Read this article</a> to understand how OAuth authentication and authorization works and how to use it (article originally was written for <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>, but the concepts and UI stay the same): <br/>
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/</a>
<img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-2.png" width="721" height="708" /></div>
<h2>Other settings for REST API / SOAP XML Call in Talend</h2>
<div class="content_block" id="custom_post_widget-3901">There are few settings you can coder while calling Web API
<h3><strong>API Limit / Throttling</strong></h3>
While calling public API or other external web services one important aspect you have to check,  how many requests are allowed by your API. Especially when you use API pagination options to pull many records you have to slow down based on API limits. For example, your API may allow you only 5 requests per second. Use Throttling Tab on Driver UI to set delay after each request.
<h3><strong>2D Array Transformation</strong></h3>
If you are using JSON or XML API Driver then possible you may have to transform your data using 2D array transformation feature. <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Check this link</a> for more information.

&nbsp;</div>
<h2>REST API / XML SOAP Performance Tips for Talend</h2>
<div class="content_block" id="custom_post_widget-4455">While calling APIs you may face some performance issues. There are a few tips you can consider to speed up things.
<h4><span style="font-size: 14pt;"><strong>Use Server-side filtering if possible in URL or Body Parameters</strong></span></h4>
Many API supports filtering your data by URL parameters or via Body. Whenever possible try to use such features.  Here is an example of <a href="http://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">odata API</a>, In the below query the first query is faster than the second query because in the first query we filter at the server.
<pre class="lang:tsql decode:true">SELECT * FROM value
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json&amp;$filter=Country eq ''USA'''
	,DataFormat='Odata'
)

-- Slow query - Client-side filtering
SELECT * FROM value
WHERE Country ='USA'
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json'
	,DataFormat='Odata'
)</pre>
<h4><span style="font-size: 14pt;"><strong>Avoid Special features in SQL Query (e.g. WHERE, Group By, Order By)</strong></span></h4>
ZappySys API engine triggers client-side processing if special features are used in Query. Following SQL Features will trigger Client-Side processing which is several times slower than server-side processing. So always try to use simple query (Select col1, col2 .... from mytable )
<ul>
 	<li>WHERE Clause</li>
 	<li>GROUP BY Clause</li>
 	<li>HAVING Clause</li>
 	<li>ORDER BY</li>
 	<li>FUNCTIONS (e.g. Math, String, DateTime, Regex... )</li>
</ul>
LIMIT clause does not trigger client-side processing.
<h4><span style="font-size: 14pt;"><strong>Consider using pre-generated Metadata / Cache File</strong></span></h4>
Use META option in WITH Clause to use static metadata (Pre-Generated)There are two more options to speedup query processing time. Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details.
<ol>
 	<li>
<pre class="lang:default decode:true">select * from value WITH( meta='c:\temp\meta.txt' )
--OR--
select * from value WITH( meta='my-meta-name' )
--OR--
select * from value WITH( meta='[ {"Name": "col1",&amp;nbsp;"Type": "String", Length: 100},&amp;nbsp;{"Name": "col2",&amp;nbsp;"Type": "Int32"} ...... ]' )</pre>
</li>
 	<li>Enable Data Caching Options (Found on <strong>Property Grid</strong> &gt; <strong>Advanced</strong> Mode Only )</li>
</ol>
<h4><span style="font-size: 14pt;"><strong>Consider using Metadata / Data Caching Option</strong></span></h4>
ZappySys API drivers support Caching Metadata and Data rows to speed up query processing. If your data doesn't change often then you can enable this option to speed up processing significantly.

Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details how to enable Data cache / metadata cache feature for datasource level or query level.

To define cache option at query level you can use like below.
<pre class="">SELECT * FROM $
WITH 
(  SRC='https://myhost.com/some-api'
  ,CachingMode='All'  --cache metadata and data rows both
  ,CacheStorage='File' --or Memory
  ,CacheFileLocation='c:\temp\myquery.cache'
  ,CacheEntryTtl=300 --cache for 300 seconds
)
</pre>
&nbsp;

&nbsp;
<h4><strong><span style="font-size: 14pt;">Use --FAST Option to enable Stream Mode</span></strong></h4>
ZappySys JSON / XML drivers support <strong>--FAST</strong> suffix for Filter. By using this suffix after Filter driver enables Stream Mode, <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Reading_Large_Files_Streaming_Mode_for_XML_JSON" target="_blank" rel="noopener">Read this article</a> to understand how this works.
<pre class="lang:default decode:true">SELECT * FROM $ 
LIMIT 10 --//add this just to test how fast you can get 10 rows
WITH(
  Filter='$.LargeArray[*]--FAST' --//Adding --FAST option turn on STREAM mode (large files)
 ,SRC='https://zappysys.com/downloads/files/test/large_file_100k_largearray_prop.json.gz'
 --,SRC='c:\data\large_file.json.gz'
 ,IncludeParentColumns='False'  --//This Must be OFF for STREAM mode (read very large files)
 ,FileCompressionType='GZip' --Zip or None (Zip format only available for Local files)
)</pre>
&nbsp;</div>
<h2>Calling SOAP Web Service in Talend</h2>
<div class="content_block" id="custom_post_widget-3870">To call SOAP API you need to know Request XML Body Structure. If you are not sure how to create SOAP Request body then no worries. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn how to generate SOAP Request body using the Free tool <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a>. Basically, you have to use SoapUI to generate Request XML and after that, you can replace parameters as needed in the generated body.
<h3>What is SOAP Web Service?</h3>
If you are new to SOAP Web Service sometimes referred as XML Web Service then please read some concept about SOAP Web service standard <a href="https://msdn.microsoft.com/en-us/library/ms996507.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener">from this link</a>

There are two important aspects in SOAP Web service.
<ol>
 	<li>Getting WSDL file or URL</li>
 	<li>Knowing exact Web Service URL</li>
</ol>
<h3>What is WSDL</h3>
In very simple term WSDL (often pronounced as whiz-dull) is nothing but a document which describes Service metadata (e.g. Functions you can call, Request parameters, response structure etc). Some service simply give you WSDL as xml file you can download on local machine and then analyze or sometimes you may get direct URL (e.g. http://api.mycompany.com/hr-soap-service/?wsdl )
<h3>Example SQL Query for SOAP API call using ZappySys XML Driver</h3>
Here is an example SQL query you can write to call SOAP API. If you not sure about many details then check next few sections on how to use XML Driver User Interface to build desired SQL query to POST data to XML SOAP Web Service without any coding.
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(
	 Src='http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx'
	,DataConnectionType='HTTP'
	,CredentialType='Basic' --OR SoapWss
	,SoapWssPasswordType='PasswordText'
	,UserName='myuser'
	,Password='pass$$w123'
	,Filter='$.soap:Envelope.soap:Body.GetHolidaysAvailableResponse.GetHolidaysAvailableResult.HolidayCode[*]'
	,ElementsToTreatAsArray='HolidayCode'	
	,RequestMethod='POST'	
	,Header='Content-Type: text/xml;charset=UTF-8 || SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hol="http://www.holidaywebservice.com/HolidayService_v2/"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;hol:GetHolidaysAvailable&gt;
         &lt;!--type: Country - enumeration: [Canada,GreatBritain,IrelandNorthern,IrelandRepublicOf,Scotland,UnitedStates]--&gt;
         &lt;hol:countryCode&gt;UnitedStates&lt;/hol:countryCode&gt;
      &lt;/hol:GetHolidaysAvailable&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
Now let's look at steps to create SQL query to call SOAP API. Later we will see how to generate code for your desired programming language (e.g. C# or SQL Server)
<h3>Video Tutorial - Introduction to SOAP Web Service and SoapUI tool</h3>
Before we dive into details about calling SOAP API using ZappySys XML Driver, lets first understand what is SOAP API and how to create SOAP requests using SoapUI tool. You will learn more about this process in the later section. The video contains some fragment about using SOAP API in SSIS but just ignore that part because we will be calling Soap API using ZappySys ODBC Driver rather than SSIS Components.

&nbsp;

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/d_x5bgGjg0Y?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe>
<h3>Using SoapUI to test SOAP API call / Create Request Body XML</h3>
Assuming you have downloaded and installed <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI from here</a>, now we are ready to use WSDL for your SOAP Web Service Calls. If you do not have WSDL file or URL handy then contact your API provider (sometimes you just have to add <strong>?wsdl </strong>at the end of your Service URL to get WSDL so try that. Example: http://mycompany/myservice?wsdl ).

If you don't know what is WSDL then in short, WSDL is <strong>Web service Description Language</strong> (i.e. XML file which describes your SOAP Service). WSDL helps to craft SOAP API request Body for ZappySys XML Driver. So Let's get started.
<ol>
 	<li>Open SoapUI and click SOAP button to create new SOAP Project</li>
 	<li>Enter WSDL URL or File Path of WSDLFor example WSDL for our sample service can be accessed via this URL
<pre class="lang:default highlight:0 decode:true">http://www.dneonline.com/calculator.asmx?wsdl</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-import-wsdl-new-soapui-project.png"><img loading="lazy" decoding="async" class="size-full wp-image-3871" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-14.png" alt="Create new SOAP API Project in SoapUI tool for SOAP API Testing" width="486" height="349" /></a>
<div style="margin-bottom: 1em;">Create new SOAP API Project in SoapUI tool for SOAP API Testing</div></li>
 	<li>Once WSDL is loaded you will see possible operations you can call for your SOAP Web Service.</li>
 	<li>If your web service requires credentials then you have to configure it. There are two common credential types for public services (<strong>SOAP WSS</strong> or <strong>BASIC</strong> )
<ol>
 	<li>
<div style="margin-bottom: 1em;">To use <strong>SOAP WSS Credentials</strong> select request node and enter UserId, Password, and <strong>WSS-PasswordType</strong> (PasswordText or PasswordHash)</div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-soap-wss-credentials-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3872 alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)" width="294" height="544" /></a>
<div style="display: block;">Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)</div></li>
 	<li>To use <strong>BASIC Auth</strong> Credentials select request node and double-click it. At the bottom click on Auth (Basic) and From Authorization dropdown click Add New and Select Basic.<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-basic-authentication-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3873" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure Basic Authorization for SoapUI (SOAP API Testing Tool)" width="616" height="653" /></a>
<div style="margin-bottom: 1em;">Configure Basic Authorization for SoapUI (SOAP API Testing Tool)</div></li>
</ol>
</li>
 	<li>Now you can test your request first Double-click on the request node to open request editor.</li>
 	<li>Change necessary parameters, remove optional or unwanted parameters. If you want to regenerate request you can click on <strong>Recreate default request toolbar icon</strong>.
<a href="https://zappysys.com/blog/wp-content/uploads/2016/06/create-soap-request-with-optional-parameters-soapui.png"><img loading="lazy" decoding="async" class="size-full wp-image-2812" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-4.png" alt="Create SOAP Request XML (With Optional Parameters)" width="807" height="315" /></a>
<div style="margin-bottom: 1em;">Create SOAP Request XML (With Optional Parameters)</div></li>
 	<li>Once your SOAP Request XML is ready, <strong>Click the Play button</strong> in the toolbar to execute SOAP API Request and Response will appear in Right side panel.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soapui-test-soap-api-request-response-edit-xml-body.png"><img loading="lazy" decoding="async" class="size-full wp-image-3874" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-5.png" alt="Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)" width="1216" height="511" /></a>
Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)</li>
</ol>
<h3>Create DSN using ZappySys XML Driver to call SOAP API</h3>
Once you have tested your SOAP API in SoapUI tool, we are ready to use ZappySys XML driver to call SOAP API in your preferred BI tool or Programming language.
<ol>
 	<li>First open <strong>ODBC Data Sources</strong> (search ODBC in your start menu or go under ZappySys &gt; ODBC PowerPack &gt; <strong>ODBC 64 bit</strong>)</li>
 	<li>Goto <strong>System DSN</strong> Tab (or User DSN which is not used by Service account)</li>
 	<li>Click <strong>Add</strong> and Select ZappySys XML Driver
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-6.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" /></a>
ZappySys ODBC Driver for XML / SOAP API</li>
 	<li>Configure API URL, Request Method and Request Body as below
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3876" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-7.png" alt="ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body" width="916" height="874" /></a>
ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body</li>
 	<li><strong>(This step is Optional)</strong> If your SOAP API requires credentials then Select Connection Type to HTTP and configure as below.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-call-credential-basic-soap-wss-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3877" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-8.png" alt="ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)" width="564" height="483" /></a>
<div style="display: block;">ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)</div></li>
 	<li>Configure-Request Headers as below (You can get it from Request &gt; Raw tab from SoapUI after you test the request by clicking the Play button)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/set-soap-api-request-headers-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3881" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-9.png" alt="Configure SOAP API Request Headers - ZappySys XML Driver" width="1009" height="747" /></a>
Configure SOAP API Request Headers - ZappySys XML Driver</li>
 	<li>Once credentials entered you can select Filter to extract data from the desired node. Make sure to select array node (see special icon) or select the node which contains all necessary columns if you don't have array node.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-query-select-filter-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3882" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-10.png" alt="Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)" width="809" height="594" /></a>
Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)</li>
 	<li>If prompted select yes to treat selected node as Array (This is helpful when you expect one or more record for selected node)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/xml-api-array-handling-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3883" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-11.png" alt="Treat selected node as XML Array Option for SOAP API Response XML" width="655" height="572" /></a>
Treat selected node as XML Array Option for SOAP API Response XML</li>
</ol>
<h3>Preview SOAP API Response / Generate SQL Code for SOAP API Call</h3>
Once you configure settings for XML Driver now you can preview data or generate example code for desired language (e.g. C#, Python, Java, SQL Server).

Go to Preview tab and you will see default query generated based on settings you entered in previous sections. Attributes listed in WITH clause are optional. If you omit attribute in WITH clause it will use it from Properties tab.
<h3>Preview Data</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3884" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-12.png" alt="Preview SOAP API Response in ZappySys XML Driver" width="808" height="780" /></a>
Preview SOAP API Response in ZappySys XML Driver
<h3>Generate Code Option</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-driver-code-generator.png"><img loading="lazy" decoding="async" class="size-full wp-image-3885" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-13.png" alt="Generate Example Code for ZappySys Driver" width="572" height="618" /></a>
<div style="display: block;">Generate Example Code for ZappySys Driver</div></div>
<h2>Conclusion</h2>
<p>In this article, we used ZappySys Drivers to read data from JSON REST API / File. You can use same technique to consume SOAP / XML API or File. <a href="https://zappysys.com/products/odbc-powerpack/">Try ODBC PowerPack for FREE</a> and check out how easy it is to consume virtually any REST / SOAP API or Read from JSON / XML / CSV Files in  Talend Open Studio.</p>
<p>The post <a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/">Read / Write REST API data in Talend (JSON / XML / SOAP)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Call Oracle UCM Web Service in SSIS (Read XML SOAP API)</title>
		<link>https://zappysys.com/blog/read-write-oracle-ucm-web-service-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 17 Dec 2018 18:32:11 +0000</pubDate>
				<category><![CDATA[HTTP Connection]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS XML Source (File / SOAP)]]></category>
		<category><![CDATA[soap]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5615</guid>

					<description><![CDATA[<p>Introduction In this post we will learn how to access data from Oracle UCM Web Service (Middle layer for WebLogic) and load into SQL Server or any other target. We will use SSIS XML Source to achieve this result. &#160; &#160; About Oracle UCM Web Service If you are not sure what is SOAP Web [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-oracle-ucm-web-service-using-ssis/">Call Oracle UCM Web Service in SSIS (Read XML SOAP API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/oracle-logo.png"><img loading="lazy" decoding="async" class=" wp-image-5682 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/12/oracle-logo.png" alt="" width="110" height="110" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/oracle-logo.png 243w, https://zappysys.com/blog/wp-content/uploads/2018/12/oracle-logo-150x150.png 150w" sizes="(max-width: 110px) 100vw, 110px" /></a>In this post we will learn how to access data from <a href="https://docs.oracle.com/cd/E21764_01/doc.1111/e10807/c12_web_services.htm#CSSDK816" target="_blank" rel="noopener">Oracle UCM Web Service</a> (Middle layer for WebLogic) and load into SQL Server or any other target. We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a> to achieve this result.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>About Oracle UCM Web Service</h2>
<p>If you are not sure what is SOAP Web Service and how to call in SSIS, First read <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/">this article</a> to understand general concepts of calling SOAP API in SSIS.</p>
<p>UCM Web Service offers <a href="https://docs.oracle.com/cd/E21764_01/doc.1111/e10807/a01_wsdl_and_soap.htm#CSSDK1102" target="_blank" rel="noopener">calling various commands</a>. You have to send XML Request and server will send you XML response with requested data. We will use <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Array Transformation Technique (Key / Value Pattern)</a> to extract complex nested XML data.</p>
<h2>Step-By-Step</h2>
<p>Now let&#8217;s look at how to call Oracle UCM SOAP API in SSIS.</p>
<h3>Read from Oracle UCM Web Service using XML Source</h3>
<ol>
<li>Drag Data Flow Task in SSIS Designer</li>
<li>Inside Data flow drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">ZS SSIS XML Source</a> from toolbox</li>
<li>First enter URL as below (Replace INSTANCE ID with your own instance)<br />
<pre class="crayon-plain-tag">https://YOUR-INSTANCE-ID.oraclecloud.com/idcws/GenericSoapPort</pre>
</li>
<li>Now Check Use Credentials and select new ZS-HTTP connection</li>
<li>Enter your User ID and Password to call Web Service using Basic Authentication. Click OK to save.
<div id="attachment_5626" style="width: 827px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-oracle-ucm-web-api-connection-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5626" class="size-full wp-image-5626" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-oracle-ucm-web-api-connection-settings.png" alt="Configure HTTP Connection - Call Oracle UCM Web Service (SOAP XML)" width="817" height="673" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-oracle-ucm-web-api-connection-settings.png 817w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-oracle-ucm-web-api-connection-settings-300x247.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-oracle-ucm-web-api-connection-settings-768x633.png 768w" sizes="(max-width: 817px) 100vw, 817px" /></a><p id="caption-attachment-5626" class="wp-caption-text">Configure HTTP Connection &#8211; Call Oracle UCM Web Service (SOAP XML)</p></div></li>
<li>On XML Source UI Select Content Type = XML (text / xml, charset=UTF-8)</li>
<li>Select Request Method as <strong>POST</strong></li>
<li>Click Enter Raw Edit for HTTP Headers and enter below<br />
<pre class="crayon-plain-tag">SOAPAction: &quot;urn:GenericSoap/GenericSoapOperation&quot;</pre>
</li>
<li>Click on Edit Body and enter your Request Body in XML format.For example to call <strong>GET_SEARCH_RESULTS</strong> service to retrieve the search results for the passed query text you can submit Request Body as below.<br />
<strong>NOTICE:</strong>  String in Search Text was surrounded by backtick (  `  ). Single tick / double quote didn&#8217;t work in our case.<br />
<pre class="crayon-plain-tag">&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ucm="http://www.oracle.com/UCM"&gt;
&lt;soapenv:Body&gt;
  &lt;ucm:GenericRequest webKey="cs"&gt;
    &lt;ucm:Service IdcService="GET_SEARCH_RESULTS"&gt;
      &lt;ucm:Document&gt;
        &lt;ucm:Field name="QueryText"&gt;dDocTitle &amp;lt;starts&amp;gt; `MY_sites_201`&lt;/ucm:Field&gt;
      &lt;/ucm:Document&gt;
    &lt;/ucm:Service&gt;
  &lt;/ucm:GenericRequest&gt;
&lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-read-oracle-ucm-soap-service.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5625" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-read-oracle-ucm-soap-service.png" alt="" width="975" height="661" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-read-oracle-ucm-soap-service.png 975w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-read-oracle-ucm-soap-service-300x203.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-read-oracle-ucm-soap-service-768x521.png 768w" sizes="(max-width: 975px) 100vw, 975px" /></a></li>
<li>Now Select Filter (Browse upto Fields under SearchResult node. Once you click OK try to edit your Expression so it looks like below. As you may notice we changed <strong>ResultSet[*]</strong> to <strong>ResultSet[?(@@name==&#8217;SearchResults&#8217;)]</strong><br />
This will ensure that we extract records from only SearchResult Node and not other nodes such as UserAttribInfo or EnterpriseSearchResults<br />
<pre class="crayon-plain-tag">$.env:Envelope.env:Body.ns2:GenericResponse.ns2:Service.ns2:Document.ns2:ResultSet[?(@@name=='SearchResults')].ns2:Row[*]</pre>
<div id="attachment_5624" style="width: 955px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-select-filter.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5624" class="size-full wp-image-5624" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-select-filter.png" alt="Select Filter" width="945" height="390" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-select-filter.png 945w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-select-filter-300x124.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-xml-source-select-filter-768x317.png 768w" sizes="(max-width: 945px) 100vw, 945px" /></a><p id="caption-attachment-5624" class="wp-caption-text">Select Filter</p></div></li>
<li>Now go to 2D Array Tab. Select <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Key / Value Pattern Option</a>.</li>
<li>Select Column Names / Value Filters as below. You can Use Browse Option to navigate to that field or just type below directly. Below expression will Transform Rows into Column. Foreach attribute name we will get one column.Column Name Filter =&gt;  <strong>$.ns2:Field[*].@name</strong><br />
Column Value Filter =&gt;  <strong>$.ns2:Field[*].#text</strong></li>
<li>Now Click Preview to confirm it works<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-calling-oracle-ucm-web-service-weblogic-soap-api.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5627" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-calling-oracle-ucm-web-service-weblogic-soap-api.png" alt="" width="842" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-calling-oracle-ucm-web-service-weblogic-soap-api.png 842w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-calling-oracle-ucm-web-service-weblogic-soap-api-300x262.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-calling-oracle-ucm-web-service-weblogic-soap-api-768x670.png 768w" sizes="(max-width: 842px) 100vw, 842px" /></a></li>
<li>That&#8217;s it, you can now click OK to close UI.</li>
</ol>
<h3>Loading Oracle UCM SOAP API data into SQL Server / Other Target</h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2>Conclusion</h2>
<p>In this post we saw how easy it is to consume XML SOAP Web Service in SSIS. We called SOAP Service for Oracle UCM Web Service and loaded data into target like SQL Server. You can <a href="https://zappysys.com/products/ssis-powerpack/">download SSIS PowerPack</a> and try many other scenarios like this using 70+ other SSIS Tasks /Components not mentioned in this article.</p>
<p>The post <a href="https://zappysys.com/blog/read-write-oracle-ucm-web-service-using-ssis/">Call Oracle UCM Web Service in SSIS (Read XML SOAP API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import REST API in MS Access (Load JSON / SOAP XML)</title>
		<link>https://zappysys.com/blog/import-rest-api-ms-access-load-json-soap-xml/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 13 Oct 2018 05:31:43 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC Drivers]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[ms access]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5166</guid>

					<description><![CDATA[<p>Introduction In this post, we will learn how to import REST API in MS Access (JSON or SOAP XML data).  We will use ODBC PowerPack to connect and query a JSON file / URL. JSON stands for JavaScript Object Notation and it is an Open and Standard format to read an object with attributes and values.  JSON [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-rest-api-ms-access-load-json-soap-xml/">Import REST API in MS Access (Load JSON / SOAP XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/json-to-access-import-logo.png"><img loading="lazy" decoding="async" class="alignleft wp-image-5178 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/10/json-to-access-import-logo-150x150.png" alt="json to access logo" width="150" height="150" /></a></p>
<p>In this post, we will learn how to import REST API in MS Access (JSON or SOAP XML data).  We will use <a href="https://zappysys.com/products/odbc-powerpack/">ODBC PowerPack</a> to connect and query a JSON file / URL.</p>
<p>JSON stands for JavaScript Object Notation and it is an Open and Standard format to read an object with attributes and values.  JSON is replacing XML because it is faster to read data, it is easier to parse data, it does not require end tags, it is shorter and it can use arrays.</p>
<p>We will load the data using the <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ZappySys JSON / REST API driver</a> and then import the data in Access. You can use similar techniques to load SOAP Data using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">XML / SOAP Driver</a>.</p>
<p>&nbsp;</p>
<h2><span id="Requirements">Requirements</span></h2>
<p>This article assumes the following requirements are met before you can follow the steps listed in this article.</p>
<ol>
<li>Make sure that Microsoft Access installed</li>
<li>Also, the driver <a href="https://zappysys.com/products/odbc-powerpack/download/">ODBC PowerPack</a> installed</li>
</ol>
<h2><span id="An_introduction_to_Rest_API_and_OData">An introduction to Rest API and OData</span></h2>
<p>In this example, we will use OData (Open Data Protocol) to consume REST API. REST API (Representational State Transfer Application Program Interface) allows handling the interoperability between computers and the internet.</p>
<p>In REST API we can handle web services in different formats. In this example, we will work with the Northwind example. The Northwind example is available in this URL:</p>
<div id="crayon-5bc180f1dd015720033381" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate">
<div class="crayon-main">
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc</pre>
</div>
</div>
<ol>
<li>By default, the data is displayed in XML format. To show the data in JSON use this URL:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/?$format=json</pre>
</li>
<li>There are collections of data like Categories, CustomerDemographic, Customers, Invoices, etc. For example, the following URL will show the data of the categories collection:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Categories?$format=json</pre>
</li>
<li>In the next steps, we will use ZappySys drivers to connect to this URL and query using OData.</li>
</ol>
<h2><span id="Configure_ODBC_DSN_for_ZappySys_JSON_Driver">Configure ODBC DSN for ZappySys JSON Driver</span></h2>
<p>ODBC driver can be accessed in two modes.</p>
<ol>
<li>Using DSN</li>
<li>Without DSN (Supply direct Connection String e.g. <strong>DRIVER={ZappySys JSON Driver}; ……..</strong> )</li>
</ol>
<p>In this article, we will use the DSN approach (User DSN). We will first add the ZappySys JSON Driver in the ODBC Data Source Administrator.</p>
<p>Follow these steps to accomplish the task:</p>
<ol>
<li>First, <strong>Windows search</strong>, write <strong>ODBC</strong> and select the <strong>ODBC Data sources (32 bits)</strong>
<div id="attachment_2780" class="wp-caption aligncenter">
<div id="attachment_2780" style="width: 395px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?ssl=1"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?zoom=0.8999999761581421&amp;resize=385%2C520&amp;ssl=1" alt="Open ODBC Data source" width="385" height="520" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></div>
</div>
</li>
<li>As a second step, in ODBC Data source Administrator press the <strong>Add</strong> button.
<div id="attachment_2725" class="wp-caption aligncenter">
<div id="attachment_2725" style="width: 600px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png?ssl=1"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2725" class="wp-image-2725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png" alt="Add ZappySys" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-2725" class="wp-caption-text">Add ZappySys</p></div>
</div>
</li>
<li>In this step, create the new data source, select <strong>ZappySys ODBC Driver.</strong>
<div id="attachment_2772" class="wp-caption aligncenter">
<div id="attachment_2772" style="width: 302px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?ssl=1"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="wp-image-2772 size-medium" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?zoom=0.8999999761581421&amp;resize=292%2C218&amp;ssl=1" alt="add new zappysys" width="292" height="217" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys json driver</p></div>
</div>
</li>
<li>Here we have several properties, write a data source name. In this example, the name will be ZappySys JSON to Excel.</li>
<li>The Data Source (URL or file path) can specify the URL of the source or if it is a local file, you can specify the local path. In this example, the URL is:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json</pre>
You can also specify a local file path as Data SourceFor a single file:  c:\data\myfile_1.json<br />
For multiple files: c:\data\myfile_*.json</li>
<li>Configure the ODBC JSON Driver like this:
<div id="attachment_5169" style="width: 812px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5169" class="wp-image-5169 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration.png" alt="Configure JSON Driver for REST API Call" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a><p id="caption-attachment-5169" class="wp-caption-text">Configure JSON Driver for REST API Call</p></div></li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel"><a id="how-to-import-data"></a>How to <em><span style="text-decoration: underline;">import</span></em> REST API data to Access</span></h2>
<ol>
<li>In MS Access, go to <strong>External Data</strong> Ribbon and select <strong>New Data Source</strong> and select <strong>From Other Sources</strong> and <strong>ODBC Database</strong>.
<div id="attachment_5171" style="width: 1235px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5171" class="wp-image-5171 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" alt="Configuration in MS Access: Import Data From REST API" width="1225" height="572" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png 1225w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-300x140.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-768x359.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-1024x478.png 1024w" sizes="(max-width: 1225px) 100vw, 1225px" /></a><p id="caption-attachment-5171" class="wp-caption-text">A configuration in MS Access: Import Data From REST API</p></div></li>
<li>Select the Source and destination of the data, select <strong>Import the source data into a new table in the current database</strong> and press OK.
<div id="attachment_2726" class="wp-caption alignnone">
<div id="attachment_5172" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5172" class="size-full wp-image-5172" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" alt="Get External Data - ODBC Database" width="736" height="543" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc-300x221.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5172" class="wp-caption-text">Get External Data &#8211; ODBC Database</p></div>
</div>
</li>
<li>Select your newly created JSON Driver from the Machine Data Source and click<strong><strong><strong> OK.<br />
</strong></strong></strong></p>
<div id="attachment_5223" style="width: 455px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5223" class="size-full wp-image-5223" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" alt="Get External Data - Select your newly created ODBC Data Source (JSON Driver)" width="445" height="395" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png 445w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1-300x266.png 300w" sizes="(max-width: 445px) 100vw, 445px" /></a><p id="caption-attachment-5223" class="wp-caption-text">Get External Data &#8211; Select your newly created ODBC Data Source (JSON Driver)</p></div>
<p>&nbsp;</p>
<p>&nbsp;</li>
<li>Select tables from the list of tables in the Import Objects screen and click <strong><strong>OK.<br />
</strong></strong></p>
<div id="attachment_5174" style="width: 473px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5174" class="size-full wp-image-5174" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" alt="Get External Data - Select tables from Import Objects Screen" width="463" height="452" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png 463w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables-300x293.png 300w" sizes="(max-width: 463px) 100vw, 463px" /></a><p id="caption-attachment-5174" class="wp-caption-text">Get External Data &#8211; Select tables from Import Objects Screen</p></div></li>
<li>Select <strong>Save Import Steps</strong> from the screen and click on <strong>Save Import</strong> button.
<div id="attachment_5175" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5175" class="size-full wp-image-5175" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" alt="Get External Data - Select Save Import Steps" width="736" height="576" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps-300x235.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5175" class="wp-caption-text">Get External Data &#8211; Select Save Import Steps</p></div></li>
<li>If everything is OK, you will be able to see the data.
<div id="attachment_5176" style="width: 1353px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5176" class="size-full wp-image-5176" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" alt="Data Imported Successfully in MS Access DB Table" width="1343" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png 1343w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-300x90.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-768x231.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-1024x308.png 1024w" sizes="(max-width: 1343px) 100vw, 1343px" /></a><p id="caption-attachment-5176" class="wp-caption-text">Data Imported Successfully in MS Access DB Table</p></div></li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel">How to <i><u>link</u> </i>REST API data to Access</span></h2>
<p>The linking process is very similar to importing data into the Access table. Follow steps of the previous paragraph &#8211; <a href="#how-to-import-data">How to import REST API data to Access</a> &#8211; but on step 2 select the second option to create a <em><strong>linked table</strong></em><b><i> </i></b>instead. Then once asked to select a unique record identifier, don&#8217;t select anything:</p>
<div id="attachment_7445" style="width: 326px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7445" class="wp-image-7445 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png" alt="Link table approach - don't select unique record identifier" width="316" height="382" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png 316w, https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack-248x300.png 248w" sizes="(max-width: 316px) 100vw, 316px" /><p id="caption-attachment-7445" class="wp-caption-text">Linked table approach &#8211; Don&#8217;t select a unique record identifier</p></div>
<h2>REST API / XML SOAP Pagination Settings for MS Access</h2>
<div class="content_block" id="custom_post_widget-3892"><div style="margin-bottom: 1em;">Even we set up ODBC Data Source to get the data, it may not be enough. Usually, if you are getting a huge data set from API provider, it won't give it to you in one HTTP response. Instead, it gives back only a subset of data and provides a mechanism for data pagination. The good news is that <em>ZappySys ODBC Driver</em> includes many options to cover virtually any pagination method.</div>
<div><span style="font-size: 16px;">Below you will find a few examples of API pagination. If you need something more sophisticated check the below link (the article was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too):</span></div>
<div style="margin-bottom: 1em;"><a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/</a></div>
<h3>Paginate by Response Attribute</h3>
This example shows how to paginate API calls where you need to paginate until the last page detected. In this example, next page is indicated by some attribute called nextlink (found in response). If this attribute is missing or null then it stops fetching the next page.
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH(
SRC=@'https://zappysys.com/downloads/files/test/pagination_nextlink_inarray_1.json'
,NextUrlAttributeOrExpr = '$.nextlink'  --keep reading until this attribute is missing. If attribute name contains dot then use brackets like this $.['my.attr.name']
)</pre>
<h3>Paginate by URL Parameter (Loop until certain StatusCode)</h3>
This example shows how to paginate API calls where you need to pass page number via URL. The driver keeps incrementing page number and calls next URL until the last page detected (401 error). There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/page-xml.aspx?page=1&amp;mode=DetectBasedOnResponseStatusCode'
,PagingMode='ByUrlParameter'
,PagingByUrlAttributeName='page'
,PagingByUrlEndStrategy='DetectBasedOnResponseStatusCode'
,PagingByUrlCheckResponseStatusCode=401
,IncrementBy=1
)</pre>
<h3>Paginate by URL Path (Loop until no record)</h3>
This example shows how to paginate API calls where you need to pass page number via URL Path. The driver keeps incrementing page number and calls next URL until the last page is detected. There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/cust-&lt;%page%&gt;.xml'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='&lt;%page%&gt;'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)</pre>
<h3>Paginate by Header Link (RFC 5988)</h3>
API like GitHub / Wordpress use Next link in Headers (<a href="https://tools.ietf.org/html/rfc5988" target="_blank" rel="noopener">RFC 5988</a>)
<pre class="lang:default decode:true ">SELECT * FROM $
LIMIT 25
WITH(
	 Src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)</pre>
&nbsp;</div>
<h2>REST API / SOAP Web Service Connection Settings for MS Access</h2>
<div class="content_block" id="custom_post_widget-3896"><div style="margin-bottom: 1em;">If you need to authenticate or authorize your user to access a web resource, you will need to use one of the <em>Connections:</em></div>
<ul>
 	<li>HTTP</li>
 	<li>OAuth</li>
</ul>
<img loading="lazy" decoding="async" class="wp-image-4078 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png" alt="ZappySys XML Driver - HTTP and OAuth Connection Types" width="577" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png 577w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252-300x157.png 300w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>HTTP Connection</h3>
<div style="margin-bottom: 1em;">Use <em>HTTP Connection</em> for simple Windows, Basic, NTLM or Kerberos authentication. Just fill in a username and a password and you are good to go!</div>
<div style="margin-bottom: 1em;">You can also use <em>HTTP Connection</em> for more sophisticated authentication like:</div>
<ul>
 	<li><strong>SOAP WSS</strong> (when accessing a SOAP WebService)</li>
 	<li><strong>Static Token / API Key</strong> (when need to pass an API key in HTTP header)</li>
 	<li><strong>Dynamic Token</strong> (same as Static Token method except that each time you need to log in and retrieve a fresh API key)</li>
 	<li><strong>JWT Token</strong> (As per RFC 7519)</li>
</ul>
<img loading="lazy" decoding="async" class="alignnone wp-image-4091 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-1.png" alt="" width="622" height="570" />
<h3>OAuth</h3>
If you are trying to access REST API resource, it is a huge chance, you will need to use <em>OAuth Connection</em>. <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">Read this article</a> to understand how OAuth authentication and authorization works and how to use it (article originally was written for <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>, but the concepts and UI stay the same): <br/>
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/</a>
<img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-2.png" width="721" height="708" /></div>
<h2>Other settings for REST API / SOAP XML Call in MS Access</h2>
<div class="content_block" id="custom_post_widget-3901">There are few settings you can coder while calling Web API
<h3><strong>API Limit / Throttling</strong></h3>
While calling public API or other external web services one important aspect you have to check,  how many requests are allowed by your API. Especially when you use API pagination options to pull many records you have to slow down based on API limits. For example, your API may allow you only 5 requests per second. Use Throttling Tab on Driver UI to set delay after each request.
<h3><strong>2D Array Transformation</strong></h3>
If you are using JSON or XML API Driver then possible you may have to transform your data using 2D array transformation feature. <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Check this link</a> for more information.

&nbsp;</div>
<h2>REST API / XML SOAP Performance Tips for MS Access</h2>
<div class="content_block" id="custom_post_widget-4455">While calling APIs you may face some performance issues. There are a few tips you can consider to speed up things.
<h4><span style="font-size: 14pt;"><strong>Use Server-side filtering if possible in URL or Body Parameters</strong></span></h4>
Many API supports filtering your data by URL parameters or via Body. Whenever possible try to use such features.  Here is an example of <a href="http://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">odata API</a>, In the below query the first query is faster than the second query because in the first query we filter at the server.
<pre class="lang:tsql decode:true">SELECT * FROM value
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json&amp;$filter=Country eq ''USA'''
	,DataFormat='Odata'
)

-- Slow query - Client-side filtering
SELECT * FROM value
WHERE Country ='USA'
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json'
	,DataFormat='Odata'
)</pre>
<h4><span style="font-size: 14pt;"><strong>Avoid Special features in SQL Query (e.g. WHERE, Group By, Order By)</strong></span></h4>
ZappySys API engine triggers client-side processing if special features are used in Query. Following SQL Features will trigger Client-Side processing which is several times slower than server-side processing. So always try to use simple query (Select col1, col2 .... from mytable )
<ul>
 	<li>WHERE Clause</li>
 	<li>GROUP BY Clause</li>
 	<li>HAVING Clause</li>
 	<li>ORDER BY</li>
 	<li>FUNCTIONS (e.g. Math, String, DateTime, Regex... )</li>
</ul>
LIMIT clause does not trigger client-side processing.
<h4><span style="font-size: 14pt;"><strong>Consider using pre-generated Metadata / Cache File</strong></span></h4>
Use META option in WITH Clause to use static metadata (Pre-Generated)There are two more options to speedup query processing time. Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details.
<ol>
 	<li>
<pre class="lang:default decode:true">select * from value WITH( meta='c:\temp\meta.txt' )
--OR--
select * from value WITH( meta='my-meta-name' )
--OR--
select * from value WITH( meta='[ {"Name": "col1",&amp;nbsp;"Type": "String", Length: 100},&amp;nbsp;{"Name": "col2",&amp;nbsp;"Type": "Int32"} ...... ]' )</pre>
</li>
 	<li>Enable Data Caching Options (Found on <strong>Property Grid</strong> &gt; <strong>Advanced</strong> Mode Only )</li>
</ol>
<h4><span style="font-size: 14pt;"><strong>Consider using Metadata / Data Caching Option</strong></span></h4>
ZappySys API drivers support Caching Metadata and Data rows to speed up query processing. If your data doesn't change often then you can enable this option to speed up processing significantly.

Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details how to enable Data cache / metadata cache feature for datasource level or query level.

To define cache option at query level you can use like below.
<pre class="">SELECT * FROM $
WITH 
(  SRC='https://myhost.com/some-api'
  ,CachingMode='All'  --cache metadata and data rows both
  ,CacheStorage='File' --or Memory
  ,CacheFileLocation='c:\temp\myquery.cache'
  ,CacheEntryTtl=300 --cache for 300 seconds
)
</pre>
&nbsp;

&nbsp;
<h4><strong><span style="font-size: 14pt;">Use --FAST Option to enable Stream Mode</span></strong></h4>
ZappySys JSON / XML drivers support <strong>--FAST</strong> suffix for Filter. By using this suffix after Filter driver enables Stream Mode, <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Reading_Large_Files_Streaming_Mode_for_XML_JSON" target="_blank" rel="noopener">Read this article</a> to understand how this works.
<pre class="lang:default decode:true">SELECT * FROM $ 
LIMIT 10 --//add this just to test how fast you can get 10 rows
WITH(
  Filter='$.LargeArray[*]--FAST' --//Adding --FAST option turn on STREAM mode (large files)
 ,SRC='https://zappysys.com/downloads/files/test/large_file_100k_largearray_prop.json.gz'
 --,SRC='c:\data\large_file.json.gz'
 ,IncludeParentColumns='False'  --//This Must be OFF for STREAM mode (read very large files)
 ,FileCompressionType='GZip' --Zip or None (Zip format only available for Local files)
)</pre>
&nbsp;</div>
<h2>Calling SOAP Web Service in MS Access</h2>
<div class="content_block" id="custom_post_widget-3870">To call SOAP API you need to know Request XML Body Structure. If you are not sure how to create SOAP Request body then no worries. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn how to generate SOAP Request body using the Free tool <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a>. Basically, you have to use SoapUI to generate Request XML and after that, you can replace parameters as needed in the generated body.
<h3>What is SOAP Web Service?</h3>
If you are new to SOAP Web Service sometimes referred as XML Web Service then please read some concept about SOAP Web service standard <a href="https://msdn.microsoft.com/en-us/library/ms996507.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener">from this link</a>

There are two important aspects in SOAP Web service.
<ol>
 	<li>Getting WSDL file or URL</li>
 	<li>Knowing exact Web Service URL</li>
</ol>
<h3>What is WSDL</h3>
In very simple term WSDL (often pronounced as whiz-dull) is nothing but a document which describes Service metadata (e.g. Functions you can call, Request parameters, response structure etc). Some service simply give you WSDL as xml file you can download on local machine and then analyze or sometimes you may get direct URL (e.g. http://api.mycompany.com/hr-soap-service/?wsdl )
<h3>Example SQL Query for SOAP API call using ZappySys XML Driver</h3>
Here is an example SQL query you can write to call SOAP API. If you not sure about many details then check next few sections on how to use XML Driver User Interface to build desired SQL query to POST data to XML SOAP Web Service without any coding.
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(
	 Src='http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx'
	,DataConnectionType='HTTP'
	,CredentialType='Basic' --OR SoapWss
	,SoapWssPasswordType='PasswordText'
	,UserName='myuser'
	,Password='pass$$w123'
	,Filter='$.soap:Envelope.soap:Body.GetHolidaysAvailableResponse.GetHolidaysAvailableResult.HolidayCode[*]'
	,ElementsToTreatAsArray='HolidayCode'	
	,RequestMethod='POST'	
	,Header='Content-Type: text/xml;charset=UTF-8 || SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hol="http://www.holidaywebservice.com/HolidayService_v2/"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;hol:GetHolidaysAvailable&gt;
         &lt;!--type: Country - enumeration: [Canada,GreatBritain,IrelandNorthern,IrelandRepublicOf,Scotland,UnitedStates]--&gt;
         &lt;hol:countryCode&gt;UnitedStates&lt;/hol:countryCode&gt;
      &lt;/hol:GetHolidaysAvailable&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
Now let's look at steps to create SQL query to call SOAP API. Later we will see how to generate code for your desired programming language (e.g. C# or SQL Server)
<h3>Video Tutorial - Introduction to SOAP Web Service and SoapUI tool</h3>
Before we dive into details about calling SOAP API using ZappySys XML Driver, lets first understand what is SOAP API and how to create SOAP requests using SoapUI tool. You will learn more about this process in the later section. The video contains some fragment about using SOAP API in SSIS but just ignore that part because we will be calling Soap API using ZappySys ODBC Driver rather than SSIS Components.

&nbsp;

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/d_x5bgGjg0Y?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe>
<h3>Using SoapUI to test SOAP API call / Create Request Body XML</h3>
Assuming you have downloaded and installed <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI from here</a>, now we are ready to use WSDL for your SOAP Web Service Calls. If you do not have WSDL file or URL handy then contact your API provider (sometimes you just have to add <strong>?wsdl </strong>at the end of your Service URL to get WSDL so try that. Example: http://mycompany/myservice?wsdl ).

If you don't know what is WSDL then in short, WSDL is <strong>Web service Description Language</strong> (i.e. XML file which describes your SOAP Service). WSDL helps to craft SOAP API request Body for ZappySys XML Driver. So Let's get started.
<ol>
 	<li>Open SoapUI and click SOAP button to create new SOAP Project</li>
 	<li>Enter WSDL URL or File Path of WSDLFor example WSDL for our sample service can be accessed via this URL
<pre class="lang:default highlight:0 decode:true">http://www.dneonline.com/calculator.asmx?wsdl</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-import-wsdl-new-soapui-project.png"><img loading="lazy" decoding="async" class="size-full wp-image-3871" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-14.png" alt="Create new SOAP API Project in SoapUI tool for SOAP API Testing" width="486" height="349" /></a>
<div style="margin-bottom: 1em;">Create new SOAP API Project in SoapUI tool for SOAP API Testing</div></li>
 	<li>Once WSDL is loaded you will see possible operations you can call for your SOAP Web Service.</li>
 	<li>If your web service requires credentials then you have to configure it. There are two common credential types for public services (<strong>SOAP WSS</strong> or <strong>BASIC</strong> )
<ol>
 	<li>
<div style="margin-bottom: 1em;">To use <strong>SOAP WSS Credentials</strong> select request node and enter UserId, Password, and <strong>WSS-PasswordType</strong> (PasswordText or PasswordHash)</div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-soap-wss-credentials-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3872 alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)" width="294" height="544" /></a>
<div style="display: block;">Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)</div></li>
 	<li>To use <strong>BASIC Auth</strong> Credentials select request node and double-click it. At the bottom click on Auth (Basic) and From Authorization dropdown click Add New and Select Basic.<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-basic-authentication-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3873" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure Basic Authorization for SoapUI (SOAP API Testing Tool)" width="616" height="653" /></a>
<div style="margin-bottom: 1em;">Configure Basic Authorization for SoapUI (SOAP API Testing Tool)</div></li>
</ol>
</li>
 	<li>Now you can test your request first Double-click on the request node to open request editor.</li>
 	<li>Change necessary parameters, remove optional or unwanted parameters. If you want to regenerate request you can click on <strong>Recreate default request toolbar icon</strong>.
<a href="https://zappysys.com/blog/wp-content/uploads/2016/06/create-soap-request-with-optional-parameters-soapui.png"><img loading="lazy" decoding="async" class="size-full wp-image-2812" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-4.png" alt="Create SOAP Request XML (With Optional Parameters)" width="807" height="315" /></a>
<div style="margin-bottom: 1em;">Create SOAP Request XML (With Optional Parameters)</div></li>
 	<li>Once your SOAP Request XML is ready, <strong>Click the Play button</strong> in the toolbar to execute SOAP API Request and Response will appear in Right side panel.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soapui-test-soap-api-request-response-edit-xml-body.png"><img loading="lazy" decoding="async" class="size-full wp-image-3874" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-5.png" alt="Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)" width="1216" height="511" /></a>
Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)</li>
</ol>
<h3>Create DSN using ZappySys XML Driver to call SOAP API</h3>
Once you have tested your SOAP API in SoapUI tool, we are ready to use ZappySys XML driver to call SOAP API in your preferred BI tool or Programming language.
<ol>
 	<li>First open <strong>ODBC Data Sources</strong> (search ODBC in your start menu or go under ZappySys &gt; ODBC PowerPack &gt; <strong>ODBC 64 bit</strong>)</li>
 	<li>Goto <strong>System DSN</strong> Tab (or User DSN which is not used by Service account)</li>
 	<li>Click <strong>Add</strong> and Select ZappySys XML Driver
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-6.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" /></a>
ZappySys ODBC Driver for XML / SOAP API</li>
 	<li>Configure API URL, Request Method and Request Body as below
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3876" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-7.png" alt="ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body" width="916" height="874" /></a>
ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body</li>
 	<li><strong>(This step is Optional)</strong> If your SOAP API requires credentials then Select Connection Type to HTTP and configure as below.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-call-credential-basic-soap-wss-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3877" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-8.png" alt="ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)" width="564" height="483" /></a>
<div style="display: block;">ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)</div></li>
 	<li>Configure-Request Headers as below (You can get it from Request &gt; Raw tab from SoapUI after you test the request by clicking the Play button)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/set-soap-api-request-headers-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3881" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-9.png" alt="Configure SOAP API Request Headers - ZappySys XML Driver" width="1009" height="747" /></a>
Configure SOAP API Request Headers - ZappySys XML Driver</li>
 	<li>Once credentials entered you can select Filter to extract data from the desired node. Make sure to select array node (see special icon) or select the node which contains all necessary columns if you don't have array node.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-query-select-filter-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3882" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-10.png" alt="Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)" width="809" height="594" /></a>
Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)</li>
 	<li>If prompted select yes to treat selected node as Array (This is helpful when you expect one or more record for selected node)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/xml-api-array-handling-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3883" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-11.png" alt="Treat selected node as XML Array Option for SOAP API Response XML" width="655" height="572" /></a>
Treat selected node as XML Array Option for SOAP API Response XML</li>
</ol>
<h3>Preview SOAP API Response / Generate SQL Code for SOAP API Call</h3>
Once you configure settings for XML Driver now you can preview data or generate example code for desired language (e.g. C#, Python, Java, SQL Server).

Go to Preview tab and you will see default query generated based on settings you entered in previous sections. Attributes listed in WITH clause are optional. If you omit attribute in WITH clause it will use it from Properties tab.
<h3>Preview Data</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3884" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-12.png" alt="Preview SOAP API Response in ZappySys XML Driver" width="808" height="780" /></a>
Preview SOAP API Response in ZappySys XML Driver
<h3>Generate Code Option</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-driver-code-generator.png"><img loading="lazy" decoding="async" class="size-full wp-image-3885" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-13.png" alt="Generate Example Code for ZappySys Driver" width="572" height="618" /></a>
<div style="display: block;">Generate Example Code for ZappySys Driver</div></div>
<div class="content_block" id="custom_post_widget-8935"><h2>Troubleshooting Errors</h2>
<p>While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "<strong>License type [ODBC_PP_TRIAL] not found or its expired</strong>"</p>

<p>Please refer to this article for the same:  <a href="https://zappysys.zendesk.com/hc/en-us/articles/360042521533-Troubleshooting-License-type-ODBC-PP-TRIAL-not-found-or-its-expired-error-in-Microsoft-Access" target="_blank" rel="noopener">Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access</a></p></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>In this article, we learned how to use the <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys ODBC PowerPack</a> to import JSON to Access. We used the OData protocol for Import data to Access.  With ZappySys ODBC Power Pack, you can query REST API information or JSON files using SQL and filter the information or write custom queries according to your needs.</p>
<h2><span id="References">References</span></h2>
<ul>
<li><a href="https://www.w3schools.com/js/js_json_intro.asp">JSON – Introduction</a></li>
<li><a href="http://www.restapitutorial.com/">Learn REST: A RESTful Tutorial</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/import-rest-api-ms-access-load-json-soap-xml/">Import REST API in MS Access (Load JSON / SOAP XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Connect Workday in Power BI &#8211; Import SOAP Data</title>
		<link>https://zappysys.com/blog/connect-workday-power-bi-import-soap-data/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 01 Oct 2018 16:21:43 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[power bi]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[SoapUI]]></category>
		<category><![CDATA[workday]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4996</guid>

					<description><![CDATA[<p>Introduction In our previous blog post we saw how to import SOAP API data in Power BI. Now let&#8217;s continue to explore more use cases. In this article we will check how to Connect WorkDay in Power BI. We will show you step by step approach on how to call Workday SOAP API in Power [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/connect-workday-power-bi-import-soap-data/">Connect Workday in Power BI &#8211; Import SOAP Data</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2016/01/workday-api-integration.png"><img loading="lazy" decoding="async" class=" wp-image-1665 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2016/01/workday-api-integration.png" alt="" width="96" height="96" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/workday-api-integration.png 195w, https://zappysys.com/blog/wp-content/uploads/2016/01/workday-api-integration-150x150.png 150w" sizes="(max-width: 96px) 100vw, 96px" /></a>In our previous blog post we saw how to <a href="https://zappysys.com/blog/call-soap-api-power-bi-read-xml-web-service-data/">import SOAP API data in Power BI</a>. Now let&#8217;s continue to explore more use cases. In this article we will check how to Connect WorkDay in Power BI. We will show you step by step approach on how to call <a href="https://community.workday.com/api" target="_blank" rel="noopener">Workday SOAP API</a> in Power BI and create Power BI reports / dashboards using imported datasets.</p>
<p>We will use <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ZappySys XML / SOAP Driver</a> for this demonstration.</p>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>First, you will need to have <a href="https://powerbi.microsoft.com/en-us/desktop/" target="_blank" rel="noopener">Power BI Desktop</a> installed</li>
<li>Make sure you have <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys ODBC Power Pack</a> installed</li>
<li>Download and have install <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a></li>
</ol>
<h2>Get Started</h2>
<p>Once above requirements are fulfilled, let&#8217;s learn how to use Workday SOAP API and import workday data in Power BI.</p>
<p>Here are high level steps to import Workday data in Power BI using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ZappySys XML / SOAP Driver</a>.</p>
<ol>
<li>Craft Workday SOAP request XML using tool like <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">SoapUI</a> for desired operation (e.g <strong>Get_Employee</strong> )</li>
<li>Configure ODBC DSN for Workday SOAP API Connection using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ZappySys XML / SOAP Driver</a>. (Select HTTP Connection with SOAP WSS mode using workday Userid / password).</li>
<li>Test SQL Query for desired SOAP API call</li>
<li>Finally, Import Data in Power BI using ODBC Connection, Supply Custom SQL Query during Import Process (Crafted in previous step).</li>
</ol>
<p>Now let&#8217;s look at each step in detail in the following sections</p>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE:</strong> If you are trying to get data from Workday <em><span style="text-decoration: underline;">report</span> </em>instead (your Workday admin created a report and gave you a link) then skip Soap UI part, use the URL with GET method and <em>Basic authentication</em> instead of SOAP WSS.</div></div>
<h3>Craft Workday SOAP request XML using SoapUI</h3>
<p>Now let&#8217;s look at how to use tool like SoapUI to craft SOAP API requests. It would be helpful if you can refer <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">this article to learn more</a> about using SoapUI tool (Check SoapUI section in that article).</p>
<h4><span id="Obtain_Workday_SOAP_WSDL_URL_API_Metadata_URL">Obtain Workday SOAP WSDL URL (API Metadata URL)</span></h4>
<p>First step to consume workday api using SSIS is download SOAP WSDL file. WSDL is an XML file which describes available API operations in Workday. It also describes the structure of XML request / response. Here is the <a href="https://community.workday.com/sites/default/files/file-hosting/productionapi/index.html" target="_blank" rel="noopener">list of available WSDL</a> for various Workday API Services. You can right click on WSDL icon and save to local disk or use Direct WSDL URL in next section for importing in <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/">SoapUI tool</a>.</p>
<p>You can find more information about Other <a href="https://community.workday.com/api" target="_blank" rel="noopener">Workday API here</a>.</p>
<h4><span id="Obtain_Workday_API_URL">Obtain Workday API URL</span></h4>
<p>Once you have WSDL file, next step is craft correct URL for API service you like to call. Service name can be obtained from <a href="https://community.workday.com/sites/default/files/file-hosting/productionapi/index.html" target="_blank" rel="noopener">here</a> (Check service column). Notice my-instance and my-tenantid placeholders (Its specific to your company).</p>
<p><strong>Syntax:  </strong><pre class="crayon-plain-tag">https://&lt;workday host name&gt;.workday.com/ccx/service/&lt;tenant name&gt;/&lt;service-name&gt;</pre> <strong><br />
Example: </strong><pre class="crayon-plain-tag">https://MY-INSTANCE.workday.com/ccx/service/MY-TenantID/Human_Resources</pre>
<h4><span id="Craft_SOAP_Body_XML_API_Request_using_SoapUI">Load WSDL in SoapUI</span></h4>
<p>Now it&#8217;s time to load WSDL and craft some SOAP Request and test. For detailed steps <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/">check this (watch Video to learn SoapUI tool)</a> .</p>
<ol>
<li>Open SoapUI tool</li>
<li>Click new File &gt; New Soap Project</li>
<li>Enter WSDL Path and Name of the project</li>
<li>You will see many different operations in the imported project. For example below screenshot shows Human_Resources service and <strong>Get Employee</strong> API call. You can fill out necessary parameters in your request / remove optional parameters from XML as needed.
<div id="attachment_2543" style="width: 745px" class="wp-caption alignnone"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png?ssl=1"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2543" class="wp-image-2543 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png" alt="Create SOAP Request Body from WSDL (Using SoapUI tool)" width="735" height="451" data-attachment-id="2543" data-permalink="https://zappysys.com/blog/get-data-from-workday-in-ssis-using-soap-or-rest-api/create-workday-soap-request-using-soapui-api-xml-body/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png?fit=735%2C451&amp;ssl=1" data-orig-size="735,451" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="create-workday-soap-request-using-soapui-api-xml-body" data-image-description="&lt;p&gt;Create SOAP Request Body from WSDL (Using SoapUI tool)&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png?fit=300%2C184&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png?fit=720%2C442&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png 735w, https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body-300x184.png 300w" sizes="(max-width: 735px) 100vw, 735px" /></a><p id="caption-attachment-2543" class="wp-caption-text">Create SOAP Request Body from WSDL (Using SoapUI tool)</p></div></li>
</ol>
<h4><span id="Craft_SOAP_Body_XML_API_Request_using_SoapUI">Configure Soap Request Body, URL and Credentials in SoapUI</span></h4>
<p>Now it&#8217;s time to configure SOAP Request service URL and Credentials. To generate correct Credentials Header in SOAP Request use tool like SoapUI. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn more how to generate WSS Security header.</p>
<ol>
<li>Go to the API method you like to call and double click on the default Request node. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/">Check this article to learn more</a>.</li>
<li>Change default request parameters (Add /Remove as per your need). You can click on Re-generate icon in the toolbar to reset the request and create optional parameters.</li>
<li>Enter the Service URL<br />
<strong>Example:</strong>  https://myinstance0001.workday.com/ccx/service/AB11111111/Human_Resources</li>
<li>In the properties window select WSS-Password Type as <strong>PasswordDigest</strong>, Enter workday <strong>username</strong> and <strong>password</strong></li>
<li>Once you done click Play button to execute the request. If things go well then you should see response on your right panel as below.
<div id="attachment_5006" style="width: 1059px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-call-workday-soap-api-test-request-response.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5006" class="wp-image-5006 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-call-workday-soap-api-test-request-response.png" alt="SoapUI - Call Workday SOAP API (Configure WSS Security, Service URL, Body, Test Request / Response)" width="1049" height="597" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-call-workday-soap-api-test-request-response.png 1049w, https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-call-workday-soap-api-test-request-response-300x171.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-call-workday-soap-api-test-request-response-768x437.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-call-workday-soap-api-test-request-response-1024x583.png 1024w" sizes="(max-width: 1049px) 100vw, 1049px" /></a><p id="caption-attachment-5006" class="wp-caption-text">SoapUI &#8211; Call Workday SOAP API (Configure WSS Security, Service URL, Body, Test Request / Response)</p></div></li>
</ol>
<h3><span id="Creating_SSIS_Connection_for_Workday_SOAP_API_call_using_WSS_Security">Creating ODBC DSN for Workday Connection</span></h3>
<p>Once you test correct parameters in your XML Request we can create ODBC DSN for Workday.</p>
<ol>
<li>Open start menu and search for &#8220;ODBC 64&#8221;. Launch ODBC Data sources for 64 bit
<div id="attachment_3992" style="width: 996px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3992" class="wp-image-3992 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen.png" alt="Open ODBC Data Sources from Start menu" width="986" height="622" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen.png 986w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen-300x189.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen-768x484.png 768w" sizes="(max-width: 986px) 100vw, 986px" /></a><p id="caption-attachment-3992" class="wp-caption-text">Open ODBC Data Sources from Startup menu</p></div></li>
<li>Click <strong>Add</strong> and select <strong>ZappySys XML Driver</strong>
<div id="attachment_3875" style="width: 603px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3875" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png 593w, https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver-300x232.png 300w" sizes="(max-width: 593px) 100vw, 593px" /></a><p id="caption-attachment-3875" class="wp-caption-text">ZappySys ODBC Driver for XML / SOAP API</p></div></li>
<li>Once driver UI is visible change default DSN name (e.g. change something to <strong> WorkdayDSN</strong>)</li>
<li>Enter API EndPoint URL (Get it from SoapUI) and Select connection type as HTTP.<br />
Example URL:  https://YOUR-INSTANCE.workday.com/ccx/service/YOUR-TENANT/Human_Resources</li>
<li>Configure HTTP connection as below.
<div id="attachment_5047" style="width: 692px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/configure-workday-soap-api-connection-odbc-xml-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5047" class="size-full wp-image-5047" src="https://zappysys.com/blog/wp-content/uploads/2018/10/configure-workday-soap-api-connection-odbc-xml-driver.png" alt="Configure Workday Connection in ODBC DSN - XML / SOAP Driver" width="682" height="488" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/configure-workday-soap-api-connection-odbc-xml-driver.png 682w, https://zappysys.com/blog/wp-content/uploads/2018/10/configure-workday-soap-api-connection-odbc-xml-driver-300x215.png 300w" sizes="(max-width: 682px) 100vw, 682px" /></a><p id="caption-attachment-5047" class="wp-caption-text">Configure Workday Connection in ODBC DSN &#8211; XML / SOAP Driver</p></div></li>
<li>Click OK to save connection.</li>
<li>Now Configure other settings as below.
<ol>
<li>Select Method as <strong>POST</strong></li>
<li>Select Content Type as <strong>text/xml</strong></li>
<li>Enter one required Header for SOAP API as below<br />
<pre class="crayon-plain-tag">SOAPAction :&nbsp; &quot;&quot;</pre>
</li>
<li>Enter Body (Get it from SoapUI ). Here is example body for Get_Employee request.<br />
<pre class="crayon-plain-tag">&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;bsvc:Employee_Get&gt;
         &lt;bsvc:Employee_Reference&gt;
            &lt;bsvc:Integration_ID_Reference&gt;
               &lt;bsvc:ID&gt;XXXX-1234-CHANGE-THIS-XXXXXXX&lt;/bsvc:ID&gt;
            &lt;/bsvc:Integration_ID_Reference&gt;
         &lt;/bsvc:Employee_Reference&gt;
      &lt;/bsvc:Employee_Get&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
NOTE: Change ID to your own record id.</li>
<li><strong>( Optional )</strong> If your API returns more than one record (e.g. if you call API like <strong>Get_Workers</strong>) then select Filter as per below screenshot (Click Yes if asked to treat selection as array). For example in below screenshot we called Get_Workers request which returns multiple records under <strong>wd:Worker node</strong>. Look for <strong>Array Icon</strong> in the Filter selection. Skip this step if no array extraction needed.</li>
</ol>
</li>
<li>After Configuration your screen may look like below.
<div id="attachment_5050" style="width: 886px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/configure-workday-soap-api-connection-request-body-url-filter.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5050" class="size-full wp-image-5050" src="https://zappysys.com/blog/wp-content/uploads/2018/10/configure-workday-soap-api-connection-request-body-url-filter.png" alt="Configure Workday SOAP Request - URL, Body, Filter" width="876" height="749" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/configure-workday-soap-api-connection-request-body-url-filter.png 876w, https://zappysys.com/blog/wp-content/uploads/2018/10/configure-workday-soap-api-connection-request-body-url-filter-300x257.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/configure-workday-soap-api-connection-request-body-url-filter-768x657.png 768w" sizes="(max-width: 876px) 100vw, 876px" /></a><p id="caption-attachment-5050" class="wp-caption-text">Configure Workday SOAP Request &#8211; URL, Body, Filter</p></div></li>
<li>Now go to Preview Tab and you will see default SQL query generated for you. Here is example query (Replace Body part as per your need)<br />
<pre class="crayon-plain-tag">SELECT * FROM $
/*Below WITH clause is optional, uncomment parameter(s) values you like to set 
 which are different than DSN properties.
*/
WITH(
	Src='https://xxxxxxxxxx.workday.com/ccx/service/yyyyyyyyy/Human_Resources'
	--,ElementsToTreatAsArray='wd:Worker'
	--,DataConnectionType='HTTP'
	--,SoapWssPasswordType='PasswordDigest'
	--,UserName='testuser001'
	--,CredentialType='SoapWss'
	--,Filter='$.env:Envelope.env:Body.wd:Get_Workers_Response.wd:Response_Data.wd:Worker[*]'
	--,RequestContentTypeCode='TextXmlUtf8'
	--,RequestMethod='POST'
	--,Header='SOAPAction: ""'	
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
        .......... .......... .......... 
        .......... FROM SOAPUI .........  
        .......... .......... ..........        
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
</li>
<li>Click Preview button to see data. Copy your SQL Query for later step.
<div id="attachment_5051" style="width: 818px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/query-workday-data-using-odbc-driver-xml-soap-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5051" class="wp-image-5051 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/query-workday-data-using-odbc-driver-xml-soap-api.png" alt="Preview Workday Data (Test SQL query for ODBC XML / SOAP Driver)" width="808" height="749" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/query-workday-data-using-odbc-driver-xml-soap-api.png 808w, https://zappysys.com/blog/wp-content/uploads/2018/10/query-workday-data-using-odbc-driver-xml-soap-api-300x278.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/query-workday-data-using-odbc-driver-xml-soap-api-768x712.png 768w" sizes="(max-width: 808px) 100vw, 808px" /></a><p id="caption-attachment-5051" class="wp-caption-text">Preview Workday Data (Test SQL query for ODBC XML / SOAP Driver)</p></div></li>
<li>Click OK to save DSN</li>
</ol>
<h3>Import Workday data in Power BI</h3>
<p>Now let&#8217;s move to the final step. We will use SQL query and DSN created in previous step for data load in Power BI.</p>
<ol>
<li>Open Power BI Desktop</li>
<li>Click on <strong>Get Data</strong> &gt; <strong>More Data&#8230;</strong> &gt; <strong>Other</strong> &gt; <strong>ODBC</strong>
<div id="attachment_3945" style="width: 545px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-data-xml-soap-web-service-call-odbc-xml-api-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3945" class="size-full wp-image-3945" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-data-xml-soap-web-service-call-odbc-xml-api-driver.png" alt="Import SOAP API in Power BI (Using ZappySys XML ODBC Driver)" width="535" height="590" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-data-xml-soap-web-service-call-odbc-xml-api-driver.png 535w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-data-xml-soap-web-service-call-odbc-xml-api-driver-272x300.png 272w" sizes="(max-width: 535px) 100vw, 535px" /></a><p id="caption-attachment-3945" class="wp-caption-text">Import SOAP API in Power BI (Using ZappySys XML ODBC Driver)</p></div></li>
<li>Select your <strong>ODBC DSN Source</strong> from the dropdown (Assuming you have created a ODBC Data Source using ZappySys XML Driver – See the previous Section)</li>
<li>Expand <strong>Advanced Options</strong> to enter custom Query.</li>
<li>Enter your SOAP API call SQL query here. For example purpose, you can use below query to get all JOB categories.<br />
<pre class="crayon-plain-tag">SELECT * FROM $
WITH(
	 Src='https://xxxxxxxxxx.workday.com/ccx/service/yyyyyyyyyy/Human_Resources'	
	--,DataConnectionType='HTTP'
	--,SoapWssPasswordType='PasswordText'
	--,UserName='testuser001'
	--,Password='###########'
	--,CredentialType='SoapWss'
	,RequestMethod='POST'
	,RequestContentTypeCode='TextXmlUtf8'
	,Filter='$.soapenv:Envelope.soapenv:Body.bsvc:Get_Job_Categories_Response.bsvc:Response_Data.bsvc:Job_Category[*]'
	,ElementsToTreatAsArray='bsvc:Job_Category'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc"&gt;
   &lt;soapenv:Body&gt;
      &lt;bsvc:Get_Job_Categories_Request/&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
&nbsp;</p>
<div id="attachment_3946" style="width: 952px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3946" class="wp-image-3946 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql.png" alt="Import Workday SOAP Web Service Data in Power BI (ZappySys XML Driver)" width="942" height="713" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql.png 942w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql-300x227.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql-768x581.png 768w" sizes="(max-width: 942px) 100vw, 942px" /></a><p id="caption-attachment-3946" class="wp-caption-text">Import Workday SOAP Web Service Data in Power BI (ZappySys XML Driver)</p></div></li>
<li>Once you see data preview click OK to import.</li>
<li>After data import is done you can edit your dataset (e.g. remove unwanted columns)</li>
<li>You can also edit Source query after data is imported (See below)
<div id="attachment_3947" style="width: 829px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3947" class="size-full wp-image-3947" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import.png" alt="Edit Power BI Data Source SQL after SOAP Web Service Import" width="819" height="502" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import.png 819w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import-300x184.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import-768x471.png 768w" sizes="(max-width: 819px) 100vw, 819px" /></a><p id="caption-attachment-3947" class="wp-caption-text">Edit Power BI Data Source SQL after REST / SOAP Web Service Import</p></div></li>
<li>That&#8217;s it. You can now create your dashboards using data we just imported. See below example.
<div id="attachment_4633" style="width: 823px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4633" class="wp-image-4633 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard.png" alt="Import Workday data in Power BI dashboard" width="813" height="481" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard.png 813w, https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard-300x177.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard-768x454.png 768w" sizes="(max-width: 813px) 100vw, 813px" /></a><p id="caption-attachment-4633" class="wp-caption-text">Import Workday data in Power BI dashboard</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>Workday API Pagination &#8211; Retrieve more than 100 rows</h2>
<p>By default Workday API will return only 100 records unless you specify Page / Count in <a href="https://community.workday.com/sites/default/files/file-hosting/productionapi/Human_Resources/v17/Get_Workers.html#Response_FilterType" target="_blank" rel="noopener">Response_Filter</a> . Regardless it will only send you 999 maximum rows. To fetch more records after first page you have to setup pagination in XML Driver. Below screenshot</p>
<ol>
<li>Select Paging Mode= POST Data Mode</li>
<li>Enter Page Number Indicator (e.g. <strong>&lt;%page%&gt;</strong> )</li>
<li>Click browse button for <strong>Max Pages Expression </strong>  (select node which indicates how many pages in response. e.g. <strong>Total_Pages</strong>)
<div id="attachment_5054" style="width: 942px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5054" class="size-full wp-image-5054" src="https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-1.png" alt="Workday SOAP API Pagination Settings in ZappySys XML / SOAP Driver" width="932" height="553" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-1.png 932w, https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-1-300x178.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-1-768x456.png 768w" sizes="(max-width: 932px) 100vw, 932px" /></a><p id="caption-attachment-5054" class="wp-caption-text">Workday SOAP API Pagination Settings in ZappySys XML / SOAP Driver</p></div></li>
<li>Once this is done go to Settings Tab. Edit your Body and make sure you supply Response_Filter. Pass Response_Filter parameter as below. See how we used <strong>&lt;%page%&gt;</strong> placeholder. You can use tool like <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">fiddler</a> to see multiple response at runtime. Run package and check fiddler. In the below example we are fetching maximum 300 rows per response. It will keep reading until all pages are done. For example if you have 1000 rows to read then it will take 4 response behind the scene.<br />
<pre class="crayon-plain-tag">&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc"&gt;
   &lt;soapenv:Body&gt;
      &lt;bsvc:Get_Job_Categories_Request bsvc:version=""&gt;
        &lt;bsvc:Response_Filter&gt;
            &lt;bsvc:Page&gt;&lt;%page%&gt;&lt;/bsvc:Page&gt;
            &lt;bsvc:Count&gt;300&lt;/bsvc:Count&gt;
         &lt;/bsvc:Response_Filter&gt;
      &lt;/bsvc:Get_Job_Categories_Request&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
<div id="attachment_5055" style="width: 804px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-2-body-response-filter.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5055" class="size-full wp-image-5055" src="https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-2-body-response-filter.png" alt="Workday API Pagination - Supply Response_Filter (Page Size and Current Page Number)" width="794" height="377" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-2-body-response-filter.png 794w, https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-2-body-response-filter-300x142.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-workday-api-pagination-settings-2-body-response-filter-768x365.png 768w" sizes="(max-width: 794px) 100vw, 794px" /></a><p id="caption-attachment-5055" class="wp-caption-text">Workday API Pagination &#8211; Supply Response_Filter (Page Size and Current Page Number)</p></div></li>
</ol>
<p>That&#8217;s it. Now if you run your query it will fetch all pages and you can now read more than 1000 rows. Make sure you configure Count at reasonable size (Rows per Page) in above screenshot we use 5 just to demo small sample. We suggest you to to set around 300.</p>
<p>&nbsp;</p>
<h2>How to pass parameters to SQL query in Power BI</h2>
<div class="content_block" id="custom_post_widget-3954"><p>In the real world, many values of your REST / SOAP API call may be coming from Parameters. If that&#8217;s the case for you can try to edit script manually as below. In below example its calling SQL Query with POST method and passing some parameters. Notice below where paraAPIKey is Power BI Parameter (string type). You can use parameters anywhere in your script just like the normal variable.</p>
<p />
<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-odbc-sql-query-pass-parameters-dynamically.png"><img loading="lazy" decoding="async" class="wp-image-3121 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-odbc-sql-query-pass-parameters-dynamically.png" alt="Import REST API in Power BI - Using parameters in SQL Query (Edit code - Advanced Mode)" width="629" height="467" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-odbc-sql-query-pass-parameters-dynamically.png 629w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-odbc-sql-query-pass-parameters-dynamically-300x223.png 300w" sizes="(max-width: 629px) 100vw, 629px" /></a></p>
<p />
&nbsp;</p>
<pre class="lang:default highlight:0 decode:true">let
    vKey=paraAPIKey,
    Source = Odbc.Query(
"dsn=ZS - OData Customers", 
"SELECT * FROM $ WITH (SRC='http://httpbin.org/post'," 
&amp; "METHOD='POST'," 
&amp; "HEADER='Content-Type:application/json'," 
&amp; "BODY=@'{""CallerId"":1111, ""ApiKey"":""" &amp; vKey &amp; """}')")
in
    Source</pre>
<p>&nbsp;</p>
</div>
<h2>How to debug Web Requests using Fiddler</h2>
<p>There will be a time you like to see RAW HTTP Requests generated by driver for NetSuite SOAP API.  If you like to do that <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">check this article</a>.</p>
<h2>Conclusion</h2>
<p>Consuming data from Workday API or any XML / SOAP based API in your Reporting / ETL apps can be tricky. But we have seen how to solve this challenging task using ZappySys XML Driver in few clicks. <a href="https://zappysys.com/onlinehelp/odbc-powerpack/">Download ODBC PowerPack</a> and explore many other API integration scenarios not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/connect-workday-power-bi-import-soap-data/">Connect Workday in Power BI &#8211; Import SOAP Data</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read data from NetSuite in SSIS (SimpleTalk SOAP API)</title>
		<link>https://zappysys.com/blog/read-data-netsuite-ssis-simpletalk-soap-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 06 Sep 2018 15:59:12 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS XML Source (File / SOAP)]]></category>
		<category><![CDATA[NetSuite]]></category>
		<category><![CDATA[soap]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4755</guid>

					<description><![CDATA[<p>Introduction In this post we will learn how to read data from NetSuite in SSIS. We will use ZappySys XML Source for SOAP API access. &#160; &#160; What is NetSuite CRM? NetSuite is a CRM / ERP product. It gives you scalable cloud CRM / ERP solution targeted at high-growing, mid-sized businesses and large enterprises. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-data-netsuite-ssis-simpletalk-soap-api/">How to read data from NetSuite in SSIS (SimpleTalk SOAP API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/09/netsuite-logo.png"><img loading="lazy" decoding="async" class=" wp-image-5110 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/09/netsuite-logo.png" alt="" width="136" height="96" srcset="https://zappysys.com/blog/wp-content/uploads/2018/09/netsuite-logo.png 665w, https://zappysys.com/blog/wp-content/uploads/2018/09/netsuite-logo-300x212.png 300w" sizes="(max-width: 136px) 100vw, 136px" /></a>In this post we will learn how to read data from NetSuite in SSIS. We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">ZappySys XML Source</a> for SOAP API access.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2><span id="What_is_NetSuite_CRM">What is NetSuite CRM?</span></h2>
<p>NetSuite is a CRM / ERP product. It gives you scalable cloud CRM / ERP solution targeted at high-growing, mid-sized businesses and large enterprises. It automates front- and back-office processes including: financial management, revenue management, fixed assets, order management, billing, and inventory management.</p>
<h2><span id="Getting_Started">Preparing for NetSuite WebService Call in SSIS</span></h2>
<p>For NetSuite API call we have to make sure certain settings and obtain Application ID and AccountID. So let&#8217;s get started.</p>
<div class="content_block" id="custom_post_widget-5058"><h3>How to enable NetSuite Web Service Feature</h3>
Before you call any NetSuite SOAP API (i.e. <strong>SuiteTask Web Service</strong>), First thing to get started with NetSuite SOAP API (i.e. ) is to enable Web Service Feature. Once you enable Web Service, you can programmatically access NetSuite data in your App (e.g. Power BI, Tableau, Informatica).

<a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3419926.html" target="_blank" rel="noopener">Click this link</a> to see steps to enable Web Service Feature
<div id="attachment_4616" class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?ssl=1"><img loading="lazy" decoding="async" class="wp-image-4616 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?resize=479%2C568&amp;ssl=1" sizes="(max-width: 479px) 100vw, 479px" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?w=479&amp;ssl=1 479w, https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?resize=253%2C300&amp;ssl=1 253w" alt="Enable NetSuite Web Service Feature (SuiteTalk API)" width="471" height="559" data-attachment-id="4616" data-permalink="https://zappysys.com/blog/read-netsuite-data-power-bi/netsuite-enable-web-service-features-setup-option/#main" data-orig-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?fit=479%2C568&amp;ssl=1" data-orig-size="479,568" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="netsuite-enable-web-service-features-setup-option" data-image-description="&lt;p&gt;Enable NetSuite Web Service Feature&lt;/p&gt; " data-medium-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?fit=253%2C300&amp;ssl=1" data-large-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?fit=479%2C568&amp;ssl=1" /></a>
<p class="wp-caption-text">Enable NetSuite Web Service Feature (SuiteTalk API)</p>

</div>
<h3><span id="Obtain_NetSuite_Account_ID">Obtain NetSuite Account ID</span></h3>
NetSuite Account ID is needed by Login API call. So perform following steps if you dont know account id.
<ol>
 	<li>Login to your NetSuite Portal</li>
 	<li>Click the <strong>Setup Tab</strong></li>
 	<li>In the drop-down click <strong>Integration</strong> &gt;  <strong>Web services preferences</strong></li>
 	<li>On that page you will find your Account ID (<strong>example account ID = TSTDRV1234567</strong> )</li>
</ol>
<div id="attachment_4620" class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?ssl=1"><img loading="lazy" decoding="async" class="size-full wp-image-4620" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?resize=262%2C360&amp;ssl=1" sizes="(max-width: 262px) 100vw, 262px" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?w=262&amp;ssl=1 262w, https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?resize=218%2C300&amp;ssl=1 218w" alt="Obtain NetSuite Account ID (Needed for Web Service Login)" width="254" height="349" data-attachment-id="4620" data-permalink="https://zappysys.com/blog/read-netsuite-data-power-bi/obtain-netsuite-accountid/#main" data-orig-file="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?fit=262%2C360&amp;ssl=1" data-orig-size="262,360" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="obtain-netsuite-accountid" data-image-description="&lt;p&gt;Obtain NetSuite Account ID (Needed for Web Service Login)&lt;/p&gt; " data-medium-file="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?fit=218%2C300&amp;ssl=1" data-large-file="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?fit=262%2C360&amp;ssl=1" /></a>
<p class="wp-caption-text">Obtain NetSuite Account ID (Needed for Web Service Login)</p>

</div>
<h3><span id="Obtain_NetSuite_Application_ID">Obtain NetSuite Application ID</span></h3>
Once you have account ID now we need to get Application ID. For that follow these steps.
<ol>
 	<li>Login to your NetSuite Portal</li>
 	<li>Click the <strong>Setup Tab</strong></li>
 	<li>In the drop-down click <strong>Integration</strong> &gt;  <strong>Manage Integrations</strong></li>
 	<li>On that page you will find your existing Applications along with Account ID / Status (<strong>example Application ID = AE2EACFD-1234-1222-1111-12345544555</strong> )</li>
 	<li>If you don’t have any application created yet then just click on New.</li>
</ol>
<div id="attachment_4619" class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?ssl=1"><img loading="lazy" decoding="async" class="size-full wp-image-4619" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?resize=660%2C293&amp;ssl=1" sizes="(max-width: 660px) 100vw, 660px" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?w=660&amp;ssl=1 660w, https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?resize=300%2C133&amp;ssl=1 300w" alt="Create new App / Get NetSuite Application ID" width="652" height="289" data-attachment-id="4619" data-permalink="https://zappysys.com/blog/read-netsuite-data-power-bi/netsuite-obtain-application-for-soap-api-call/#main" data-orig-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?fit=660%2C293&amp;ssl=1" data-orig-size="660,293" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="netsuite-obtain-application-for-soap-api-call" data-image-description="&lt;p&gt;Create new App / Get NetSuite Application ID&lt;/p&gt; " data-medium-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?fit=300%2C133&amp;ssl=1" data-large-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?fit=660%2C293&amp;ssl=1" /></a>
<p class="wp-caption-text">Create new App / Get NetSuite Application ID</p>

</div>
<h3></h3></div>
<div class="content_block" id="custom_post_widget-5098"><h2>Understanding how NetSuite SOAP API Call works</h2>
In this section we will briefly understand how NetSuite SOAP API call works. When you use ZappySys Driver / Component it will take care many details for you but still you have to configure correct XML Body.

There are two steps involved before you can call any SOAP API in NetSuite.
<ol>
 	<li>Call <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3512617.html" target="_blank" rel="noopener">Login method</a> and extract JSESSIONID from response Cookie (This token expires after some time)</li>
 	<li>Call any other API (Pass obtained JSESSIONID token in Cookie header)</li>
</ol>
<h3>NetSuite Login Call</h3>
<strong>Request</strong>
<pre class="lang:default highlight:0 decode:true">POST https://webservices.netsuite.com/services/NetSuitePort_2017_1
Content-Type: text/xml;charset=UTF-8
SOAPAction: "login"
Accept-Encoding: gzip, deflate

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;xxxxxxxxxxxxxx&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
    &lt;login xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;passport&gt;
        &lt;email xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;xxxxxxxxxxxxx&lt;/email&gt;
        &lt;password xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;xxxxxxxxxxxx&lt;/password&gt;
        &lt;account xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;TSTxxxxxxxxxxxxxxx&lt;/account&gt;
        &lt;role internalId="3" xmlns="urn:core_2017_1.platform.webservices.netsuite.com" /&gt;
      &lt;/passport&gt;
    &lt;/login&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
<strong>Response</strong>

Notice JSESSIONID=6xI6xxxxxxxxx in the login call response below. This Session ID can be used to call next call. ZappySys HTTP Connection Manager configured with <a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic Token</a> option can extract Cookie and reuse it until its expired (1 hour by default).
<pre class="lang:default highlight:0 decode:true">HTTP/1.1 200 OK
Date: Wed, 03 Oct 2018 16:50:41 GMT
Content-Length: 1676
Content-Type: text/xml; charset=utf-8
X-N-OperationId: 777274f6-49c6-4883-bcd1-1d70df90d78e
Strict-Transport-Security: max-age=31536000
NS_RTIMER_COMPOSITE: 13633xxxxxxxxx:70617xxxxxxxxxxxxx36F6D:80
Set-Cookie: JSESSIONID=6xI61rdFt26pxxxxxxxxxxxxxxxqvJIMlu!-17981123445; path=/; secure; HttpOnly
Set-Cookie: NS_VER=2018.1.0; domain=webservices.netsuite.com; path=/
Set-Cookie: NS_ROUTING_VERSION=LAGGING; path=/
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent
Keep-Alive: timeout=10, max=990
Connection: Keep-Alive

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;soapenv:Header&gt;
    &lt;platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformMsgs:nsId&gt;WEBSERVICES_xxxxxxxxxxxxxxxxx_9fc719&lt;/platformMsgs:nsId&gt;
    &lt;/platformMsgs:documentInfo&gt;
  &lt;/soapenv:Header&gt;
  &lt;soapenv:Body&gt;
    &lt;loginResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;sessionResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
        &lt;ns1:status isSuccess="true" xmlns:ns1="urn:core_2017_1.platform.webservices.netsuite.com"/&gt;
        &lt;ns2:wsRoleList xmlns:ns2="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
          &lt;ns2:wsRole&gt;
            &lt;ns2:role internalId="3"&gt;
              &lt;ns2:name&gt;Administrator&lt;/ns2:name&gt;
            &lt;/ns2:role&gt;
            &lt;ns2:isDefault&gt;false&lt;/ns2:isDefault&gt;
            &lt;ns2:isInactive&gt;false&lt;/ns2:isInactive&gt;
          &lt;/ns2:wsRole&gt;
          &lt;ns2:wsRole&gt;
            &lt;ns2:role internalId="15"&gt;
              &lt;ns2:name&gt;Employee Center&lt;/ns2:name&gt;
            &lt;/ns2:role&gt;
            &lt;ns2:isDefault&gt;false&lt;/ns2:isDefault&gt;
            &lt;ns2:isInactive&gt;false&lt;/ns2:isInactive&gt;
          &lt;/ns2:wsRole&gt;
      &lt;/sessionResponse&gt;
    &lt;/loginResponse&gt;
  &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
&nbsp;
<h3>NetSuite API Call ( getAll method )</h3>
Now once you have JSESSIONID extracted you can pass it to call next API call as below. For example here is how to call <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3489077.html" target="_blank" rel="noopener"><strong>getAll</strong></a> method to obtain currency list and exchange rates. If you are not sure how to craft correct Request XML then use tool like <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">SoapUI</a>.

You can use NetSuite WSDL file <a href="http://www.netsuite.com/portal/developers/resources/suitetalk-documentation.shtml" target="_blank" rel="noopener">from here</a> and import it in <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">SoapUI</a>.

<a href="https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-create-netsuite-soap-api-request-xml.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5103" src="https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-create-netsuite-soap-api-request-xml.png" alt="" width="523" height="386" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-create-netsuite-soap-api-request-xml.png 523w, https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-create-netsuite-soap-api-request-xml-300x221.png 300w" sizes="(max-width: 523px) 100vw, 523px" /></a>

&nbsp;

<strong>Request</strong>

See how Cookie is passed for authentication purpose. Again you can pass this manually or use HTTP connection with <a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic Token</a> to pass it automatically along with each API call.
<pre class="lang:default highlight:0 decode:true">POST https://webservices.netsuite.com/services/NetSuitePort_2017_1
Content-Type: text/xml;charset=UTF-8
SOAPAction: "getAll"
Cookie: JSESSIONID=6xI61rxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxMlu!-1798141234
Accept-Encoding: gzip, deflate

&lt;soapenv:Envelope 
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:urn="urn:messages_2018_1.platform.webservices.netsuite.com" 
   xmlns:urn1="urn:core_2018_1.platform.webservices.netsuite.com"&gt;
   &lt;soapenv:Body&gt;
      &lt;urn:getAll&gt;
         &lt;record recordType="currency"/&gt; 
      &lt;/urn:getAll&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
<strong>Response</strong>
<pre class="lang:default highlight:0 decode:true">HTTP/1.1 200 OK
Date: Wed, 03 Oct 2018 16:50:42 GMT
Content-Length: 9648
Content-Type: text/xml; charset=utf-8
X-N-OperationId: 1b2989e4-b930-4a72-b471-00a8e131dfd4
NS_RTIMER_COMPOSITE: 21403xxxxxx:706172746E65xxxxxxxxxxxx6F6D:80
Strict-Transport-Security: max-age=31536000
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;soapenv:Header&gt;
    &lt;platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformMsgs:nsId&gt;WEBSERVICES_TSTDRV1439151_100320189871507121000128715_6ae8e8&lt;/platformMsgs:nsId&gt;
    &lt;/platformMsgs:documentInfo&gt;
  &lt;/soapenv:Header&gt;
  &lt;soapenv:Body&gt;
    &lt;getAllResponse xmlns="urn:messages_2018_1.platform.webservices.netsuite.com"&gt;
      &lt;platformCore:getAllResult xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
        &lt;platformCore:status isSuccess="true" /&gt;
        &lt;platformCore:totalRecords&gt;11&lt;/platformCore:totalRecords&gt;
        &lt;platformCore:recordList&gt;
          &lt;platformCore:record internalId="1" xsi:type="listAcct:Currency" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:name&gt;USD&lt;/listAcct:name&gt;
            &lt;listAcct:symbol&gt;USD&lt;/listAcct:symbol&gt;
            &lt;listAcct:isBaseCurrency&gt;true&lt;/listAcct:isBaseCurrency&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:overrideCurrencyFormat&gt;false&lt;/listAcct:overrideCurrencyFormat&gt;
            &lt;listAcct:displaySymbol&gt;$&lt;/listAcct:displaySymbol&gt;
            &lt;listAcct:symbolPlacement&gt;_beforeNumber&lt;/listAcct:symbolPlacement&gt;
            &lt;listAcct:locale&gt;_unitedStatesEnglish&lt;/listAcct:locale&gt;
            &lt;listAcct:formatSample&gt;$1,234.56&lt;/listAcct:formatSample&gt;
            &lt;listAcct:exchangeRate&gt;1.0&lt;/listAcct:exchangeRate&gt;
            &lt;listAcct:fxRateUpdateTimezone&gt;_americaNewYork&lt;/listAcct:fxRateUpdateTimezone&gt;
            &lt;listAcct:currencyPrecision&gt;_two&lt;/listAcct:currencyPrecision&gt;
          &lt;/platformCore:record&gt;
          &lt;platformCore:record internalId="2" xsi:type="listAcct:Currency" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:name&gt;GBP&lt;/listAcct:name&gt;
            &lt;listAcct:symbol&gt;GBP&lt;/listAcct:symbol&gt;
            &lt;listAcct:isBaseCurrency&gt;true&lt;/listAcct:isBaseCurrency&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:overrideCurrencyFormat&gt;false&lt;/listAcct:overrideCurrencyFormat&gt;
            &lt;listAcct:displaySymbol&gt;£&lt;/listAcct:displaySymbol&gt;
            &lt;listAcct:symbolPlacement&gt;_beforeNumber&lt;/listAcct:symbolPlacement&gt;
            &lt;listAcct:locale&gt;_unitedKingdomEnglish&lt;/listAcct:locale&gt;
            &lt;listAcct:formatSample&gt;£1,234.56&lt;/listAcct:formatSample&gt;
            &lt;listAcct:exchangeRate&gt;1.33165497&lt;/listAcct:exchangeRate&gt;
            &lt;listAcct:fxRateUpdateTimezone&gt;_americaNewYork&lt;/listAcct:fxRateUpdateTimezone&gt;
            &lt;listAcct:currencyPrecision&gt;_two&lt;/listAcct:currencyPrecision&gt;
          &lt;/platformCore:record&gt;
          &lt;platformCore:record internalId="3" xsi:type="listAcct:Currency" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:name&gt;CAD&lt;/listAcct:name&gt;
            &lt;listAcct:symbol&gt;CAD&lt;/listAcct:symbol&gt;
            &lt;listAcct:isBaseCurrency&gt;true&lt;/listAcct:isBaseCurrency&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:overrideCurrencyFormat&gt;false&lt;/listAcct:overrideCurrencyFormat&gt;
            &lt;listAcct:displaySymbol&gt;$&lt;/listAcct:displaySymbol&gt;
            &lt;listAcct:symbolPlacement&gt;_beforeNumber&lt;/listAcct:symbolPlacement&gt;
            &lt;listAcct:locale&gt;_canadaEnglish&lt;/listAcct:locale&gt;
            &lt;listAcct:formatSample&gt;$1,234.56&lt;/listAcct:formatSample&gt;
            &lt;listAcct:exchangeRate&gt;0.76457273&lt;/listAcct:exchangeRate&gt;
            &lt;listAcct:fxRateUpdateTimezone&gt;_americaNewYork&lt;/listAcct:fxRateUpdateTimezone&gt;
            &lt;listAcct:currencyPrecision&gt;_two&lt;/listAcct:currencyPrecision&gt;
          &lt;/platformCore:record&gt;
        &lt;/platformCore:recordList&gt;
      &lt;/platformCore:getAllResult&gt;
    &lt;/getAllResponse&gt;
  &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
<h3>NetSuite Search API (Pagination Example)</h3>
Now let's look at more complex API calls where Pagination is needed. For example when you call search API to pull data from specific table (e.g. Account) you need to loop through multiple responses until all records are consumed.

<strong>Request (Page-1)</strong>
<pre class="lang:default highlight:0 decode:true">POST https://webservices.netsuite.com/services/NetSuitePort_2017_1
Content-Type: text/xml; charset=utf-8
SOAPAction: "search"
Cookie: JSESSIONID=BKQ7xxxxxxxxxxxx4Ug!-995xxxxxx
Accept-Encoding: gzip, deflate

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;xxxxxxxxxxxxxxx&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
    &lt;searchPreferences xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;pageSize&gt;50&lt;/pageSize&gt;
    &lt;/searchPreferences&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
    &lt;search xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchRecord xmlns:q1="urn:accounting_2017_1.lists.webservices.netsuite.com" xsi:type="q1:AccountSearch"&gt;
        &lt;q1:basic&gt;
          &lt;description operator="doesNotContain" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;x&lt;/searchValue&gt;
          &lt;/description&gt;
          &lt;name operator="contains" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;a&lt;/searchValue&gt;
          &lt;/name&gt;
        &lt;/q1:basic&gt;
      &lt;/searchRecord&gt;
    &lt;/search&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
&nbsp;

<strong>Response (Page-1)</strong>

In below response notice 2 things. SearchId is like a cursor id which you have to pass for each page you request after first page. And you can stop looping after 4th page based on totalPages count.

<strong>platformCore:searchId</strong> = WEBSERVICES_ABCD_12345-xxxxxxxxx
<strong>platformCore:totalPages</strong> = 4
<pre class="lang:default highlight:0 decode:true">HTTP/1.1 200 OK
Date: Wed, 03 Oct 2018 18:40:33 GMT
Content-Length: 49266
Content-Type: text/xml; charset=utf-8
X-N-OperationId: c1e79336-63b7-4eb7-989e-5c3d24c56891
NS_RTIMER_COMPOSITE: 118xxxxxxxx:70617xxxxxxxxxxxxxxxxxxxxxD:80
Strict-Transport-Security: max-age=31536000
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;soapenv:Header&gt;
    &lt;platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformMsgs:nsId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/platformMsgs:nsId&gt;
    &lt;/platformMsgs:documentInfo&gt;
  &lt;/soapenv:Header&gt;
  &lt;soapenv:Body&gt;
    &lt;searchResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformCore:searchResult xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
        &lt;platformCore:status isSuccess="true" /&gt;
        &lt;platformCore:totalRecords&gt;193&lt;/platformCore:totalRecords&gt;
        &lt;platformCore:pageSize&gt;50&lt;/platformCore:pageSize&gt;
        &lt;platformCore:totalPages&gt;4&lt;/platformCore:totalPages&gt;
        &lt;platformCore:pageIndex&gt;1&lt;/platformCore:pageIndex&gt;
        &lt;platformCore:searchId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/platformCore:searchId&gt;
        &lt;platformCore:recordList&gt;
          &lt;platformCore:record internalId="1" xsi:type="listAcct:Account" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:acctType&gt;_bank&lt;/listAcct:acctType&gt;
            &lt;listAcct:acctNumber&gt;1111&lt;/listAcct:acctNumber&gt;
            &lt;listAcct:acctName&gt;Checking&lt;/listAcct:acctName&gt;
            &lt;listAcct:includeChildren&gt;false&lt;/listAcct:includeChildren&gt;
            &lt;listAcct:currency internalId="1"&gt;
              &lt;platformCore:name&gt;USD&lt;/platformCore:name&gt;
            &lt;/listAcct:currency&gt;
            &lt;listAcct:generalRate&gt;_current&lt;/listAcct:generalRate&gt;
            &lt;listAcct:parent internalId="246"&gt;
              &lt;platformCore:name&gt;xxxxxxxxxxxxxxxxxxx&lt;/platformCore:name&gt;
            &lt;/listAcct:parent&gt;
            &lt;listAcct:cashFlowRate&gt;_average&lt;/listAcct:cashFlowRate&gt;
            &lt;listAcct:description&gt;Checking&lt;/listAcct:description&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:inventory&gt;false&lt;/listAcct:inventory&gt;
            &lt;listAcct:eliminate&gt;false&lt;/listAcct:eliminate&gt;
            &lt;listAcct:revalue&gt;true&lt;/listAcct:revalue&gt;
          &lt;/platformCore:record&gt;
          &lt;platformCore:record internalId="2" xsi:type="listAcct:Account" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:acctType&gt;_bank&lt;/listAcct:acctType&gt;
            &lt;listAcct:acctNumber&gt;22222&lt;/listAcct:acctNumber&gt;
            &lt;listAcct:acctName&gt;Savings&lt;/listAcct:acctName&gt;
            &lt;listAcct:includeChildren&gt;false&lt;/listAcct:includeChildren&gt;
            &lt;listAcct:currency internalId="1"&gt;
              &lt;platformCore:name&gt;USD&lt;/platformCore:name&gt;
            &lt;/listAcct:currency&gt;
            &lt;listAcct:generalRate&gt;_current&lt;/listAcct:generalRate&gt;
            &lt;listAcct:parent internalId="246"&gt;
              &lt;platformCore:name&gt;yyyyyyyyy&lt;/platformCore:name&gt;
            &lt;/listAcct:parent&gt;
            &lt;listAcct:cashFlowRate&gt;_average&lt;/listAcct:cashFlowRate&gt;
            &lt;listAcct:description&gt;Savings&lt;/listAcct:description&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:inventory&gt;false&lt;/listAcct:inventory&gt;
            &lt;listAcct:eliminate&gt;false&lt;/listAcct:eliminate&gt;
            &lt;listAcct:revalue&gt;true&lt;/listAcct:revalue&gt;
          &lt;/platformCore:record&gt;
          .........
          .........
          .........
          .........		  
        &lt;/platformCore:recordList&gt;
      &lt;/platformCore:searchResult&gt;
    &lt;/searchResponse&gt;
  &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
&nbsp;

<strong>Request (Page-2 and onwards)</strong>

Here is the second page request. Notice few things here. In heraders we are now sending <strong>SOAPAction: "searchMoreWithId"</strong> rather than <strong>"search"</strong>.  Also our SOAP Body is also different compared to first page request. Now we only sending <strong>pageIndex</strong> we want to fetch and <strong>searchId</strong>. We have also change <strong>&lt;search&gt;</strong> tag with <strong>&lt;searchMoreWithId&gt;</strong> under Body.
<pre class="lang:default decode:true">POST https://webservices.netsuite.com/services/NetSuitePort_2017_1
Content-Type: text/xml; charset=utf-8
SOAPAction: "searchMoreWithId"
Cookie: JSESSIONID=BKQ7xxxxxxxxxxxx4Ug!-995xxxxxx
Accept-Encoding: gzip, deflate

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;xxxxxxxxxxxxxxxxxx&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
    &lt;searchPreferences xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;pageSize&gt;50&lt;/pageSize&gt;
    &lt;/searchPreferences&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
    &lt;searchMoreWithId xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/searchId&gt;
      &lt;pageIndex&gt;2&lt;/pageIndex&gt;
    &lt;/searchMoreWithId&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
<strong>Response (Page-2 and onwards)</strong>
<pre class="lang:default decode:true  ">HTTP/1.1 200 OK
Date: Wed, 03 Oct 2018 18:40:33 GMT
Content-Length: 49266
Content-Type: text/xml; charset=utf-8
X-N-OperationId: c1e79336-63b7-4eb7-989e-5c3d24c56891
NS_RTIMER_COMPOSITE: 118xxxxxxxx:70617xxxxxxxxxxxxxxxxxxxxxD:80
Strict-Transport-Security: max-age=31536000
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;soapenv:Header&gt;
    &lt;platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformMsgs:nsId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/platformMsgs:nsId&gt;
    &lt;/platformMsgs:documentInfo&gt;
  &lt;/soapenv:Header&gt;
  &lt;soapenv:Body&gt;
    &lt;searchMoreWithIdResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformCore:searchResult xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
        &lt;platformCore:status isSuccess="true" /&gt;
        &lt;platformCore:totalRecords&gt;193&lt;/platformCore:totalRecords&gt;
        &lt;platformCore:pageSize&gt;50&lt;/platformCore:pageSize&gt;
        &lt;platformCore:totalPages&gt;4&lt;/platformCore:totalPages&gt;
        &lt;platformCore:pageIndex&gt;2&lt;/platformCore:pageIndex&gt;
        &lt;platformCore:searchId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/platformCore:searchId&gt;
        &lt;platformCore:recordList&gt;
          &lt;platformCore:record internalId="1" xsi:type="listAcct:Account" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:acctType&gt;_bank&lt;/listAcct:acctType&gt;
            &lt;listAcct:acctNumber&gt;8000&lt;/listAcct:acctNumber&gt;
            &lt;listAcct:acctName&gt;Checking&lt;/listAcct:acctName&gt;
            &lt;listAcct:includeChildren&gt;false&lt;/listAcct:includeChildren&gt;
            &lt;listAcct:currency internalId="1"&gt;
              &lt;platformCore:name&gt;USD&lt;/platformCore:name&gt;
            &lt;/listAcct:currency&gt;
            &lt;listAcct:generalRate&gt;_current&lt;/listAcct:generalRate&gt;
            &lt;listAcct:parent internalId="246"&gt;
              &lt;platformCore:name&gt;xxxxxxxxxxxxxxxxxxx&lt;/platformCore:name&gt;
            &lt;/listAcct:parent&gt;
            &lt;listAcct:cashFlowRate&gt;_average&lt;/listAcct:cashFlowRate&gt;
            &lt;listAcct:description&gt;Checking&lt;/listAcct:description&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:inventory&gt;false&lt;/listAcct:inventory&gt;
            &lt;listAcct:eliminate&gt;false&lt;/listAcct:eliminate&gt;
            &lt;listAcct:revalue&gt;true&lt;/listAcct:revalue&gt;
          &lt;/platformCore:record&gt;
          &lt;platformCore:record internalId="2" xsi:type="listAcct:Account" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:acctType&gt;_bank&lt;/listAcct:acctType&gt;
            &lt;listAcct:acctNumber&gt;8001&lt;/listAcct:acctNumber&gt;
            &lt;listAcct:acctName&gt;Savings&lt;/listAcct:acctName&gt;
            &lt;listAcct:includeChildren&gt;false&lt;/listAcct:includeChildren&gt;
            &lt;listAcct:currency internalId="1"&gt;
              &lt;platformCore:name&gt;USD&lt;/platformCore:name&gt;
            &lt;/listAcct:currency&gt;
            &lt;listAcct:generalRate&gt;_current&lt;/listAcct:generalRate&gt;
            &lt;listAcct:parent internalId="246"&gt;
              &lt;platformCore:name&gt;yyyyyyyyy&lt;/platformCore:name&gt;
            &lt;/listAcct:parent&gt;
            &lt;listAcct:cashFlowRate&gt;_average&lt;/listAcct:cashFlowRate&gt;
            &lt;listAcct:description&gt;Savings&lt;/listAcct:description&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:inventory&gt;false&lt;/listAcct:inventory&gt;
            &lt;listAcct:eliminate&gt;false&lt;/listAcct:eliminate&gt;
            &lt;listAcct:revalue&gt;true&lt;/listAcct:revalue&gt;
          &lt;/platformCore:record&gt;
          .........
          .........
          .........
          .........		  
        &lt;/platformCore:recordList&gt;
      &lt;/platformCore:searchResult&gt;
    &lt;/searchMoreWithIdResponse&gt;
  &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
&nbsp;

&nbsp;</div>
<p>&nbsp;</p>
<h2><span id="Getting_Started">Getting Started</span></h2>
<p>Now let’s check step by step instructions on <strong>how to load NetSuite data in SSIS</strong>. In this exercise we will focus on <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3519853.html" target="_blank" rel="noopener">calling search API</a> but you can call virtually any API using the same technique.</p>
<p>For detailed help on NetSuite SOAP API and other useful information check <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=book_N3412393.html" target="_blank" rel="noopener">this documentation</a>. To browse schema you can use <a href="http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_2/schema/record/account.html?mode=package" target="_blank" rel="noopener">this link</a>. From schema browser we will use Search Type name later on in this article. For example later on in this article to search accounts we will use <strong>AccountSearch</strong> as below example. This name can be found <a href="http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_2/schema/search/accountsearch.html?mode=package" target="_blank" rel="noopener">from here(click search tab)</a> You can change it to something else. For now dont worry too much until we get to that point.</p>
<div id="crayon-5bb3ef8dce2fc034493941" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover">
<div class="crayon-main">
<div class="crayon-nums-content">
<div class="crayon-num" data-line="crayon-5bb3ef8dce2fc034493941-1"></div>
</div>
<div class="crayon-pre">
<div id="crayon-5bb3ef8dce2fc034493941-1" class="crayon-line"><code><span class="crayon-o">&lt;</span><span class="crayon-e">searchRecord </span><span class="crayon-v">xmlns</span><span class="crayon-o">:</span><span class="crayon-v">q1</span><span class="crayon-o">=</span><span class="crayon-s">"urn:accounting_2017_1.lists.webservices.netsuite.com"</span> <span class="crayon-v">xsi</span><span class="crayon-o">:</span><span class="crayon-v">type</span><span class="crayon-o">=</span><span class="crayon-s">"q1:AccountSearch"</span><span class="crayon-o">&gt;</span></code></div>
</div>
</div>
<div></div>
</div>
<h3>Configure SSIS HTTP Connection for NetSuite</h3>
<p>Now let&#8217;s look at how to configure SSIS HTTP Connection for NetSuite API login. We will use <a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic Token Approach</a>.</p>
<ol>
<li style="list-style-type: none;">
<ol>
<li>Open SSIS Package</li>
<li>Drag Data flow from SSIS Toolbox and double click it</li>
<li>Inside data flow SSIS toolbox, find <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">ZS XML Source</a> and drag it on the surface.</li>
<li>Double click it to configure. First enter NetSuite API URL. If you need to use latest WebService version e.g. NetSuitePort_2019_1 then you must use company specific endpoint.<br />
<pre class="crayon-plain-tag">https://webservices.netsuite.com/services/NetSuitePort_2017_1</pre>
&#8211;OR&#8211;</p>
<p>To use <pre class="crayon-plain-tag">NetSuitePort_2019_1</pre>  or higher use company specific endpoint like below otherwise <a href="https://stackoverflow.com/questions/57429656/netsuite-error-you-must-use-account-specific-domains-with-the-2019-1-soap-web-s" target="_blank" rel="noopener">you will get error</a>. <strong>NOTE:</strong> You must change Body in coming section to match Version if you use below way.</p><pre class="crayon-plain-tag">https://111222333444.suitetalk.api.netsuite.com/services/NetSuitePort_2019_1</pre><p>
</li>
<li>Check Use Credentials option and Click New HTTP connection.</li>
<li>Configure general properties of connections as below.
<ol>
<li>Select Credentials Type as <strong>Dynamic Token</strong></li>
<li>Use any <strong>URL</strong> (It will be ignored)</li>
<li>Enter your NetSuite UserID, Password</li>
<li>Enter Header as <strong>Cookie</strong></li>
<li>Enter AUth Scheme as <strong>JSESSIONID=</strong></li>
</ol>
</li>
<li>First Screen will look like as below. Click Configure.
<div id="attachment_5062" style="width: 843px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5062" class="size-full wp-image-5062" src="https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-1.png" alt="Configure SSIS NetSuite Connection" width="833" height="775" srcset="https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-1.png 833w, https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-1-300x279.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-1-768x715.png 768w" sizes="(max-width: 833px) 100vw, 833px" /></a><p id="caption-attachment-5062" class="wp-caption-text">Configure SSIS NetSuite Connection</p></div></li>
<li>On <strong>Dynamic Token</strong> &gt; <strong>Request Tab</strong> we have to set Token URL, Method, Body, Header.
<ol>
<li>In the URL enter same URL again<br />
<pre class="crayon-plain-tag">https://webservices.netsuite.com/services/NetSuitePort_2017_1</pre>
</li>
<li>In the Body enter as below. Change APPLICATION-ID and ACCOUNT-ID with correct ID we obtained earlier. [$userid$] and [$password$] is special placeholders will be replaced automatically at runtime.<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE:</strong> Try to match your URL version in the Body Request. If you used For example if you used 2019_1 in URL then change below body to match that version </div></div>
<pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;xxxxxxYOUR-APPLICATION-IDxxxxxx&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
    &lt;login xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;passport&gt;
        &lt;email xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;[$userid$]&lt;/email&gt;
        &lt;password xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;[$password$]&lt;/password&gt;
        &lt;account xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;xxxxxxYOUR-ACCOUNT-IDxxxxxx&lt;/account&gt;
        &lt;role internalId="3" xmlns="urn:core_2017_1.platform.webservices.netsuite.com" /&gt;
      &lt;/passport&gt;
    &lt;/login&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">NOTE: Remove below line from above Body if you get INVALID_ROLE error later in this tutorial. If if you get INVALID_LOGIN_CREDENTIALS error then refer here.</div></div>
<pre class="crayon-plain-tag">&lt;role internalId="3" xmlns="urn:core_2017_1.platform.webservices.netsuite.com" /&gt;</pre>
</li>
<li>Select Content Type as text/xml</li>
<li>In the Headers click on Raw Edit Button and enter like below.<br />
<pre class="crayon-plain-tag">SOAPAction: "login"</pre>
</li>
</ol>
</li>
<li>Once all settings done your <strong>Request</strong> Tab will look like below
<div id="attachment_5063" style="width: 826px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-dynamic-token-request.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5063" class="size-full wp-image-5063" src="https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-dynamic-token-request.png" alt="SSIS NetSuite Connection - Configure Token Request" width="816" height="801" srcset="https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-dynamic-token-request.png 816w, https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-dynamic-token-request-300x294.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-dynamic-token-request-768x754.png 768w" sizes="(max-width: 816px) 100vw, 816px" /></a><p id="caption-attachment-5063" class="wp-caption-text">SSIS NetSuite Connection &#8211; Configure Token Request</p></div></li>
<li>On <strong>Response</strong> Tab configure like below. You have to enter Cookie name as <strong>JSESSIONID</strong>
<div id="attachment_5064" style="width: 749px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-dynamic-token-response.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5064" class="size-full wp-image-5064" src="https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-dynamic-token-response.png" alt="SSIS NetSuite Connection - Configure Token Response" width="739" height="548" srcset="https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-dynamic-token-response.png 739w, https://zappysys.com/blog/wp-content/uploads/2018/09/configure-ssis-netsuite-connection-dynamic-token-response-300x222.png 300w" sizes="(max-width: 739px) 100vw, 739px" /></a><p id="caption-attachment-5064" class="wp-caption-text">SSIS NetSuite Connection &#8211; Configure Token Response</p></div></li>
<li>Click OK to Save Connection.</li>
<li>We will configure XML Source in next section.</li>
</ol>
</li>
</ol>
<h3>Configure SSIS XML Source to read NetSuite data</h3>
<p>Now let&#8217;s continue configuration of XML Source. In this section we will show you how to get data without pagination. In next section we will see how to modify XML Source Settings to pagination request to read many records (e.g. 1000+ rows).</p>
<ol>
<li>On your XML Source enter NetSuite Webservice URL like below.<br />
<pre class="crayon-plain-tag">https://webservices.netsuite.com/services/NetSuitePort_2017_1</pre>
</li>
<li>Now check Use Credentials and select previously created HTTP connection.</li>
<li>Select Method as  <strong>POST</strong> and content type as <strong>text/xml</strong></li>
<li>Edit Request Body and enter like below (or any other XML body for API you like to call. Make sure SOAPAction in next step updated correctly too for other action)<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">NOTE: Try to match your URL version in the Body Request. If you used For example if you used 2019_1 in URL then change below body to match that version </div></div>
<pre class="crayon-plain-tag">&lt;soapenv:Envelope 
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:urn="urn:messages_2018_1.platform.webservices.netsuite.com" 
   xmlns:urn1="urn:core_2018_1.platform.webservices.netsuite.com"&gt;
   &lt;soapenv:Body&gt;
      &lt;urn:getAll&gt;
         &lt;record recordType="currency"/&gt; 
      &lt;/urn:getAll&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
</li>
<li><div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">NOTE: If you used NetSuitePort_2019_1 or higher version in URL then make sure you changed version  <strong>2017_1</strong> to <strong>2019_1</strong> in below body</div></div></li>
<li>Now you click Raw Edit above headers grid and enter method name in SOAPAction (e.g. <strong>getAll</strong> in our case)<br />
<pre class="crayon-plain-tag">SOAPAction: "getAll"</pre>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">NOTE: SOAPAction Header is very important so make sure you change it to match Action you like to call. You can Use Correct <a href="https://www.netsuite.com/portal/developers/resources/suitetalk-documentation.shtml" target="_blank" rel="noopener">WebService WSDL File (Metadata)</a>  in Tool like <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">SOAPUI as explained here</a></p>
<p><a href="https://webservices.netsuite.com/wsdl/v2017_1_0/netsuite.wsdl">Version 2017_1 WSDL Link</a><br />
<a href="https://webservices.netsuite.com/wsdl/v2018_1_0/netsuite.wsdl">Version 2018_1 WSDL Link</a><br />
<a href="https://webservices.netsuite.com/wsdl/v2019_1_0/netsuite.wsdl" target="_blank" rel="noopener">Version 2019_1 WSDL Link</a><br />
For Other Versions Just Change URL Version Part to different Number e.g. <strong>2019_2_0</strong></p>
</div></div></li>
<li>Now enter Filter like below or navigate by clicking Select Filter button.<br />
<pre class="crayon-plain-tag">$.soapenv:Envelope.soapenv:Body.getAllResponse.platformCore:getAllResult.platformCore:recordList.platformCore:record[*]</pre>
<div id="attachment_5107" style="width: 838px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-soap-api-getall-select-filter.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5107" class="size-full wp-image-5107" src="https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-soap-api-getall-select-filter.png" alt="Configure XML Source - NetSuite SOAP API getAll (Body, Header, ContentType, Method, Filter)" width="828" height="507" srcset="https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-soap-api-getall-select-filter.png 828w, https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-soap-api-getall-select-filter-300x184.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-soap-api-getall-select-filter-768x470.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-5107" class="wp-caption-text">Configure XML Source &#8211; NetSuite SOAP API getAll (Body, Header, ContentType, Method, Filter)</p></div></li>
<li>Now click preview data.
<div id="attachment_5108" style="width: 630px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-soap-api-getall-preview-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5108" class="size-full wp-image-5108" src="https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-soap-api-getall-preview-data.png" alt="Preview NetSuite data in XML Source" width="620" height="310" srcset="https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-soap-api-getall-preview-data.png 620w, https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-soap-api-getall-preview-data-300x150.png 300w" sizes="(max-width: 620px) 100vw, 620px" /></a><p id="caption-attachment-5108" class="wp-caption-text">Preview NetSuite data in XML Source</p></div></li>
<li>Click OK to save XML Source UI</li>
<li>Now you can connect XML Source to target like OLEDB Destination and load NetSuite data into SQL Server.</li>
</ol>
<h3>Configure SSIS XML Source with Pagination</h3>
<p>So in previous section we saw how to configure XML Source for basic API calls (without pagination). In this section we will see how to call more complex API (e.g. search ) which requires pagination. Some ideas about NetSuite Pagination <a href="https://zappysys.com/blog/read-netsuite-data-power-bi/" target="_blank" rel="noopener">discussed here too</a>.</p>
<p>Foe pagination setup using XML Source we have to configure following properties via Properties Grid or Advanced Edit rather than Normal UI. May of these properties not available via UI as of now.</p>
<ol>
<li>Create new data flow and drag new ZS XML Source.</li>
<li>Right click on XML Source and click Properties in Data flow designer. Find property by name in the Grid and set correct value.<br />
<strong>NOTE:</strong> In newer version v3.1.2 or higher you can use XML Source UI to enter some multi line properties for ease of use (e.g. FirstPageBodyPart and NextPageBodyPart can be entered on Advanced Pagination Tab, all other properties are easier to enter from Grid Mode if you sort alphabetically)</li>
</ol>
<div class="su-table su-table-alternate">
<table style="border-collapse: collapse;width: 100%;height: 198px" border="1">
<tbody>
<tr>
<td style="width: 22.434%">ElementsToTreatAsArray</td>
<td style="width: 77.566%">platformCore:record</td>
</tr>
<tr style="height: 22px">
<td style="width: 22.434%;height: 22px">EnablePageTokenForBody</td>
<td style="width: 77.566%;height: 22px">True</td>
</tr>
<tr style="height: 22px">
<td style="width: 22.434%;height: 22px">Filter</td>
<td style="width: 77.566%;height: 22px">$.soapenv:Envelope.soapenv:Body.search[$tag$]Response.platformCore:searchResult.platformCore:recordList.platformCore:record[*]</td>
</tr>
<tr style="height: 22px">
<td style="width: 22.434%;height: 22px">FirstPageBodyPart</td>
<td style="width: 77.566%;height: 22px">
<pre class="crayon-plain-tag">&lt;search xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchRecord xmlns:q1="urn:accounting_2017_1.lists.webservices.netsuite.com" xsi:type="q1:AccountSearch"&gt;
        &lt;q1:basic&gt;
          &lt;description operator="doesNotContain" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;x&lt;/searchValue&gt;
          &lt;/description&gt;
          &lt;name operator="contains" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;a&lt;/searchValue&gt;
          &lt;/name&gt;
        &lt;/q1:basic&gt;
      &lt;/searchRecord&gt;
    &lt;/search&gt;</pre>
Change as per your need but we used above example search</td>
</tr>
<tr style="height: 22px">
<td style="width: 22.434%;height: 22px">HasDifferentNextPageInfo</td>
<td style="width: 77.566%;height: 22px">True</td>
</tr>
<tr style="height: 22px">
<td style="width: 22.434%;height: 22px">NextPageBodyPart</td>
<td style="width: 77.566%;height: 22px">
<pre class="crayon-plain-tag">&lt;searchMoreWithId xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchId&gt;[$pagetoken$]&lt;/searchId&gt;
      &lt;pageIndex&gt;[$pagenumber$]&lt;/pageIndex&gt;
    &lt;/searchMoreWithId&gt;</pre>
&nbsp;</td>
</tr>
<tr style="height: 22px">
<td style="width: 22.434%;height: 22px">NextUrlAttribute</td>
<td style="width: 77.566%;height: 22px">$.soapenv:Envelope.soapenv:Body.search[$tag$]Response.platformCore:searchResult.platformCore:searchId</td>
</tr>
<tr style="height: 22px">
<td style="width: 22.434%;height: 22px">PagePlaceholders</td>
<td style="width: 77.566%;height: 22px">header=|MoreWithId;filter=|MoreWithId</td>
</tr>
<tr style="height: 22px">
<td style="width: 22.434%;height: 22px">PagesMaxPagesExpr</td>
<td style="width: 77.566%;height: 22px">$.soapenv:Envelope.soapenv:Body.searchResponse.platformCore:searchResult.platformCore:totalPages</td>
</tr>
<tr style="height: 22px">
<td style="width: 22.434%;height: 22px"></td>
<td style="width: 77.566%;height: 22px"></td>
</tr>
</tbody>
</table>
</div>
<p>Once above items are set in property grid. Double click XML source to edit few more items from UI.</p>
<ol>
<li>Enter URL as below<br />
<pre class="crayon-plain-tag">https://webservices.netsuite.com/services/NetSuitePort_2017_1</pre>
</li>
<li>Check Use Credentials and select <strong>HTTP connection</strong> we created in previous section.</li>
<li>Click <strong>Raw Edit</strong> button (above headers grid) and enter below<br />
<pre class="crayon-plain-tag">SOAPAction: "search[$tag$]"</pre>
</li>
<li>Click on Edit button next to Body. Enter following XML fragment for search request. <strong>Change ApplicationId</strong> and adjust PageSize if needed.<br />
<pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;ABCD-1234-XXXXXXXXXXXXXXX&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
    &lt;searchPreferences xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;pageSize&gt;100&lt;/pageSize&gt;
    &lt;/searchPreferences&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
[$tag$]
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
</li>
<li>Select <strong>POST</strong> method, change content type to <strong>XML (text / xml, charset=UTF-8)</strong></li>
<li>That&#8217;s it. Click &#8216;Preview to confirm.</li>
<li>Click ok to save XML Source.
<div id="attachment_5109" style="width: 900px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-pagination-preview-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5109" class="size-full wp-image-5109" src="https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-pagination-preview-data.png" alt="Read NetSuite data in SSIS with Pagination ( search, searchMoreWithId API call)" width="890" height="787" srcset="https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-pagination-preview-data.png 890w, https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-pagination-preview-data-300x265.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/09/ssis-xml-source-configure-netsuite-pagination-preview-data-768x679.png 768w" sizes="(max-width: 890px) 100vw, 890px" /></a><p id="caption-attachment-5109" class="wp-caption-text">Read NetSuite data in SSIS with Pagination ( search, searchMoreWithId API call)</p></div></li>
</ol>
<h3>Configure SQL Server Destination to load NetSuite data</h3>
<p>Once you have XML Source configured you can connect XML Source to Target (OLEDB Destination) and load data into SQL Server.</p>
<h2>Conclusion</h2>
<p>In this post we explored many advanced options of HTTP Connection and XML Source to enable NetSuite API integration in SSIS. <a href="https://zappysys.com/products/ssis-powerpack/">Download SSIS PowerPack</a> today for FREE to uncover many other data integration scenarios not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/read-data-netsuite-ssis-simpletalk-soap-api/">How to read data from NetSuite in SSIS (SimpleTalk SOAP API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>POST data to API in Informatica using SQL Transformation</title>
		<link>https://zappysys.com/blog/post-data-api-informatica-using-sql-transformation/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 28 Aug 2018 04:58:26 +0000</pubDate>
				<category><![CDATA[ETL - Informatica]]></category>
		<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[soap]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4715</guid>

					<description><![CDATA[<p>Introduction In our previous blog post we saw how to read JSON REST API / XML SOAP in Informatica using ZappySys ODBC Drivers. Now lets look at API Write scenario. We will learn how to to POST data to API in Informatica (Insert / Update). We will use SQL Transformation to fire ODBC Driver Queries [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/post-data-api-informatica-using-sql-transformation/">POST data to API in Informatica using SQL Transformation</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/informatica-powercenter-logo.png"><img loading="lazy" decoding="async" class=" wp-image-3454 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/05/informatica-powercenter-logo.png" alt="Informatica PowerCenter Logo" width="108" height="108" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/informatica-powercenter-logo.png 200w, https://zappysys.com/blog/wp-content/uploads/2018/05/informatica-powercenter-logo-150x150.png 150w" sizes="(max-width: 108px) 100vw, 108px" /></a>In our previous blog post we saw <a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/" target="_blank" rel="noopener">how to read JSON REST API / XML SOAP in Informatica</a> using ZappySys <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC Drivers</a>. Now lets look at <strong>API Write scenario</strong>. We will learn how to to POST data to API in Informatica (Insert / Update). We will use <strong>SQL Transformation</strong> to fire <strong>ODBC Driver Queries</strong> to create / update or delete records in Target System by calling Web API (i.e. REST or SOAP).</p>
<p>For example purpose we will use JSON API but if you are calling XML / SOAP API then use ZappySys XML Driver instead of JSON Driver.</p>
<p>&nbsp;</p>
<h2>Requirements</h2>
<p>This article assumes that you have full filled following basic requirements.</p>
<ol>
<li>Download Install <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> (Drivers for JSON and REST API)</li>
<li>Install Informatica PowerCenter Client Tools (e.g. Workflow and Mapping Designers)</li>
<li>Access to a Relational database such as SQL Server (or use any of your choice e.g. Oracle, MySQL, DB2 ). If nothing available then you can use flat file target.</li>
</ol>
<h2>Video Tutorial &#8211; POST data to API in Informatica</h2>
<p>Here is the full Video Tutorial with many API tips / tricks to show how to POST data to REST / SOAP API in Informatica PowerCenter. It also covers how to Upload File to Web API.</p>
<a href="https://zappysys.com/blog/post-data-api-informatica-using-sql-transformation/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FMKekE5w0rCk%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<p>&nbsp;</p>
<h2>Getting Started</h2>
<p>So let&#8217;s get started with basic setup on how to POST data to your API to create new records or update / delete records. In the following demo we are trying to create new Customer records by calling POST API.</p>
<p>For that we will use following setup.</p>
<h3>Create ODBC Connection for API</h3>
<p>Check <a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/#Create_ODBC_DSN_using_ZappySys_JSON_Driver" target="_blank" rel="noopener">this section from previous article</a> to learn how to configure API Connection using ZappySys ODBC Driver for JSON / XML / CSV.</p>
<h3>Create Relational Connection in Workflow Designer</h3>
<p>Check <a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/#Create_Connection_in_Informatica_Workflow_Designer" target="_blank" rel="noopener">this section from previous article</a> to learn how to create and configure Relational Connection of ODBC Type which points to DSN (ZappySys JSON Driver).</p>
<div id="attachment_3473" style="width: 480px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/informatica-connection-for-json-file-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3473" class="wp-image-3473 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/informatica-connection-for-json-file-rest-api.png" alt="Configure JSON connection in Informatica for REST API / JSON File connectivity - Using ZappySys JSON ODBC Driver" width="470" height="560" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/informatica-connection-for-json-file-rest-api.png 470w, https://zappysys.com/blog/wp-content/uploads/2018/05/informatica-connection-for-json-file-rest-api-252x300.png 252w" sizes="(max-width: 470px) 100vw, 470px" /></a><p id="caption-attachment-3473" class="wp-caption-text">Configure JSON connection in Informatica for REST API / JSON File connectivity &#8211; Using ZappySys JSON ODBC Driver</p></div>
<h3>Prepare POST Query and generate Metadata File</h3>
<p>Before you can call POST API in Informatica Mapping, you need to generate Metadata file using ODBC Data Source UI. Metadata file creation is important to avoid double calls (One for Metadata and One for Getting Data). When you dont Supply Metadata file to ZappySys Driver then it will try to call API twice (First time read 300 rows to guess datatypes / response columns and then call API again to read all remaining rows from response).</p>
<p>Its OK to allow two reads for the same request if its GET request (Read scenario) but its not OK if you are creating a New records because same request is sent twice and you may end up creating duplicate records.</p>
<p>Obtaining metadata is simple using Query Preview UI.</p>
<ol>
<li>Go to ODBC Data Source and setup properties on Driver UI (e.g. URL, Connection, Filter, Headers etc)</li>
<li>Once everything is configured go to Preview Tab and click Preview Button to see data.</li>
<li>Once Data is returned as per your need you can click on Save Metadata. Copy SQL Query for later use.
<div id="attachment_4716" style="width: 551px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/post-data-json-rest-api-using-sql-query-odbc-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4716" class="size-full wp-image-4716" src="https://zappysys.com/blog/wp-content/uploads/2018/08/post-data-json-rest-api-using-sql-query-odbc-driver.png" alt="Generate Metadata File for REST API POST Operation using ZappySys API Driver (JSON / XML)" width="541" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/post-data-json-rest-api-using-sql-query-odbc-driver.png 541w, https://zappysys.com/blog/wp-content/uploads/2018/08/post-data-json-rest-api-using-sql-query-odbc-driver-274x300.png 274w" sizes="(max-width: 541px) 100vw, 541px" /></a><p id="caption-attachment-4716" class="wp-caption-text">Generate Metadata File for REST API POST Operation using ZappySys API Driver (JSON / XML)</p></div></li>
</ol>
<h3>Create Informatica Mapping to POST data to REST API / SOAP Web Service</h3>
<p>Once Metadata File is we can proceed to Informatica Mapping designer. For making instructions simple we will skip few details (e.g. Importing Source  /Target Definitions). Refer to <a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/" target="_blank" rel="noopener">Previous article to read instructions in depth</a>.</p>
<p>Created Now lets look at how to read data from relational source (E.g. SQL Server, Oracle) and send data to REST API (Call POST API).</p>
<ol>
<li>Drag Source into Mapping Designer</li>
<li>Drag Expression Transform  into Mapping Designer and drop desired columns on Expression Transform as Pass through Columns.</li>
<li>Create one additional Output Port for API URL as below (You may not need this if API URL is not Dynamic. Skipping URL or any other setting in ODBC SQL Query will use DSN Settings you configured in previous section)</li>
<li>Drag SQL Transform and select following Option (Mode = Query, Connection Type =ODBC)
<div id="attachment_4717" style="width: 712px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-post-data-to-api-using-sql-transformation-odbc-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4717" class="size-full wp-image-4717" src="https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-post-data-to-api-using-sql-transformation-odbc-connection.png" alt="Create new SQL Transform for API Call (POST Data to API using Informatica and ZappySys ODBC Driver)" width="702" height="485" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-post-data-to-api-using-sql-transformation-odbc-connection.png 702w, https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-post-data-to-api-using-sql-transformation-odbc-connection-300x207.png 300w" sizes="(max-width: 702px) 100vw, 702px" /></a><p id="caption-attachment-4717" class="wp-caption-text">Create new SQL Transform for API Call (POST Data to API using Informatica and ZappySys ODBC Driver)</p></div></li>
<li>Now connect input columns from Expression Transform to SQL Transformation. These input columns will be used as parameters in API POST Body and SQL Query WITH Clause to craft JSON / XML API request.</li>
<li>Now double click on SQL Transform and go to SQL Ports Tab</li>
<li>Click somewhere in the Output Columns Group and Add desired columns (Tip: Add same number of columns you define in the Metadata File in Previous section. For Demo purpose you can remove some columns from Metadata file so you have only hadful columns to deal with. When you remove columns from Metadata File make sure JSON is Valid. Many times user forget to remove last comma)</li>
<li>Once you define Input and Output columns for your SQL Transform you can Edit SQL Query button and configure your SQL Query as below. In below example query we have supplied URL,  Body, HTTP Headers. Also notice that Body JSON is crafted by using Input Columns from Upstream. We used only CustomerID as an example but in real words you may add many more in your JSON Body.<br />
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>For Old Version of PowerCenter- V8.5 or lower:</strong>  It&#8217;s important to Pass URL via Substitution else you may get error (http://abc.com is output as http:/abc.com &#8211; only one slash)<strong><strong>Here is a sample Query for SQL Transform (Added String Substitutions)</strong></strong> </div></div><div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Few things to notice:<br />
&#8211; Output Ports defined in SQL Transform must match order and column names of SQL query. Best thing is to <strong>avoid SELECT * FROM</strong> and use explicit column names like below. If you already took care column orders in Metadata file then you can use * to shorten your SQL statement.<br />
&#8211; Slash (i.e. \ ) is treated as escape character so <strong>replace slash with double slash</strong> anywhere in SQL text(e.g. c:\temp\meta.txt should be replaced with c:\\temp\\meta.txt).<br />
&#8211; If you use ? in URL (e.g. http://myapi/?id=111) then <strong>replace ? with \? </strong> because ? has special meaning in SQL Transform SQL Text.  ? is used in Parameter Binding (e.g. ?my_input_port?) .<br />
&#8211; You may use Format Specifiers <pre class="crayon-plain-tag">&lt;&lt;~P_URL~,FUN_JSONENC&gt;&gt;</pre>  if you want to encode special characters in your data (e.g. Tabs, Double quotes, New lines). <a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/odbc-format-static-placeholders.htm" target="_blank" rel="noopener">Check this link</a><br />
&#8211; Avoid using string specifier before back slash (e.g. c:\\data<strong>\\~</strong>FileName~ ). because <strong>\~</strong> cause issue with escape sequence triggered by <strong>\ </strong>. To solve this issue Use Expression Transform before SQL Transform to build Dynamic Path or other type of string.<br />
</div></div>
<pre class="crayon-plain-tag">SELECT url,origin FROM $
WITH
(
  META='c:\\temp\\meta.txt'
 ,METHOD='POST'
 ,HEADER='Content-Type:text/plain||x-hdr1:AAA'
 ,SRC='~P_URL~'
 ,BODY='
 {
    "ID": "~P_CustomerID~",
    "Link": "&lt;&lt;~P_URL~,FUN_JSONENC&gt;&gt;",
    "Notes": "Line1\\r\\nLine2"
 }'
)</pre>
<div id="attachment_4718" style="width: 1190px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-http-post-web-requests-call-rest-api-json-odbc-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4718" class="size-full wp-image-4718" src="https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-http-post-web-requests-call-rest-api-json-odbc-driver.png" alt="Configure Informatica SQL Transform to call ODBC SQL Queries - JSON /XML API POST Data (Create / Update Records)" width="1180" height="706" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-http-post-web-requests-call-rest-api-json-odbc-driver.png 1180w, https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-http-post-web-requests-call-rest-api-json-odbc-driver-300x179.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-http-post-web-requests-call-rest-api-json-odbc-driver-768x459.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-http-post-web-requests-call-rest-api-json-odbc-driver-1024x613.png 1024w" sizes="(max-width: 1180px) 100vw, 1180px" /></a><p id="caption-attachment-4718" class="wp-caption-text">Configure Informatica SQL Transform to call ODBC SQL Queries &#8211; JSON /XML API POST Data (Create / Update Records)</p></div></li>
<li>In the above Screenshot Notice Following items in SQL Query.
<ol>
<li>We have specified META property (Use the same Metadata File we generated   in the previous section. Meta Property can take direct file path, meta name (settings stored in DSN) or supply direct JSON for Metadata. <strong>Notice we escaped \ with \\</strong><br />
<pre class="crayon-plain-tag">META='[ {"Name": "MyCol1", "Type": "String", "Length": 100}, {"Name": "MyCol2", "Type": "String", "Length": 100} ...... ]'
-- OR --
META='c:\\meta\\my_post_query_metadata.txt'
-- OR --
META='MyMetaName'</pre>
</li>
<li>Second thing you will Notice that in the Body we have used <strong>String Substitution</strong> in <strong>SRC</strong> and <strong>BODY</strong>.  If your URL is not Dynamic and you like to use setting defined in DSN then omit SRC attribute from WITH clause. Substitution must start and end with tild (~). For example Input column P_URL can be used as <strong>~P_URL~</strong> and at runtime it will be replaced. Make sure to <strong>escape  single quote with double quote (We replaced &#8216; with &#8221; in Sam&#8221;s)</strong> in Input Parameter Values else SQL Query will fail. You can use Expression Transform to escape data if needed using REPLACE function.  <strong>We also replaced \r\n with \\r\\n</strong><br />
<pre class="crayon-plain-tag">SRC='~P_URL~'</pre>
and<br />
<pre class="crayon-plain-tag">BODY='
 {
    "ID": "~P_CustomerID~",
    "Notes": "Line1\\r\\nLine2, Sam''s Club"
 }'</pre>
</li>
</ol>
</li>
<li>Now connect your SQL Transformation output Ports to Target (e.g. Flat File Target or Relational Target)</li>
<li>Create new Workflow and Session using this Mapping</li>
<li>Go to Session properties and on the Mapping Tab make sure to change COnnection Type for SQL Transformation to Relational Connection.
<div id="attachment_4719" style="width: 964px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/configure-informatica-session-for-rest-api-post-use-odbc-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4719" class="size-full wp-image-4719" src="https://zappysys.com/blog/wp-content/uploads/2018/08/configure-informatica-session-for-rest-api-post-use-odbc-connection.png" alt="Configure Session Mapping Properties - Set ODBC COnnection Type for SQL Transform to call API requests" width="954" height="723" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/configure-informatica-session-for-rest-api-post-use-odbc-connection.png 954w, https://zappysys.com/blog/wp-content/uploads/2018/08/configure-informatica-session-for-rest-api-post-use-odbc-connection-300x227.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/configure-informatica-session-for-rest-api-post-use-odbc-connection-768x582.png 768w" sizes="(max-width: 954px) 100vw, 954px" /></a><p id="caption-attachment-4719" class="wp-caption-text">Configure Session Mapping Properties &#8211; Set ODBC COnnection Type for SQL Transform to call API requests</p></div></li>
<li>In our example we changed Target to File Writer but you can save SQL Transform output to some relational table too.</li>
<li>Now you can execute Workflow and check your session log for any error. You can also debug <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">web requests in Fiddler</a> (Must be installed on Server where actual Job is running).
<div id="attachment_4720" style="width: 1079px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-execution-log-check-api-post-requests-in-fiddler.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4720" class="size-full wp-image-4720" src="https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-execution-log-check-api-post-requests-in-fiddler.png" alt="Monitor Session Execution in Informatica - Debug Web API requests using Fiddler" width="1069" height="780" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-execution-log-check-api-post-requests-in-fiddler.png 1069w, https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-execution-log-check-api-post-requests-in-fiddler-300x219.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-execution-log-check-api-post-requests-in-fiddler-768x560.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/informatica-execution-log-check-api-post-requests-in-fiddler-1024x747.png 1024w" sizes="(max-width: 1069px) 100vw, 1069px" /></a><p id="caption-attachment-4720" class="wp-caption-text">Monitor Session Execution in Informatica &#8211; Debug Web API requests using Fiddler</p></div></li>
</ol>
<h2>Upload File to API (Read Body from Local File)</h2>
<p>Now let&#8217;s look at scenario to POST Body content from File (i.e. Upload File to API). Below simple query will Upload file content to API server (POST request where Body is coming from file)</p><pre class="crayon-plain-tag">SELECT url,origin FROM $
WITH
(
  META='c:\\temp\\meta.txt'
 ,METHOD='POST'
 ,HEADER='Content-Type:text/plain||x-hdr1:AAA'
 ,SRC='~P_URL~'
 ,BODY='@~P_FilePath~'
 ,IsMultiPart='True'
)</pre><p>
Notice how we have used <strong>IsMultiPart = &#8216;True&#8217;</strong>  and <strong>used @ before FilePath</strong> in Body. Our File Path is coming from String Substitution (i.e. Input Port  <strong>~P_FilePath~</strong>)</p>
<h2>Debugging REST / SOAP API using Fiddler</h2>
<p>Check <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">this article</a> on how to debug REST / SOAP API calls using fiddler. You can also <a href="https://zappysys.zendesk.com/hc/en-us/articles/360017594154-How-to-enable-Logging-for-ODBC-PowerPack" target="_blank" rel="noopener">enable <strong>Log</strong> to <strong>Debug Mode</strong> on <strong>Advanced Tab</strong></a> of ODBC DSN UI.</p>
<h2>Conclusion</h2>
<p>In this post we saw how to call API POST requests in Informatica and send data from relational system to Web API (Create / Update / Delete Records using JSON / XML API calls). You can explore many other API related scenarios using <strong>ZappySys ODBC Drives for JSON / XML / CSV</strong>. <a href="https://zappysys.com/products/odbc-powerpack/">Click here to try ZappySys ODBC Drivers for FREE</a> and check out how easy it is to read / write JSON / XML API in Informatica or any other ODBC Compliant Apps (e.g Power BI, SSIS, Qlik).</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/post-data-api-informatica-using-sql-transformation/">POST data to API in Informatica using SQL Transformation</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read NetSuite data in Power BI</title>
		<link>https://zappysys.com/blog/read-netsuite-data-power-bi/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 11 Aug 2018 17:29:14 +0000</pubDate>
				<category><![CDATA[Reporting - Microsoft Power BI]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[NetSuite]]></category>
		<category><![CDATA[power bi]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[SoapUI]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4613</guid>

					<description><![CDATA[<p>Introduction In our previous blog we discussed how to import REST / SOAP API data in Power BI. Now we will use that knowledge to read NetSuite data in Power BI (NetSuite CRM &#8211; SuiteTalk). We will use ZappySys XML Driver to call Search function in NetSuite SOAP API. If you are not familiar with SOAP [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-netsuite-data-power-bi/">How to read NetSuite data in Power BI</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310.png"><img loading="lazy" decoding="async" class=" wp-image-3951 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310.png" alt="Power BI Integration" width="192" height="192" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310.png 310w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-300x300.png 300w" sizes="(max-width: 192px) 100vw, 192px" /></a>In our previous blog we discussed how to <a href="https://zappysys.com/blog/call-soap-api-power-bi-read-xml-web-service-data/" target="_blank" rel="noopener">import REST / SOAP API data in Power BI</a>. Now we will use that knowledge to <strong>read NetSuite data in Power BI (NetSuite CRM &#8211; SuiteTalk)</strong>. We will use ZappySys XML Driver to call Search function in NetSuite SOAP API. If you are not familiar with SOAP API concept then we highly recommend you read <a href="https://zappysys.com/blog/call-soap-api-power-bi-read-xml-web-service-data/" target="_blank" rel="noopener">previous blog post</a>. In this post we will use Power BI as an example App to consume NetSuite data but you can use steps listed in this article to load data in any other ODBC compliant ETL / reporting app (e.g. <a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/">Excel</a>, <a href="https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/" target="_blank" rel="noopener">Qlik</a>, <a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/" target="_blank" rel="noopener">Informatica</a>, <a href="https://zappysys.com/blog/read-rest-api-using-ssrs-reports-call-json-xml-web-service/">SSRS</a>) or programming language (e.g. <a href="https://zappysys.com/blog/calling-rest-api-in-c/">C#</a>, <a href="https://zappysys.com/blog/connect-java-to-rest-api-json-soap-xml/">JAVA</a>, <a href="https://zappysys.com/blog/set-rest-python-client/">Python</a>) or <a href="https://zappysys.com/blog/import-rest-api-json-sql-server/">SQL Server (Linked Server)</a>.</p>
<p>We will look at each step in depth, how to enable SOAP Api access in NetSuite, How to register Application, how to configure NetSuite ODBC DSN, and finally how to load NetSuite data into Power BI dashboard.</p>
<p>So let&#8217;s get started. The approach listed in this article can be used to call other SOAP based API such as <a href="https://zappysys.com/blog/how-to-call-salesforce-rest-api-via-odbc-driver/" target="_blank" rel="noopener"><strong>Salesforce</strong></a>, <a href="https://zappysys.com/blog/get-data-from-workday-in-ssis-using-soap-or-rest-api/"><strong>Workday</strong></a>, <strong>SAP</strong>, Sage etc.</p>
<h2>Prerequisite</h2>
<p>Before you get started make sure following requirements are met.</p>
<ol>
<li>NetSuite CRM Login (UserID and Password)</li>
<li>Enable Web Service Feature in NetSuite</li>
<li>Obtain NetSuite Account ID</li>
<li>Obtain Application ID if you have created an App. Else Register new Netsuite Application and get Application ID</li>
<li>Download <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> (for SOAP / XML Driver)</li>
<li>Download <a href="https://powerbi.microsoft.com/en-us/downloads/" target="_blank" rel="noopener">Power BI Desktop</a> (FREE) if you have not already done it.</li>
</ol>
<h2><span id="What_is_NetSuite_CRM">What is NetSuite CRM?</span></h2>
<p>NetSuite is a CRM / ERP product. It gives you scalable cloud CRM / ERP solution targeted at high-growing, mid-sized businesses and large enterprises. It automates front- and back-office processes including: financial management, revenue management, fixed assets, order management, billing, and inventory management.</p>
<h2><span id="Getting_Started">Preparing for NetSuite WebService Call in Power BI</span></h2>
<p>For NetSuite API call we have to make sure certain settings and obtain Application ID and AccountID. So let&#8217;s get started.</p>
<div class="content_block" id="custom_post_widget-5058"><h3>How to enable NetSuite Web Service Feature</h3>
Before you call any NetSuite SOAP API (i.e. <strong>SuiteTask Web Service</strong>), First thing to get started with NetSuite SOAP API (i.e. ) is to enable Web Service Feature. Once you enable Web Service, you can programmatically access NetSuite data in your App (e.g. Power BI, Tableau, Informatica).

<a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3419926.html" target="_blank" rel="noopener">Click this link</a> to see steps to enable Web Service Feature
<div id="attachment_4616" class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?ssl=1"><img loading="lazy" decoding="async" class="wp-image-4616 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?resize=479%2C568&amp;ssl=1" sizes="(max-width: 479px) 100vw, 479px" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?w=479&amp;ssl=1 479w, https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?resize=253%2C300&amp;ssl=1 253w" alt="Enable NetSuite Web Service Feature (SuiteTalk API)" width="471" height="559" data-attachment-id="4616" data-permalink="https://zappysys.com/blog/read-netsuite-data-power-bi/netsuite-enable-web-service-features-setup-option/#main" data-orig-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?fit=479%2C568&amp;ssl=1" data-orig-size="479,568" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="netsuite-enable-web-service-features-setup-option" data-image-description="&lt;p&gt;Enable NetSuite Web Service Feature&lt;/p&gt; " data-medium-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?fit=253%2C300&amp;ssl=1" data-large-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-enable-web-service-features-setup-option.png?fit=479%2C568&amp;ssl=1" /></a>
<p class="wp-caption-text">Enable NetSuite Web Service Feature (SuiteTalk API)</p>

</div>
<h3><span id="Obtain_NetSuite_Account_ID">Obtain NetSuite Account ID</span></h3>
NetSuite Account ID is needed by Login API call. So perform following steps if you dont know account id.
<ol>
 	<li>Login to your NetSuite Portal</li>
 	<li>Click the <strong>Setup Tab</strong></li>
 	<li>In the drop-down click <strong>Integration</strong> &gt;  <strong>Web services preferences</strong></li>
 	<li>On that page you will find your Account ID (<strong>example account ID = TSTDRV1234567</strong> )</li>
</ol>
<div id="attachment_4620" class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?ssl=1"><img loading="lazy" decoding="async" class="size-full wp-image-4620" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?resize=262%2C360&amp;ssl=1" sizes="(max-width: 262px) 100vw, 262px" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?w=262&amp;ssl=1 262w, https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?resize=218%2C300&amp;ssl=1 218w" alt="Obtain NetSuite Account ID (Needed for Web Service Login)" width="254" height="349" data-attachment-id="4620" data-permalink="https://zappysys.com/blog/read-netsuite-data-power-bi/obtain-netsuite-accountid/#main" data-orig-file="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?fit=262%2C360&amp;ssl=1" data-orig-size="262,360" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="obtain-netsuite-accountid" data-image-description="&lt;p&gt;Obtain NetSuite Account ID (Needed for Web Service Login)&lt;/p&gt; " data-medium-file="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?fit=218%2C300&amp;ssl=1" data-large-file="https://zappysys.com/blog/wp-content/uploads/2018/08/obtain-netsuite-accountid.png?fit=262%2C360&amp;ssl=1" /></a>
<p class="wp-caption-text">Obtain NetSuite Account ID (Needed for Web Service Login)</p>

</div>
<h3><span id="Obtain_NetSuite_Application_ID">Obtain NetSuite Application ID</span></h3>
Once you have account ID now we need to get Application ID. For that follow these steps.
<ol>
 	<li>Login to your NetSuite Portal</li>
 	<li>Click the <strong>Setup Tab</strong></li>
 	<li>In the drop-down click <strong>Integration</strong> &gt;  <strong>Manage Integrations</strong></li>
 	<li>On that page you will find your existing Applications along with Account ID / Status (<strong>example Application ID = AE2EACFD-1234-1222-1111-12345544555</strong> )</li>
 	<li>If you don’t have any application created yet then just click on New.</li>
</ol>
<div id="attachment_4619" class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?ssl=1"><img loading="lazy" decoding="async" class="size-full wp-image-4619" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?resize=660%2C293&amp;ssl=1" sizes="(max-width: 660px) 100vw, 660px" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?w=660&amp;ssl=1 660w, https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?resize=300%2C133&amp;ssl=1 300w" alt="Create new App / Get NetSuite Application ID" width="652" height="289" data-attachment-id="4619" data-permalink="https://zappysys.com/blog/read-netsuite-data-power-bi/netsuite-obtain-application-for-soap-api-call/#main" data-orig-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?fit=660%2C293&amp;ssl=1" data-orig-size="660,293" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="netsuite-obtain-application-for-soap-api-call" data-image-description="&lt;p&gt;Create new App / Get NetSuite Application ID&lt;/p&gt; " data-medium-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?fit=300%2C133&amp;ssl=1" data-large-file="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-obtain-application-for-soap-api-call.png?fit=660%2C293&amp;ssl=1" /></a>
<p class="wp-caption-text">Create new App / Get NetSuite Application ID</p>

</div>
<h3></h3></div>
<div class="content_block" id="custom_post_widget-5098"><h2>Understanding how NetSuite SOAP API Call works</h2>
In this section we will briefly understand how NetSuite SOAP API call works. When you use ZappySys Driver / Component it will take care many details for you but still you have to configure correct XML Body.

There are two steps involved before you can call any SOAP API in NetSuite.
<ol>
 	<li>Call <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3512617.html" target="_blank" rel="noopener">Login method</a> and extract JSESSIONID from response Cookie (This token expires after some time)</li>
 	<li>Call any other API (Pass obtained JSESSIONID token in Cookie header)</li>
</ol>
<h3>NetSuite Login Call</h3>
<strong>Request</strong>
<pre class="lang:default highlight:0 decode:true">POST https://webservices.netsuite.com/services/NetSuitePort_2017_1
Content-Type: text/xml;charset=UTF-8
SOAPAction: "login"
Accept-Encoding: gzip, deflate

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;xxxxxxxxxxxxxx&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
    &lt;login xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;passport&gt;
        &lt;email xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;xxxxxxxxxxxxx&lt;/email&gt;
        &lt;password xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;xxxxxxxxxxxx&lt;/password&gt;
        &lt;account xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;TSTxxxxxxxxxxxxxxx&lt;/account&gt;
        &lt;role internalId="3" xmlns="urn:core_2017_1.platform.webservices.netsuite.com" /&gt;
      &lt;/passport&gt;
    &lt;/login&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
<strong>Response</strong>

Notice JSESSIONID=6xI6xxxxxxxxx in the login call response below. This Session ID can be used to call next call. ZappySys HTTP Connection Manager configured with <a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic Token</a> option can extract Cookie and reuse it until its expired (1 hour by default).
<pre class="lang:default highlight:0 decode:true">HTTP/1.1 200 OK
Date: Wed, 03 Oct 2018 16:50:41 GMT
Content-Length: 1676
Content-Type: text/xml; charset=utf-8
X-N-OperationId: 777274f6-49c6-4883-bcd1-1d70df90d78e
Strict-Transport-Security: max-age=31536000
NS_RTIMER_COMPOSITE: 13633xxxxxxxxx:70617xxxxxxxxxxxxx36F6D:80
Set-Cookie: JSESSIONID=6xI61rdFt26pxxxxxxxxxxxxxxxqvJIMlu!-17981123445; path=/; secure; HttpOnly
Set-Cookie: NS_VER=2018.1.0; domain=webservices.netsuite.com; path=/
Set-Cookie: NS_ROUTING_VERSION=LAGGING; path=/
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent
Keep-Alive: timeout=10, max=990
Connection: Keep-Alive

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;soapenv:Header&gt;
    &lt;platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformMsgs:nsId&gt;WEBSERVICES_xxxxxxxxxxxxxxxxx_9fc719&lt;/platformMsgs:nsId&gt;
    &lt;/platformMsgs:documentInfo&gt;
  &lt;/soapenv:Header&gt;
  &lt;soapenv:Body&gt;
    &lt;loginResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;sessionResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
        &lt;ns1:status isSuccess="true" xmlns:ns1="urn:core_2017_1.platform.webservices.netsuite.com"/&gt;
        &lt;ns2:wsRoleList xmlns:ns2="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
          &lt;ns2:wsRole&gt;
            &lt;ns2:role internalId="3"&gt;
              &lt;ns2:name&gt;Administrator&lt;/ns2:name&gt;
            &lt;/ns2:role&gt;
            &lt;ns2:isDefault&gt;false&lt;/ns2:isDefault&gt;
            &lt;ns2:isInactive&gt;false&lt;/ns2:isInactive&gt;
          &lt;/ns2:wsRole&gt;
          &lt;ns2:wsRole&gt;
            &lt;ns2:role internalId="15"&gt;
              &lt;ns2:name&gt;Employee Center&lt;/ns2:name&gt;
            &lt;/ns2:role&gt;
            &lt;ns2:isDefault&gt;false&lt;/ns2:isDefault&gt;
            &lt;ns2:isInactive&gt;false&lt;/ns2:isInactive&gt;
          &lt;/ns2:wsRole&gt;
      &lt;/sessionResponse&gt;
    &lt;/loginResponse&gt;
  &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
&nbsp;
<h3>NetSuite API Call ( getAll method )</h3>
Now once you have JSESSIONID extracted you can pass it to call next API call as below. For example here is how to call <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3489077.html" target="_blank" rel="noopener"><strong>getAll</strong></a> method to obtain currency list and exchange rates. If you are not sure how to craft correct Request XML then use tool like <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">SoapUI</a>.

You can use NetSuite WSDL file <a href="http://www.netsuite.com/portal/developers/resources/suitetalk-documentation.shtml" target="_blank" rel="noopener">from here</a> and import it in <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">SoapUI</a>.

<a href="https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-create-netsuite-soap-api-request-xml.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5103" src="https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-create-netsuite-soap-api-request-xml.png" alt="" width="523" height="386" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-create-netsuite-soap-api-request-xml.png 523w, https://zappysys.com/blog/wp-content/uploads/2018/10/soapui-create-netsuite-soap-api-request-xml-300x221.png 300w" sizes="(max-width: 523px) 100vw, 523px" /></a>

&nbsp;

<strong>Request</strong>

See how Cookie is passed for authentication purpose. Again you can pass this manually or use HTTP connection with <a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic Token</a> to pass it automatically along with each API call.
<pre class="lang:default highlight:0 decode:true">POST https://webservices.netsuite.com/services/NetSuitePort_2017_1
Content-Type: text/xml;charset=UTF-8
SOAPAction: "getAll"
Cookie: JSESSIONID=6xI61rxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxMlu!-1798141234
Accept-Encoding: gzip, deflate

&lt;soapenv:Envelope 
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:urn="urn:messages_2018_1.platform.webservices.netsuite.com" 
   xmlns:urn1="urn:core_2018_1.platform.webservices.netsuite.com"&gt;
   &lt;soapenv:Body&gt;
      &lt;urn:getAll&gt;
         &lt;record recordType="currency"/&gt; 
      &lt;/urn:getAll&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
<strong>Response</strong>
<pre class="lang:default highlight:0 decode:true">HTTP/1.1 200 OK
Date: Wed, 03 Oct 2018 16:50:42 GMT
Content-Length: 9648
Content-Type: text/xml; charset=utf-8
X-N-OperationId: 1b2989e4-b930-4a72-b471-00a8e131dfd4
NS_RTIMER_COMPOSITE: 21403xxxxxx:706172746E65xxxxxxxxxxxx6F6D:80
Strict-Transport-Security: max-age=31536000
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;soapenv:Header&gt;
    &lt;platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformMsgs:nsId&gt;WEBSERVICES_TSTDRV1439151_100320189871507121000128715_6ae8e8&lt;/platformMsgs:nsId&gt;
    &lt;/platformMsgs:documentInfo&gt;
  &lt;/soapenv:Header&gt;
  &lt;soapenv:Body&gt;
    &lt;getAllResponse xmlns="urn:messages_2018_1.platform.webservices.netsuite.com"&gt;
      &lt;platformCore:getAllResult xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
        &lt;platformCore:status isSuccess="true" /&gt;
        &lt;platformCore:totalRecords&gt;11&lt;/platformCore:totalRecords&gt;
        &lt;platformCore:recordList&gt;
          &lt;platformCore:record internalId="1" xsi:type="listAcct:Currency" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:name&gt;USD&lt;/listAcct:name&gt;
            &lt;listAcct:symbol&gt;USD&lt;/listAcct:symbol&gt;
            &lt;listAcct:isBaseCurrency&gt;true&lt;/listAcct:isBaseCurrency&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:overrideCurrencyFormat&gt;false&lt;/listAcct:overrideCurrencyFormat&gt;
            &lt;listAcct:displaySymbol&gt;$&lt;/listAcct:displaySymbol&gt;
            &lt;listAcct:symbolPlacement&gt;_beforeNumber&lt;/listAcct:symbolPlacement&gt;
            &lt;listAcct:locale&gt;_unitedStatesEnglish&lt;/listAcct:locale&gt;
            &lt;listAcct:formatSample&gt;$1,234.56&lt;/listAcct:formatSample&gt;
            &lt;listAcct:exchangeRate&gt;1.0&lt;/listAcct:exchangeRate&gt;
            &lt;listAcct:fxRateUpdateTimezone&gt;_americaNewYork&lt;/listAcct:fxRateUpdateTimezone&gt;
            &lt;listAcct:currencyPrecision&gt;_two&lt;/listAcct:currencyPrecision&gt;
          &lt;/platformCore:record&gt;
          &lt;platformCore:record internalId="2" xsi:type="listAcct:Currency" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:name&gt;GBP&lt;/listAcct:name&gt;
            &lt;listAcct:symbol&gt;GBP&lt;/listAcct:symbol&gt;
            &lt;listAcct:isBaseCurrency&gt;true&lt;/listAcct:isBaseCurrency&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:overrideCurrencyFormat&gt;false&lt;/listAcct:overrideCurrencyFormat&gt;
            &lt;listAcct:displaySymbol&gt;£&lt;/listAcct:displaySymbol&gt;
            &lt;listAcct:symbolPlacement&gt;_beforeNumber&lt;/listAcct:symbolPlacement&gt;
            &lt;listAcct:locale&gt;_unitedKingdomEnglish&lt;/listAcct:locale&gt;
            &lt;listAcct:formatSample&gt;£1,234.56&lt;/listAcct:formatSample&gt;
            &lt;listAcct:exchangeRate&gt;1.33165497&lt;/listAcct:exchangeRate&gt;
            &lt;listAcct:fxRateUpdateTimezone&gt;_americaNewYork&lt;/listAcct:fxRateUpdateTimezone&gt;
            &lt;listAcct:currencyPrecision&gt;_two&lt;/listAcct:currencyPrecision&gt;
          &lt;/platformCore:record&gt;
          &lt;platformCore:record internalId="3" xsi:type="listAcct:Currency" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:name&gt;CAD&lt;/listAcct:name&gt;
            &lt;listAcct:symbol&gt;CAD&lt;/listAcct:symbol&gt;
            &lt;listAcct:isBaseCurrency&gt;true&lt;/listAcct:isBaseCurrency&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:overrideCurrencyFormat&gt;false&lt;/listAcct:overrideCurrencyFormat&gt;
            &lt;listAcct:displaySymbol&gt;$&lt;/listAcct:displaySymbol&gt;
            &lt;listAcct:symbolPlacement&gt;_beforeNumber&lt;/listAcct:symbolPlacement&gt;
            &lt;listAcct:locale&gt;_canadaEnglish&lt;/listAcct:locale&gt;
            &lt;listAcct:formatSample&gt;$1,234.56&lt;/listAcct:formatSample&gt;
            &lt;listAcct:exchangeRate&gt;0.76457273&lt;/listAcct:exchangeRate&gt;
            &lt;listAcct:fxRateUpdateTimezone&gt;_americaNewYork&lt;/listAcct:fxRateUpdateTimezone&gt;
            &lt;listAcct:currencyPrecision&gt;_two&lt;/listAcct:currencyPrecision&gt;
          &lt;/platformCore:record&gt;
        &lt;/platformCore:recordList&gt;
      &lt;/platformCore:getAllResult&gt;
    &lt;/getAllResponse&gt;
  &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
<h3>NetSuite Search API (Pagination Example)</h3>
Now let's look at more complex API calls where Pagination is needed. For example when you call search API to pull data from specific table (e.g. Account) you need to loop through multiple responses until all records are consumed.

<strong>Request (Page-1)</strong>
<pre class="lang:default highlight:0 decode:true">POST https://webservices.netsuite.com/services/NetSuitePort_2017_1
Content-Type: text/xml; charset=utf-8
SOAPAction: "search"
Cookie: JSESSIONID=BKQ7xxxxxxxxxxxx4Ug!-995xxxxxx
Accept-Encoding: gzip, deflate

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;xxxxxxxxxxxxxxx&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
    &lt;searchPreferences xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;pageSize&gt;50&lt;/pageSize&gt;
    &lt;/searchPreferences&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
    &lt;search xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchRecord xmlns:q1="urn:accounting_2017_1.lists.webservices.netsuite.com" xsi:type="q1:AccountSearch"&gt;
        &lt;q1:basic&gt;
          &lt;description operator="doesNotContain" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;x&lt;/searchValue&gt;
          &lt;/description&gt;
          &lt;name operator="contains" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;a&lt;/searchValue&gt;
          &lt;/name&gt;
        &lt;/q1:basic&gt;
      &lt;/searchRecord&gt;
    &lt;/search&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
&nbsp;

<strong>Response (Page-1)</strong>

In below response notice 2 things. SearchId is like a cursor id which you have to pass for each page you request after first page. And you can stop looping after 4th page based on totalPages count.

<strong>platformCore:searchId</strong> = WEBSERVICES_ABCD_12345-xxxxxxxxx
<strong>platformCore:totalPages</strong> = 4
<pre class="lang:default highlight:0 decode:true">HTTP/1.1 200 OK
Date: Wed, 03 Oct 2018 18:40:33 GMT
Content-Length: 49266
Content-Type: text/xml; charset=utf-8
X-N-OperationId: c1e79336-63b7-4eb7-989e-5c3d24c56891
NS_RTIMER_COMPOSITE: 118xxxxxxxx:70617xxxxxxxxxxxxxxxxxxxxxD:80
Strict-Transport-Security: max-age=31536000
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;soapenv:Header&gt;
    &lt;platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformMsgs:nsId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/platformMsgs:nsId&gt;
    &lt;/platformMsgs:documentInfo&gt;
  &lt;/soapenv:Header&gt;
  &lt;soapenv:Body&gt;
    &lt;searchResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformCore:searchResult xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
        &lt;platformCore:status isSuccess="true" /&gt;
        &lt;platformCore:totalRecords&gt;193&lt;/platformCore:totalRecords&gt;
        &lt;platformCore:pageSize&gt;50&lt;/platformCore:pageSize&gt;
        &lt;platformCore:totalPages&gt;4&lt;/platformCore:totalPages&gt;
        &lt;platformCore:pageIndex&gt;1&lt;/platformCore:pageIndex&gt;
        &lt;platformCore:searchId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/platformCore:searchId&gt;
        &lt;platformCore:recordList&gt;
          &lt;platformCore:record internalId="1" xsi:type="listAcct:Account" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:acctType&gt;_bank&lt;/listAcct:acctType&gt;
            &lt;listAcct:acctNumber&gt;1111&lt;/listAcct:acctNumber&gt;
            &lt;listAcct:acctName&gt;Checking&lt;/listAcct:acctName&gt;
            &lt;listAcct:includeChildren&gt;false&lt;/listAcct:includeChildren&gt;
            &lt;listAcct:currency internalId="1"&gt;
              &lt;platformCore:name&gt;USD&lt;/platformCore:name&gt;
            &lt;/listAcct:currency&gt;
            &lt;listAcct:generalRate&gt;_current&lt;/listAcct:generalRate&gt;
            &lt;listAcct:parent internalId="246"&gt;
              &lt;platformCore:name&gt;xxxxxxxxxxxxxxxxxxx&lt;/platformCore:name&gt;
            &lt;/listAcct:parent&gt;
            &lt;listAcct:cashFlowRate&gt;_average&lt;/listAcct:cashFlowRate&gt;
            &lt;listAcct:description&gt;Checking&lt;/listAcct:description&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:inventory&gt;false&lt;/listAcct:inventory&gt;
            &lt;listAcct:eliminate&gt;false&lt;/listAcct:eliminate&gt;
            &lt;listAcct:revalue&gt;true&lt;/listAcct:revalue&gt;
          &lt;/platformCore:record&gt;
          &lt;platformCore:record internalId="2" xsi:type="listAcct:Account" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:acctType&gt;_bank&lt;/listAcct:acctType&gt;
            &lt;listAcct:acctNumber&gt;22222&lt;/listAcct:acctNumber&gt;
            &lt;listAcct:acctName&gt;Savings&lt;/listAcct:acctName&gt;
            &lt;listAcct:includeChildren&gt;false&lt;/listAcct:includeChildren&gt;
            &lt;listAcct:currency internalId="1"&gt;
              &lt;platformCore:name&gt;USD&lt;/platformCore:name&gt;
            &lt;/listAcct:currency&gt;
            &lt;listAcct:generalRate&gt;_current&lt;/listAcct:generalRate&gt;
            &lt;listAcct:parent internalId="246"&gt;
              &lt;platformCore:name&gt;yyyyyyyyy&lt;/platformCore:name&gt;
            &lt;/listAcct:parent&gt;
            &lt;listAcct:cashFlowRate&gt;_average&lt;/listAcct:cashFlowRate&gt;
            &lt;listAcct:description&gt;Savings&lt;/listAcct:description&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:inventory&gt;false&lt;/listAcct:inventory&gt;
            &lt;listAcct:eliminate&gt;false&lt;/listAcct:eliminate&gt;
            &lt;listAcct:revalue&gt;true&lt;/listAcct:revalue&gt;
          &lt;/platformCore:record&gt;
          .........
          .........
          .........
          .........		  
        &lt;/platformCore:recordList&gt;
      &lt;/platformCore:searchResult&gt;
    &lt;/searchResponse&gt;
  &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
&nbsp;

<strong>Request (Page-2 and onwards)</strong>

Here is the second page request. Notice few things here. In heraders we are now sending <strong>SOAPAction: "searchMoreWithId"</strong> rather than <strong>"search"</strong>.  Also our SOAP Body is also different compared to first page request. Now we only sending <strong>pageIndex</strong> we want to fetch and <strong>searchId</strong>. We have also change <strong>&lt;search&gt;</strong> tag with <strong>&lt;searchMoreWithId&gt;</strong> under Body.
<pre class="lang:default decode:true">POST https://webservices.netsuite.com/services/NetSuitePort_2017_1
Content-Type: text/xml; charset=utf-8
SOAPAction: "searchMoreWithId"
Cookie: JSESSIONID=BKQ7xxxxxxxxxxxx4Ug!-995xxxxxx
Accept-Encoding: gzip, deflate

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;xxxxxxxxxxxxxxxxxx&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
    &lt;searchPreferences xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;pageSize&gt;50&lt;/pageSize&gt;
    &lt;/searchPreferences&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
    &lt;searchMoreWithId xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/searchId&gt;
      &lt;pageIndex&gt;2&lt;/pageIndex&gt;
    &lt;/searchMoreWithId&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
<strong>Response (Page-2 and onwards)</strong>
<pre class="lang:default decode:true  ">HTTP/1.1 200 OK
Date: Wed, 03 Oct 2018 18:40:33 GMT
Content-Length: 49266
Content-Type: text/xml; charset=utf-8
X-N-OperationId: c1e79336-63b7-4eb7-989e-5c3d24c56891
NS_RTIMER_COMPOSITE: 118xxxxxxxx:70617xxxxxxxxxxxxxxxxxxxxxD:80
Strict-Transport-Security: max-age=31536000
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;soapenv:Header&gt;
    &lt;platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformMsgs:nsId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/platformMsgs:nsId&gt;
    &lt;/platformMsgs:documentInfo&gt;
  &lt;/soapenv:Header&gt;
  &lt;soapenv:Body&gt;
    &lt;searchMoreWithIdResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;platformCore:searchResult xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
        &lt;platformCore:status isSuccess="true" /&gt;
        &lt;platformCore:totalRecords&gt;193&lt;/platformCore:totalRecords&gt;
        &lt;platformCore:pageSize&gt;50&lt;/platformCore:pageSize&gt;
        &lt;platformCore:totalPages&gt;4&lt;/platformCore:totalPages&gt;
        &lt;platformCore:pageIndex&gt;2&lt;/platformCore:pageIndex&gt;
        &lt;platformCore:searchId&gt;WEBSERVICES_ABCD_12345-xxxxxxxxx&lt;/platformCore:searchId&gt;
        &lt;platformCore:recordList&gt;
          &lt;platformCore:record internalId="1" xsi:type="listAcct:Account" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:acctType&gt;_bank&lt;/listAcct:acctType&gt;
            &lt;listAcct:acctNumber&gt;8000&lt;/listAcct:acctNumber&gt;
            &lt;listAcct:acctName&gt;Checking&lt;/listAcct:acctName&gt;
            &lt;listAcct:includeChildren&gt;false&lt;/listAcct:includeChildren&gt;
            &lt;listAcct:currency internalId="1"&gt;
              &lt;platformCore:name&gt;USD&lt;/platformCore:name&gt;
            &lt;/listAcct:currency&gt;
            &lt;listAcct:generalRate&gt;_current&lt;/listAcct:generalRate&gt;
            &lt;listAcct:parent internalId="246"&gt;
              &lt;platformCore:name&gt;xxxxxxxxxxxxxxxxxxx&lt;/platformCore:name&gt;
            &lt;/listAcct:parent&gt;
            &lt;listAcct:cashFlowRate&gt;_average&lt;/listAcct:cashFlowRate&gt;
            &lt;listAcct:description&gt;Checking&lt;/listAcct:description&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:inventory&gt;false&lt;/listAcct:inventory&gt;
            &lt;listAcct:eliminate&gt;false&lt;/listAcct:eliminate&gt;
            &lt;listAcct:revalue&gt;true&lt;/listAcct:revalue&gt;
          &lt;/platformCore:record&gt;
          &lt;platformCore:record internalId="2" xsi:type="listAcct:Account" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com"&gt;
            &lt;listAcct:acctType&gt;_bank&lt;/listAcct:acctType&gt;
            &lt;listAcct:acctNumber&gt;8001&lt;/listAcct:acctNumber&gt;
            &lt;listAcct:acctName&gt;Savings&lt;/listAcct:acctName&gt;
            &lt;listAcct:includeChildren&gt;false&lt;/listAcct:includeChildren&gt;
            &lt;listAcct:currency internalId="1"&gt;
              &lt;platformCore:name&gt;USD&lt;/platformCore:name&gt;
            &lt;/listAcct:currency&gt;
            &lt;listAcct:generalRate&gt;_current&lt;/listAcct:generalRate&gt;
            &lt;listAcct:parent internalId="246"&gt;
              &lt;platformCore:name&gt;yyyyyyyyy&lt;/platformCore:name&gt;
            &lt;/listAcct:parent&gt;
            &lt;listAcct:cashFlowRate&gt;_average&lt;/listAcct:cashFlowRate&gt;
            &lt;listAcct:description&gt;Savings&lt;/listAcct:description&gt;
            &lt;listAcct:isInactive&gt;false&lt;/listAcct:isInactive&gt;
            &lt;listAcct:inventory&gt;false&lt;/listAcct:inventory&gt;
            &lt;listAcct:eliminate&gt;false&lt;/listAcct:eliminate&gt;
            &lt;listAcct:revalue&gt;true&lt;/listAcct:revalue&gt;
          &lt;/platformCore:record&gt;
          .........
          .........
          .........
          .........		  
        &lt;/platformCore:recordList&gt;
      &lt;/platformCore:searchResult&gt;
    &lt;/searchMoreWithIdResponse&gt;
  &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
&nbsp;

&nbsp;</div>
<h2><span id="Getting_Started">Getting Started</span></h2>
<p>Now let’s check step by step instructions on <strong>how to load NetSuite data in Power BI</strong>. In this exercise we will focus on <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3519853.html" target="_blank" rel="noopener">calling search API</a> but you can call virtually any API using the same technique.</p>
<p>For detailed help on NetSuite SOAP API and other useful information check <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=book_N3412393.html" target="_blank" rel="noopener">this documentation</a>. To browse schema you can use <a href="http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_2/schema/record/account.html?mode=package" target="_blank" rel="noopener">this link</a>. From schema browser we will use Search Type name later on in this article. For example later on in this article to search accounts we will use <strong>AccountSearch</strong> as below example. This name can be found <a href="http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_2/schema/search/accountsearch.html?mode=package" target="_blank" rel="noopener">from here(click search tab)</a> You can change it to something else. For now dont worry too much until we get to that point.</p>
<div id="crayon-5bb3ef8dce2fc034493941" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover">
<div class="crayon-main">
<div class="crayon-nums-content">
<div class="crayon-num" data-line="crayon-5bb3ef8dce2fc034493941-1"></div>
</div>
<div class="crayon-pre">
<div id="crayon-5bb3ef8dce2fc034493941-1" class="crayon-line"><code><span class="crayon-o">&lt;</span><span class="crayon-e">searchRecord </span><span class="crayon-v">xmlns</span><span class="crayon-o">:</span><span class="crayon-v">q1</span><span class="crayon-o">=</span><span class="crayon-s">"urn:accounting_2017_1.lists.webservices.netsuite.com"</span> <span class="crayon-v">xsi</span><span class="crayon-o">:</span><span class="crayon-v">type</span><span class="crayon-o">=</span><span class="crayon-s">"q1:AccountSearch"</span><span class="crayon-o">&gt;</span></code></div>
</div>
</div>
<div></div>
</div>
<h3>Creating NetSuite ODBC Connection (Using ZappySys XML / SOAP Driver)</h3>
<p>Once you have all necessary information handy we can <strong>create ODBC DSN for NetSuite</strong> which can be used by any ODBC compliant app such as <strong>Power BI</strong>. Perform the following steps to set NetSuite Connection which we will use to query data (e.g. Accounts, Budget, Campaign etc).</p>
<p>&nbsp;</p>
<ol>
<li>Open start menu and search for &#8220;ODBC 64&#8221;. Launch ODBC Data sources for 64 bit<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3992" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen.png" alt="Open ODBC Data Sources from Startup menu" width="986" height="622" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen.png 986w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen-300x189.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen-768x484.png 768w" sizes="(max-width: 986px) 100vw, 986px" /></a></li>
<li>Click <strong>Add</strong> and select <strong>ZappySys XML Driver</strong>
<div id="attachment_3875" style="width: 603px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3875" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png 593w, https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver-300x232.png 300w" sizes="(max-width: 593px) 100vw, 593px" /></a><p id="caption-attachment-3875" class="wp-caption-text">ZappySys ODBC Driver for XML / SOAP API</p></div></li>
<li>Once driver UI is visible change default DSN name (e.g. change to <strong>ZS &#8211; NetSuite</strong>)</li>
<li>Click on the <strong>Load Connection String</strong> button and enter the following string after replacing below placeholders to configure the NetSuite connection. If you are unsure how to get Account ID and Application ID then check previous sections. For now dont worry about various options in the connection string. We will cover them later.<br />
Replace <strong>$$$YOUR-APPLICATION-ID$$$</strong>  (2 times) with your own Application ID<br />
Replace <strong>$$$YOUR-ACCOUNT-ID$$$</strong> with your own Account ID<br />
Replace <strong>$$$YOUR-USER-ID$$$</strong>  with your own Login ID (e.g myuser@mycompany.com)<br />
Replace <strong>$$$YOUR-PASSWORD$$$</strong>  with your own Password<br />
Replace <strong>&lt;pageSize&gt;50&lt;/pageSize&gt;</strong>  with your own value. We suggest not to go more than 200 rows per page for better performance.<br />
Replace <strong>c:\temp\netsuite.cache.db</strong> with your own path for Cache File. Caching must be ON in order to Import data in Power BI correct way. We also use CacheTtl=120 seconds (Cache Expires in 120 seconds) but adjust it longer if your data import takes long time.<br />
<pre class="crayon-plain-tag">DRIVER={ZappySys XML Driver};ElementsToTreatAsArray='platformCore:record';DataPath='https://webservices.netsuite.com/services/NetSuitePort_2017_1';DataConnectionType=HTTP;AuthScheme='JSESSIONID=';TokenUrl='https://webservices.netsuite.com/services/NetSuitePort_2017_1';TokenRequestData='&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;$$$YOUR-APPLICATION-ID$$$&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
    &lt;login xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;passport&gt;
        &lt;email xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;[$userid$]&lt;/email&gt;
        &lt;password xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;[$password$]&lt;/password&gt;
        &lt;account xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;$$$YOUR-ACCOUNT-ID$$$&lt;/account&gt;
        &lt;role internalId="3" xmlns="urn:core_2017_1.platform.webservices.netsuite.com" /&gt;
      &lt;/passport&gt;
    &lt;/login&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;';TokenRequestMethod='POST';TokenRequestContentType=TextXmlUtf8;TokenResponseValueExtractMode=Cookie;TokenRequestHeaders='SOAPAction:"login"';TokenResponseCookie='JSESSIONID';TokenAuthHeader='Cookie';UserName='$$$YOUR-USER-ID$$$';CredentialType=TokenDynamic;Password='$$$YOUR-PASSWORD$$$';Filter='$.soapenv:Envelope.soapenv:Body.search[$tag$]Response.platformCore:searchResult.platformCore:recordList.platformCore:record[*]';RequestData='&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Header&gt;
    &lt;applicationInfo xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;applicationId&gt;$$$YOUR-APPLICATION-ID$$$&lt;/applicationId&gt;
    &lt;/applicationInfo&gt;
    &lt;searchPreferences xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;pageSize&gt;50&lt;/pageSize&gt;
    &lt;/searchPreferences&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
[$tag$]
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;';RequestMethod='POST';NextUrlAttributeOrExpr='$.soapenv:Envelope.soapenv:Body.search[$tag$]Response.platformCore:searchResult.platformCore:searchId';FirstPageBodyPart='    &lt;search xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchRecord xmlns:q1="urn:accounting_2017_1.lists.webservices.netsuite.com" xsi:type="q1:AccountSearch"&gt;
        &lt;q1:basic&gt;
		&lt;!--
          &lt;description operator="doesNotContain" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;x&lt;/searchValue&gt;
          &lt;/description&gt;
          &lt;name operator="contains" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;a&lt;/searchValue&gt;
          &lt;/name&gt;
		 --&gt; 
        &lt;/q1:basic&gt;
      &lt;/searchRecord&gt;
    &lt;/search&gt;';NextPageBodyPart='    &lt;searchMoreWithId xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchId&gt;[$pagetoken$]&lt;/searchId&gt;
      &lt;pageIndex&gt;[$pagenumber$]&lt;/pageIndex&gt;
    &lt;/searchMoreWithId&gt;';PagingMaxPagesExpr='$.soapenv:Envelope.soapenv:Body.searchResponse.platformCore:searchResult.platformCore:totalPages';HasDifferentNextPageInfo=True;EnablePageTokenForBody=True;PagePlaceholders='header=|MoreWithId;filter=|MoreWithId';RequestHeaders='Content-Type: text/xml; charset=utf-8 || SOAPAction: "search[$tag$]"';CachingMode=All;CacheStorage=File;CacheEntryTtl=120;CacheFileLocation='c:\temp\netsuite.cache.db'</pre>
&nbsp;</p>
<div id="attachment_4753" style="width: 816px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/zappysys-odbc-driver-load-connectionstring.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4753" class="size-full wp-image-4753" src="https://zappysys.com/blog/wp-content/uploads/2018/08/zappysys-odbc-driver-load-connectionstring.png" alt="ZappySys ODBC Driver Load Connection String - NetSuite Connection Example" width="806" height="696" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/zappysys-odbc-driver-load-connectionstring.png 806w, https://zappysys.com/blog/wp-content/uploads/2018/08/zappysys-odbc-driver-load-connectionstring-300x259.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/zappysys-odbc-driver-load-connectionstring-768x663.png 768w" sizes="(max-width: 806px) 100vw, 806px" /></a><p id="caption-attachment-4753" class="wp-caption-text">ZappySys ODBC Driver Load Connection String &#8211; NetSuite Connection Example</p></div></li>
<li>After configuration your screen may look like below. You can also click on <strong>Advanced View</strong> (Radio button) to see some Advanced properties (e.g. Caching Properties such as <strong>CachingMode</strong>, <strong>CacheFileLocation</strong> and Advanced Pagination Properties such as <strong>PagingMaxPagesExpr</strong>, <strong>HasDifferentNextPageInfo</strong>, <strong>NextPageBodyPart</strong>, <strong>FirstPageBodyPart, EnablePageTokenForBody, PagePlaceholders</strong> )<br />
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Notice <strong>[$tag$]</strong> in Body, Header and Filter. This gets replaced at runtime based on some settings we did for pagination (see next 2 screenshots). NetSuite API has different Header, Body and Filter need for First page vs Next Pages so it needs special configuration. [$tag$] in Body gets replacement based on <strong>FirstPageBodyPart</strong> and <strong>NextPageBodyPart</strong> properties found on Advanced View under Pagination. <strong>[$tag$]</strong> used in Filter, Header or any other place gets its replacements from <strong>PagePlaceHolders</strong> Property found on Advanced View (see filter=firstPartString|nextPartString;header=firstPartString|nextPartString). Use pipe (vertical bar to separate first part placeholder and next part placeholder) In our case we use blank for first part.</div></div>
<div id="attachment_4625" style="width: 817px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-xml-driver-netsuite-connection-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4625" class="size-full wp-image-4625" src="https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-xml-driver-netsuite-connection-settings.png" alt="NetSuite ODBC Connection Settings (ZappySys XML Driver)" width="807" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-xml-driver-netsuite-connection-settings.png 807w, https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-xml-driver-netsuite-connection-settings-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-xml-driver-netsuite-connection-settings-768x668.png 768w" sizes="(max-width: 807px) 100vw, 807px" /></a><p id="caption-attachment-4625" class="wp-caption-text">NetSuite ODBC Connection Settings (ZappySys XML Driver)</p></div></li>
<li>Here is what it looks like on Advanced Tab.
<div id="attachment_4751" style="width: 747px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-odbc-driver-pagination-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4751" class="size-full wp-image-4751" src="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-odbc-driver-pagination-settings.png" alt="NetSuite Connection Settings - ODBC XML Driver Advanced View (Pagination, Caching, Logging and other properties not found in Simple Mode)" width="737" height="911" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-odbc-driver-pagination-settings.png 737w, https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-odbc-driver-pagination-settings-243x300.png 243w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-4751" class="wp-caption-text">ODBC XML Driver &#8211; Ádvanced View (Pagination, Caching, Logging and other properties not found in Simple Mode)</p></div></li>
<li>Now go to preview tab and click <strong>Preview Data</strong> button. You will see upto 100 sample records. Using below query it will use all options from UI (No override in query).<strong>SELECT * from $</strong>
<div id="attachment_4627" style="width: 818px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-netsuite-connection-query-data-preview.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4627" class="size-full wp-image-4627" src="https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-netsuite-connection-query-data-preview.png" alt="Preview NetSuite data using ODBC Driver" width="808" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-netsuite-connection-query-data-preview.png 808w, https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-netsuite-connection-query-data-preview-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/odbc-netsuite-connection-query-data-preview-768x667.png 768w" sizes="(max-width: 808px) 100vw, 808px" /></a><p id="caption-attachment-4627" class="wp-caption-text">Preview NetSuite data (Query Accounts) using ODBC Driver</p></div></li>
<li>Now let&#8217;s change our default query a bit  to get list of Expense Category (i.e. <a href="http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_2/schema/search/accountsearch.html?mode=package" target="_blank" rel="noopener">ExpenseCategorySearch</a>). As you see we change FirstRequestBody a little bit (change <strong>q1:ExpenseCategorySearch</strong>). We also removed some unwanted columns from preview by setting <strong>IncludeParentColumns=&#8217;false&#8217;</strong><br />
<pre class="crayon-plain-tag">SELECT * FROM $
WITH(
	FirstPageBodyPart='    &lt;search xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchRecord xmlns:q1="urn:accounting_2017_1.lists.webservices.netsuite.com" xsi:type="q1:ExpenseCategorySearch"&gt;
        &lt;q1:basic&gt;
          &lt;description operator="doesNotContain" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;Some-String-Goes-Here&lt;/searchValue&gt;
          &lt;/description&gt;
          &lt;name operator="contains" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;Some-String-Goes-Here&lt;/searchValue&gt;
          &lt;/name&gt;
        &lt;/q1:basic&gt;
      &lt;/searchRecord&gt;
    &lt;/search&gt;',
    IncludeParentColumns='False'
)</pre>
We have commented SearchQuery portion to make it simple but you can learn more about how to write search query from here</p>
<p>Here is one more example of query which combines <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3519853.html#bridgehead_N3519940">Basic Search</a> and <a href="https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3519853.html" target="_blank" rel="noopener">Advanced Search</a></p>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Pay close attention to namespace prefix in SOAP code you copy from Help center. It may be using different prefix than our original connection string (e.g. we use q1:xxxxx at some places but online sample may use ns1, ns2, ns3 &#8230;.)</div></div>
<pre class="crayon-plain-tag">SELECT * FROM $
WITH(
	FirstPageBodyPart='
    &lt;search xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchRecord xsi:type="ns4:ContactSearch" xmlns:ns4="urn:relationships_2017_1.lists.webservices.netsuite.com"&gt;
        &lt;ns4:basic xsi:type="ns5:ContactSearchBasic" xmlns:ns5="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
          &lt;ns5:email operator="contains" xsi:type="ns6:SearchStringField" xmlns:ns6="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;ns6:searchValue xsi:type="xsd:string"&gt;.com&lt;/ns6:searchValue&gt;
          &lt;/ns5:email&gt;
        &lt;/ns4:basic&gt;
        &lt;ns4:customerJoin xsi:type="ns7:CustomerSearchBasic" xmlns:ns7="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
          &lt;ns7:entityId operator="contains" xsi:type="ns8:SearchStringField" xmlns:ns8="urn:core_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;ns8:searchValue xsi:type="xsd:string"&gt;C&lt;/ns8:searchValue&gt;
          &lt;/ns7:entityId&gt;
        &lt;/ns4:customerJoin&gt;
      &lt;/searchRecord&gt;
    &lt;/search&gt;',
    IncludeParentColumns='False'
)</pre>
&nbsp;</p>
<div id="attachment_4628" style="width: 784px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-search-api-example-basicsearch-advancedsearch.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4628" class="size-full wp-image-4628" src="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-search-api-example-basicsearch-advancedsearch.png" alt="NetSuite Search API Example (Mixing BasicSearch / AdvancedSearch with JOIN)" width="774" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-search-api-example-basicsearch-advancedsearch.png 774w, https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-search-api-example-basicsearch-advancedsearch-300x284.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/netsuite-search-api-example-basicsearch-advancedsearch-768x727.png 768w" sizes="(max-width: 774px) 100vw, 774px" /></a><p id="caption-attachment-4628" class="wp-caption-text">NetSuite Search API Example (Mixing BasicSearch / AdvancedSearch with JOIN)</p></div></li>
<li>Copy your Final Query you like to use to import NetSuite data in Power BI</li>
<li>Click OK to save DSN</li>
</ol>
<p>&nbsp;</p>
<h3>Import NetSuite data in Power BI</h3>
<p>Now lets perform the final step to import our NetSuite Query to Power BI. Assume that we want to import Contacts in Power BI to report them by demographics or some other criteria.</p>
<ol>
<li>Open Power BI Desktop</li>
<li>Click on <strong>Get Data</strong> &gt; <strong>More Data&#8230;</strong> &gt; <strong>Other</strong> &gt; <strong>ODBC</strong>
<div id="attachment_3945" style="width: 545px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-data-xml-soap-web-service-call-odbc-xml-api-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3945" class="size-full wp-image-3945" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-data-xml-soap-web-service-call-odbc-xml-api-driver.png" alt="Import SOAP API in Power BI (Using ZappySys XML ODBC Driver)" width="535" height="590" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-data-xml-soap-web-service-call-odbc-xml-api-driver.png 535w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-data-xml-soap-web-service-call-odbc-xml-api-driver-272x300.png 272w" sizes="(max-width: 535px) 100vw, 535px" /></a><p id="caption-attachment-3945" class="wp-caption-text">Import SOAP API in Power BI (Using ZappySys XML ODBC Driver)</p></div></li>
<li>Select your <strong>ODBC DSN Source</strong> from the dropdown (Assuming you have created a ODBC Data Source using ZappySys XML Driver – See the previous Section)</li>
<li>Expand <strong>Advanced Options</strong> to enter custom Query.</li>
<li>Enter your SOAP API call SQL query here. For example purpose, we will use below query to get all account using NetSuite Search Web service.<br />
<pre class="crayon-plain-tag">SELECT * FROM $
WITH(
	FirstPageBodyPart='    &lt;search xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"&gt;
      &lt;searchRecord xmlns:q1="urn:accounting_2017_1.lists.webservices.netsuite.com" xsi:type="q1:AccountSearch"&gt;
        &lt;q1:basic&gt;
        &lt;!--
          &lt;description operator="doesNotContain" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;x&lt;/searchValue&gt;
          &lt;/description&gt;
          &lt;name operator="contains" xmlns="urn:common_2017_1.platform.webservices.netsuite.com"&gt;
            &lt;searchValue xmlns="urn:core_2017_1.platform.webservices.netsuite.com"&gt;a&lt;/searchValue&gt;
          &lt;/name&gt;
          --&gt;
        &lt;/q1:basic&gt;
      &lt;/searchRecord&gt;
    &lt;/search&gt;',
    IncludeParentColumns='False'
)</pre>
&nbsp;</p>
<div id="attachment_3946" style="width: 952px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3946" class="size-full wp-image-3946" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql.png" alt="Enter custom SQL to load SOAP Web Service Data in Power BI (ZappySys XML Driver)" width="942" height="713" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql.png 942w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql-300x227.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-import-soap-api-xml-web-service-advanced-options-sql-768x581.png 768w" sizes="(max-width: 942px) 100vw, 942px" /></a><p id="caption-attachment-3946" class="wp-caption-text">Import NetSuite SOAP Web Service Data in Power BI (ZappySys XML Driver)</p></div></li>
<li>Once you see data preview click OK to import.</li>
<li>After data import is done you can edit your dataset (e.g. remove unwanted columns)</li>
<li>You can also edit Source query after data is imported (See below)
<div id="attachment_3947" style="width: 829px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3947" class="size-full wp-image-3947" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import.png" alt="Edit Power BI Data Source SQL after SOAP Web Service Import" width="819" height="502" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import.png 819w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import-300x184.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import-768x471.png 768w" sizes="(max-width: 819px) 100vw, 819px" /></a><p id="caption-attachment-3947" class="wp-caption-text">Edit Power BI Data Source SQL after REST / SOAP Web Service Import</p></div></li>
<li>That&#8217;s it. You can now create your dashboards using NetSuite data. See below example.
<div id="attachment_4633" style="width: 823px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4633" class="size-full wp-image-4633" src="https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard.png" alt="Import NetSuite data in Power BI dashboard" width="813" height="481" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard.png 813w, https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard-300x177.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/import-netsuite-data-in-power-bi-dashboard-768x454.png 768w" sizes="(max-width: 813px) 100vw, 813px" /></a><p id="caption-attachment-4633" class="wp-caption-text">Import NetSuite data in Power BI dashboard</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>How to debug Web Requests using Fiddler</h2>
<p>There will be a time you like to see RAW HTTP Requests generated by driver for NetSuite SOAP API.  If you like to do that <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">check this article</a>.</p>
<h2>How to call other NetSuite SOAP API</h2>
<p>So far we have seen only search API to query data. But there are many other SOAP APIs which can be consumed using approach listed in this article. <a href="https://zappysys.com/blog/call-soap-api-power-bi-read-xml-web-service-data/" target="_blank" rel="noopener">Check this article</a> to learn more how to call any SOAP API using ZappySys XML Driver. It shows techniques to use tool called SoapUI. You can use NetSuite WSDL file <a href="http://www.netsuite.com/portal/developers/resources/suitetalk-documentation.shtml" target="_blank" rel="noopener">from here</a> copy link listed on that page and use it to import in SoapUI.</p>
<h2>Conclusion</h2>
<p>Consuming data from NetSuite API or any XML / SOAP based API in your Reporting / ETL apps can be tricky. But we have seen how to solve this challenging task using ZappySys XML Driver in few clicks. <a href="https://zappysys.com/onlinehelp/odbc-powerpack/">Download ODBC PowerPack</a> and explore many other API integration scenarios not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/read-netsuite-data-power-bi/">How to read NetSuite data in Power BI</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Qlik REST Connector Examples &#8211; Read JSON / XML API</title>
		<link>https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Tue, 10 Jul 2018 21:59:40 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Qlik]]></category>
		<category><![CDATA[qlik]]></category>
		<category><![CDATA[qlik sense]]></category>
		<category><![CDATA[qlikview]]></category>
		<category><![CDATA[reast api]]></category>
		<category><![CDATA[soap]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4410</guid>

					<description><![CDATA[<p>Introduction In this article, we will learn to create a Qlik REST connector to OneDrive, Google, and other services. Qlik is a very powerful tool to analyze data from multiple sources and visualize, create relations and charts. It is a simple, but powerful tool used to visualize data. In this tutorial, we will show how to get [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/">Qlik REST Connector Examples &#8211; Read JSON / XML API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/logo-qlik-sense.png"><img loading="lazy" decoding="async" class="alignleft wp-image-4420" src="https://zappysys.com/blog/wp-content/uploads/2018/07/logo-qlik-sense-150x150.png" alt="QlikSense logo" width="107" height="107" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/logo-qlik-sense-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/07/logo-qlik-sense.png 224w" sizes="(max-width: 107px) 100vw, 107px" /></a>In this article, we will learn to create a Qlik REST connector to OneDrive, Google, and other services.</p>
<p>Qlik is a very powerful tool to analyze data from multiple sources and visualize, create relations and charts. It is a simple, but powerful tool used to visualize data.</p>
<p>In this tutorial, we will show how to get data from the REST API in Qlik. We will use the ZappySys <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a> which is a very useful tool used to get data from REST API, WEB API, JSON files, XML files, SOAP and OData using simple SQL queries to the data.<br />
This article will show how to extract data from Facebook, Twitter, and Google Sheets in Qlik using REST API.</p>
<h2>Requirements for Qlik REST connector</h2>
<ol>
<li>First of all, you will need Qlik Sense for Desktop.</li>
<li>Secondly, <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
</ol>
<h2>Getting started &#8211; Reading data form API</h2>
<p>We will first show how to connect to OData in JSON format.</p>
<h3>Configure ODBC Data Source for API Connection</h3>
<ol>
<li>First of all, we will access the following URL:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Orders?$format=json</pre>
</li>
<li>Secondly, in the windows start menu, Search for “ODBC” open the ODBC Data Sources.</li>
<li>Also, in the ODBC Administrator, press Add and select the ZappySys JSON<br />
Driver:</p>
<div id="attachment_4421" style="width: 471px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4421" class="wp-image-4421 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver.png" alt="REST API ODBC " width="461" height="346" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver.png 461w, https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver-300x225.png 300w" sizes="(max-width: 461px) 100vw, 461px" /></a><p id="caption-attachment-4421" class="wp-caption-text">Add ODBC JSON</p></div></li>
<li>Finally, specify the URL of step 1 and save the configuration:
<div id="attachment_4422" style="width: 812px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4422" class="size-full wp-image-4422" src="https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc.png" alt="REST API" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a><p id="caption-attachment-4422" class="wp-caption-text">URL ODBC</p></div></li>
</ol>
<h3>Reading REST API data in Qlik (via ODBC Connector)</h3>
<ol>
<li>First of all, open the Qlik Sense Desktop:
<div id="attachment_4424" style="width: 343px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4424" class="size-full wp-image-4424" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-rest-api.png" alt="Windows open Qlik Sense Desktop" width="333" height="667" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-rest-api.png 333w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-rest-api-150x300.png 150w" sizes="(max-width: 333px) 100vw, 333px" /></a><p id="caption-attachment-4424" class="wp-caption-text">Open Qlik Sense</p></div>
<div class="mceTemp"></div>
</li>
<li>Secondly, enter your login and password:
<div id="attachment_10116" style="width: 781px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-desktop-login-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10116" class="wp-image-10116 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-desktop-login-1.png" alt="qlik-desktop-login" width="771" height="523" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-desktop-login-1.png 771w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-desktop-login-1-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-desktop-login-1-768x521.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></a><p id="caption-attachment-10116" class="wp-caption-text">Login to Qlik Sense</p></div></li>
<li>Also, create a new App:
<div id="attachment_4425" style="width: 734px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-create-app.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4425" class="size-full wp-image-4425" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-create-app.png" alt="Qlik Sense create app" width="724" height="270" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-create-app.png 724w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-create-app-300x112.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-create-app-720x270.png 720w" sizes="(max-width: 724px) 100vw, 724px" /></a><p id="caption-attachment-4425" class="wp-caption-text">Create new app Qlik Sense</p></div></li>
<li>Additionally, enter your App name:
<div id="attachment_4426" style="width: 507px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-create-new-app-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4426" class="size-full wp-image-4426" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-create-new-app-rest-api.png" alt="Qlik Sense add aplication name" width="497" height="195" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-create-new-app-rest-api.png 497w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-create-new-app-rest-api-300x118.png 300w" sizes="(max-width: 497px) 100vw, 497px" /></a><p id="caption-attachment-4426" class="wp-caption-text">Add new Qlik create app</p></div></li>
<li>In addition, select the option Add data from files and other sources:
<div id="attachment_4427" style="width: 1101px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-add-data-rest-api-odbc.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4427" class="size-full wp-image-4427" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-add-data-rest-api-odbc.png" alt="Button to add data" width="1091" height="568" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-add-data-rest-api-odbc.png 1091w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-add-data-rest-api-odbc-300x156.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-add-data-rest-api-odbc-768x400.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-add-data-rest-api-odbc-1024x533.png 1024w" sizes="(max-width: 1091px) 100vw, 1091px" /></a><p id="caption-attachment-4427" class="wp-caption-text">Add data from files and folders</p></div></li>
<li>Select the ODBC data source:
<div id="attachment_4428" style="width: 1105px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-data-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4428" class="size-full wp-image-4428" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-data-source.png" alt="ODBC connector in Qlik" width="1095" height="664" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-data-source.png 1095w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-data-source-300x182.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-data-source-768x466.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-odbc-data-source-1024x621.png 1024w" sizes="(max-width: 1095px) 100vw, 1095px" /></a><p id="caption-attachment-4428" class="wp-caption-text">Select ODBC connector</p></div></li>
<li>Also, select the ZappySys DSN created in the Create Qlik REST connector to OData:
<div id="attachment_4430" style="width: 589px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-select-ODBC-DSN.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4430" class="size-full wp-image-4430" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-select-ODBC-DSN.png" alt="Select Qlik REST connector" width="579" height="394" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-select-ODBC-DSN.png 579w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-select-ODBC-DSN-300x204.png 300w" sizes="(max-width: 579px) 100vw, 579px" /></a><p id="caption-attachment-4430" class="wp-caption-text">Qlik REST connector</p></div></li>
<li>Finally, you will be able to see the data and create graphs and more. For more information about Qlik Sense refer to <a href="https://www.youtube.com/watch?v=IyI6dxWrWcc&amp;list=PLW1uf5CQ_gSrO7bIgP1xF0HowDXnG1S6l">this link</a>.
<div id="attachment_4431" style="width: 1075px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/odbc-data-displayed.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4431" class="size-full wp-image-4431" src="https://zappysys.com/blog/wp-content/uploads/2018/07/odbc-data-displayed.png" alt="Visualize Odata in Qlik" width="1065" height="460" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/odbc-data-displayed.png 1065w, https://zappysys.com/blog/wp-content/uploads/2018/07/odbc-data-displayed-300x130.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/odbc-data-displayed-768x332.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/odbc-data-displayed-1024x442.png 1024w" sizes="(max-width: 1065px) 100vw, 1065px" /></a><p id="caption-attachment-4431" class="wp-caption-text">Qlik to Odata</p></div></li>
</ol>
<h2>Other REST API Examples in Qlik</h2>
<p>Now lets look at a few more examples of other popular REST API services (JSON or XML API).</p>
<h3>Google SpreadSheet / Drive API Example in Qlik</h3>
<p>In this new example, we will connect to a Google Sheet. The Sheet is the<br />
following:</p>
<div id="attachment_4433" style="width: 298px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/rest-api-google-sheet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4433" class="size-full wp-image-4433" src="https://zappysys.com/blog/wp-content/uploads/2018/07/rest-api-google-sheet.png" alt=" REST API Google Drive" width="288" height="284" /></a><p id="caption-attachment-4433" class="wp-caption-text">Qlik to Google Sheet</p></div>
<ol>
<li>First of all, create a new ZappySys JSON Driver Connection in the ODBC.</li>
<li>Secondly, you will need to specify the following link:<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1yfNChaljZvAL-HXF4lmM4o16Paa_BZuBWSflgBssZAQ/values/A1:B4</pre>
where 1yfNChaljZvAL-HXF4lmM4o16Paa_BZuBWSflgBssZAQ is the ID of the Google Sheet and A1:B4 are the ranges of cells to retrieve:</p>
<div id="attachment_4434" style="width: 808px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/google-sheet-id-for-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4434" class="size-full wp-image-4434" src="https://zappysys.com/blog/wp-content/uploads/2018/07/google-sheet-id-for-rest-api.png" alt="File id in Google Drive" width="798" height="32" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/google-sheet-id-for-rest-api.png 798w, https://zappysys.com/blog/wp-content/uploads/2018/07/google-sheet-id-for-rest-api-300x12.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/google-sheet-id-for-rest-api-768x31.png 768w" sizes="(max-width: 798px) 100vw, 798px" /></a><p id="caption-attachment-4434" class="wp-caption-text">Google file id</p></div></li>
<li>Also, in filter enter $.values[*] and select the OAuth Connection Type and press the link to configure the OAuth connection:
<div id="attachment_4432" style="width: 969px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/rest-api-odbc-google-drive-filter.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4432" class="size-full wp-image-4432" src="https://zappysys.com/blog/wp-content/uploads/2018/07/rest-api-odbc-google-drive-filter.png" alt="REST API url drive" width="959" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/rest-api-odbc-google-drive-filter.png 959w, https://zappysys.com/blog/wp-content/uploads/2018/07/rest-api-odbc-google-drive-filter-300x220.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/rest-api-odbc-google-drive-filter-768x562.png 768w" sizes="(max-width: 959px) 100vw, 959px" /></a><p id="caption-attachment-4432" class="wp-caption-text">Google drive url</p></div></li>
<li>In addition, select Google OAuth Provider and specify the following scope and Generate a Token:
<div id="attachment_4435" style="width: 596px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/google-drive-sheet-rest-api-scopes-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4435" class="size-full wp-image-4435" src="https://zappysys.com/blog/wp-content/uploads/2018/07/google-drive-sheet-rest-api-scopes-token.png" alt="Qlink Sense REST API" width="586" height="493" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/google-drive-sheet-rest-api-scopes-token.png 586w, https://zappysys.com/blog/wp-content/uploads/2018/07/google-drive-sheet-rest-api-scopes-token-300x252.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></a><p id="caption-attachment-4435" class="wp-caption-text">OAuth REST API Qlik Sense</p></div></li>
<li>Finally, create an Application in Qlik Sense Desktop and add the ODBC DSN created in the previous step and you will have the Google Sheet data:
<div id="attachment_4437" style="width: 846px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/google-drive-sheet-values-qlik-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4437" class="size-full wp-image-4437" src="https://zappysys.com/blog/wp-content/uploads/2018/07/google-drive-sheet-values-qlik-1.png" alt="Google Sheet data displayed Qlik" width="836" height="174" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/google-drive-sheet-values-qlik-1.png 836w, https://zappysys.com/blog/wp-content/uploads/2018/07/google-drive-sheet-values-qlik-1-300x62.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/google-drive-sheet-values-qlik-1-768x160.png 768w" sizes="(max-width: 836px) 100vw, 836px" /></a><p id="caption-attachment-4437" class="wp-caption-text">Display data REST</p></div></li>
</ol>
<h3>Twitter REST API Example in Qlik</h3>
<p>In this new section, we will show how to connect to Twitter and get the<br />
information in Qlik using REST.</p>
<ol>
<li>First of all, we will use the ODBC Administrator to use the ZappySys ODBC PowerPack and select the ZappySys JSON Driver.</li>
<li>Secondly, we will enter the following URL in the ZS JSON Drive:<br />
<pre class="crayon-plain-tag">https://api.twitter.com/1.1/statuses/user_timeline.json?</pre>
</li>
<li>Also in connection type, select OAuth:
<div id="attachment_4439" style="width: 596px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/twitter-ouath-token-qlik.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4439" class="size-full wp-image-4439" src="https://zappysys.com/blog/wp-content/uploads/2018/07/twitter-ouath-token-qlik.png" alt="Qlik connect to Twitter" width="586" height="493" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/twitter-ouath-token-qlik.png 586w, https://zappysys.com/blog/wp-content/uploads/2018/07/twitter-ouath-token-qlik-300x252.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></a><p id="caption-attachment-4439" class="wp-caption-text">Select OAuth options</p></div></li>
<li>In Addition, in the OAuth parameters, select the Twitter OAuth provider and generate a Token. The application will ask for your Twitter credentials:
<div id="attachment_4441" style="width: 812px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/twitter-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4441" class="size-full wp-image-4441" src="https://zappysys.com/blog/wp-content/uploads/2018/07/twitter-url.png" alt="Qlik information" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/twitter-url.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/07/twitter-url-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/twitter-url-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a><p id="caption-attachment-4441" class="wp-caption-text">Qlik connection information</p></div></li>
<li>Finally, create a new app in Qlik Sense Desktop and add the ODBC DSN just created and you will have your Twitter data in Qlik Sense.
<div id="attachment_4442" style="width: 996px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-twitter.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4442" class="size-full wp-image-4442" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-twitter.png" alt="Connect Twitter to Qlik" width="986" height="126" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-twitter.png 986w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-twitter-300x38.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-twitter-768x98.png 768w" sizes="(max-width: 986px) 100vw, 986px" /></a><p id="caption-attachment-4442" class="wp-caption-text">Qlik sense to Twitter</p></div></li>
</ol>
<h3>Facebook REST API Example in Qlik</h3>
<p>Facebook is another popular social network with interesting information. The following example will show how to show the number of Facebook friends in Qlik using REST API.</p>
<ol>
<li> First of all, open the ODBC Administrator in Windows and add the ZappySys JSON Driver.</li>
<li>Secondly, you will need a Facebook application. The following <a href="https://zappysys.com/blog/register-facebook-oauth-app-graph-api/">link</a> shows you how to configure the application.
<div id="attachment_10118" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-to-facebook-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10118" class="wp-image-10118 size-large" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-to-facebook-1-1024x225.png" alt="Qlik Sense to Facebook" width="720" height="158" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-to-facebook-1-1024x225.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-to-facebook-1-300x66.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-to-facebook-1-768x169.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-to-facebook-1.png 1282w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-10118" class="wp-caption-text">Connect Facebook Qlik</p></div></li>
<li>In your ZappySys ODBC driver, add your client id and client secret that can be obtained from the Facebook Application:
<div id="attachment_10119" style="width: 586px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-facebook-client-id-secret-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10119" class="wp-image-10119 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-facebook-client-id-secret-1.png" alt="Connect Qlik to Facebook" width="576" height="396" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-facebook-client-id-secret-1.png 576w, https://zappysys.com/blog/wp-content/uploads/2018/07/qlik-facebook-client-id-secret-1-300x206.png 300w" sizes="(max-width: 576px) 100vw, 576px" /></a><p id="caption-attachment-10119" class="wp-caption-text">Facebook Connection information for qlik</p></div></li>
<li>Finally add your ODBC connection to Facebook in Qlik Sense as we did in previous examples.</li>
</ol>
<h2>ZappySys JSON /REST API Driver Query Examples</h2>
<p>Reading from XML files or API can be done using the same way as previous sections except you have to use ZappySys XML Driver. Read help file here to <a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">see json query examples</a>.</p>
<h2>ZappySys XML / SOAP Driver Query Examples</h2>
<p>Reading from XML files or API can be done using the same way as previous sections except you have to use ZappySys XML Driver. Read help file here to <a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/xml-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">see xml query examples</a>.</p>
<h2>Calling XML SOAP Web Service in Qlik</h2>
<p>So far we have looked at examples to consume data using JSON driver. Now lets look at an example, to call XML SOAP Web Service in Qlik.</p>
<div class="content_block" id="custom_post_widget-3870">To call SOAP API you need to know Request XML Body Structure. If you are not sure how to create SOAP Request body then no worries. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn how to generate SOAP Request body using the Free tool <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a>. Basically, you have to use SoapUI to generate Request XML and after that, you can replace parameters as needed in the generated body.
<h3>What is SOAP Web Service?</h3>
If you are new to SOAP Web Service sometimes referred as XML Web Service then please read some concept about SOAP Web service standard <a href="https://msdn.microsoft.com/en-us/library/ms996507.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener">from this link</a>

There are two important aspects in SOAP Web service.
<ol>
 	<li>Getting WSDL file or URL</li>
 	<li>Knowing exact Web Service URL</li>
</ol>
<h3>What is WSDL</h3>
In very simple term WSDL (often pronounced as whiz-dull) is nothing but a document which describes Service metadata (e.g. Functions you can call, Request parameters, response structure etc). Some service simply give you WSDL as xml file you can download on local machine and then analyze or sometimes you may get direct URL (e.g. http://api.mycompany.com/hr-soap-service/?wsdl )
<h3>Example SQL Query for SOAP API call using ZappySys XML Driver</h3>
Here is an example SQL query you can write to call SOAP API. If you not sure about many details then check next few sections on how to use XML Driver User Interface to build desired SQL query to POST data to XML SOAP Web Service without any coding.
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(
	 Src='http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx'
	,DataConnectionType='HTTP'
	,CredentialType='Basic' --OR SoapWss
	,SoapWssPasswordType='PasswordText'
	,UserName='myuser'
	,Password='pass$$w123'
	,Filter='$.soap:Envelope.soap:Body.GetHolidaysAvailableResponse.GetHolidaysAvailableResult.HolidayCode[*]'
	,ElementsToTreatAsArray='HolidayCode'	
	,RequestMethod='POST'	
	,Header='Content-Type: text/xml;charset=UTF-8 || SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hol="http://www.holidaywebservice.com/HolidayService_v2/"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;hol:GetHolidaysAvailable&gt;
         &lt;!--type: Country - enumeration: [Canada,GreatBritain,IrelandNorthern,IrelandRepublicOf,Scotland,UnitedStates]--&gt;
         &lt;hol:countryCode&gt;UnitedStates&lt;/hol:countryCode&gt;
      &lt;/hol:GetHolidaysAvailable&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
Now let's look at steps to create SQL query to call SOAP API. Later we will see how to generate code for your desired programming language (e.g. C# or SQL Server)
<h3>Video Tutorial - Introduction to SOAP Web Service and SoapUI tool</h3>
Before we dive into details about calling SOAP API using ZappySys XML Driver, lets first understand what is SOAP API and how to create SOAP requests using SoapUI tool. You will learn more about this process in the later section. The video contains some fragment about using SOAP API in SSIS but just ignore that part because we will be calling Soap API using ZappySys ODBC Driver rather than SSIS Components.

&nbsp;

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/d_x5bgGjg0Y?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe>
<h3>Using SoapUI to test SOAP API call / Create Request Body XML</h3>
Assuming you have downloaded and installed <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI from here</a>, now we are ready to use WSDL for your SOAP Web Service Calls. If you do not have WSDL file or URL handy then contact your API provider (sometimes you just have to add <strong>?wsdl </strong>at the end of your Service URL to get WSDL so try that. Example: http://mycompany/myservice?wsdl ).

If you don't know what is WSDL then in short, WSDL is <strong>Web service Description Language</strong> (i.e. XML file which describes your SOAP Service). WSDL helps to craft SOAP API request Body for ZappySys XML Driver. So Let's get started.
<ol>
 	<li>Open SoapUI and click SOAP button to create new SOAP Project</li>
 	<li>Enter WSDL URL or File Path of WSDLFor example WSDL for our sample service can be accessed via this URL
<pre class="lang:default highlight:0 decode:true">http://www.dneonline.com/calculator.asmx?wsdl</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-import-wsdl-new-soapui-project.png"><img loading="lazy" decoding="async" class="size-full wp-image-3871" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-14.png" alt="Create new SOAP API Project in SoapUI tool for SOAP API Testing" width="486" height="349" /></a>
<div style="margin-bottom: 1em;">Create new SOAP API Project in SoapUI tool for SOAP API Testing</div></li>
 	<li>Once WSDL is loaded you will see possible operations you can call for your SOAP Web Service.</li>
 	<li>If your web service requires credentials then you have to configure it. There are two common credential types for public services (<strong>SOAP WSS</strong> or <strong>BASIC</strong> )
<ol>
 	<li>
<div style="margin-bottom: 1em;">To use <strong>SOAP WSS Credentials</strong> select request node and enter UserId, Password, and <strong>WSS-PasswordType</strong> (PasswordText or PasswordHash)</div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-soap-wss-credentials-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3872 alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)" width="294" height="544" /></a>
<div style="display: block;">Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)</div></li>
 	<li>To use <strong>BASIC Auth</strong> Credentials select request node and double-click it. At the bottom click on Auth (Basic) and From Authorization dropdown click Add New and Select Basic.<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-basic-authentication-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3873" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure Basic Authorization for SoapUI (SOAP API Testing Tool)" width="616" height="653" /></a>
<div style="margin-bottom: 1em;">Configure Basic Authorization for SoapUI (SOAP API Testing Tool)</div></li>
</ol>
</li>
 	<li>Now you can test your request first Double-click on the request node to open request editor.</li>
 	<li>Change necessary parameters, remove optional or unwanted parameters. If you want to regenerate request you can click on <strong>Recreate default request toolbar icon</strong>.
<a href="https://zappysys.com/blog/wp-content/uploads/2016/06/create-soap-request-with-optional-parameters-soapui.png"><img loading="lazy" decoding="async" class="size-full wp-image-2812" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-4.png" alt="Create SOAP Request XML (With Optional Parameters)" width="807" height="315" /></a>
<div style="margin-bottom: 1em;">Create SOAP Request XML (With Optional Parameters)</div></li>
 	<li>Once your SOAP Request XML is ready, <strong>Click the Play button</strong> in the toolbar to execute SOAP API Request and Response will appear in Right side panel.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soapui-test-soap-api-request-response-edit-xml-body.png"><img loading="lazy" decoding="async" class="size-full wp-image-3874" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-5.png" alt="Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)" width="1216" height="511" /></a>
Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)</li>
</ol>
<h3>Create DSN using ZappySys XML Driver to call SOAP API</h3>
Once you have tested your SOAP API in SoapUI tool, we are ready to use ZappySys XML driver to call SOAP API in your preferred BI tool or Programming language.
<ol>
 	<li>First open <strong>ODBC Data Sources</strong> (search ODBC in your start menu or go under ZappySys &gt; ODBC PowerPack &gt; <strong>ODBC 64 bit</strong>)</li>
 	<li>Goto <strong>System DSN</strong> Tab (or User DSN which is not used by Service account)</li>
 	<li>Click <strong>Add</strong> and Select ZappySys XML Driver
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-6.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" /></a>
ZappySys ODBC Driver for XML / SOAP API</li>
 	<li>Configure API URL, Request Method and Request Body as below
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3876" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-7.png" alt="ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body" width="916" height="874" /></a>
ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body</li>
 	<li><strong>(This step is Optional)</strong> If your SOAP API requires credentials then Select Connection Type to HTTP and configure as below.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-call-credential-basic-soap-wss-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3877" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-8.png" alt="ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)" width="564" height="483" /></a>
<div style="display: block;">ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)</div></li>
 	<li>Configure-Request Headers as below (You can get it from Request &gt; Raw tab from SoapUI after you test the request by clicking the Play button)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/set-soap-api-request-headers-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3881" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-9.png" alt="Configure SOAP API Request Headers - ZappySys XML Driver" width="1009" height="747" /></a>
Configure SOAP API Request Headers - ZappySys XML Driver</li>
 	<li>Once credentials entered you can select Filter to extract data from the desired node. Make sure to select array node (see special icon) or select the node which contains all necessary columns if you don't have array node.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-query-select-filter-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3882" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-10.png" alt="Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)" width="809" height="594" /></a>
Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)</li>
 	<li>If prompted select yes to treat selected node as Array (This is helpful when you expect one or more record for selected node)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/xml-api-array-handling-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3883" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-11.png" alt="Treat selected node as XML Array Option for SOAP API Response XML" width="655" height="572" /></a>
Treat selected node as XML Array Option for SOAP API Response XML</li>
</ol>
<h3>Preview SOAP API Response / Generate SQL Code for SOAP API Call</h3>
Once you configure settings for XML Driver now you can preview data or generate example code for desired language (e.g. C#, Python, Java, SQL Server).

Go to Preview tab and you will see default query generated based on settings you entered in previous sections. Attributes listed in WITH clause are optional. If you omit attribute in WITH clause it will use it from Properties tab.
<h3>Preview Data</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3884" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-12.png" alt="Preview SOAP API Response in ZappySys XML Driver" width="808" height="780" /></a>
Preview SOAP API Response in ZappySys XML Driver
<h3>Generate Code Option</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-driver-code-generator.png"><img loading="lazy" decoding="async" class="size-full wp-image-3885" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-13.png" alt="Generate Example Code for ZappySys Driver" width="572" height="618" /></a>
<div style="display: block;">Generate Example Code for ZappySys Driver</div></div>
<h2>POST data to REST API URL from file in Qlik</h2>
<p>Above example was POST data to API URL but what if your Request Body is large and you have saved that to file? Well here is the way to get your request body from a file (Use @ symbol before path).</p><pre class="crayon-plain-tag">SELECT * FROM $
WITH 
(METHOD='POST' 
,HEADER='Content-Type:text/plain || x-hdr1:AAA'
,SRC='http://httpbin.org/post'
,BODY='@c:\files\dump.xml'
,IsMultiPart='True'
)</pre><p>
&nbsp;</p>
<h2>REST API Pagination in Qlik Sense / QlikView</h2>
<div class="content_block" id="custom_post_widget-3892"><div style="margin-bottom: 1em;">Even we set up ODBC Data Source to get the data, it may not be enough. Usually, if you are getting a huge data set from API provider, it won't give it to you in one HTTP response. Instead, it gives back only a subset of data and provides a mechanism for data pagination. The good news is that <em>ZappySys ODBC Driver</em> includes many options to cover virtually any pagination method.</div>
<div><span style="font-size: 16px;">Below you will find a few examples of API pagination. If you need something more sophisticated check the below link (the article was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too):</span></div>
<div style="margin-bottom: 1em;"><a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/</a></div>
<h3>Paginate by Response Attribute</h3>
This example shows how to paginate API calls where you need to paginate until the last page detected. In this example, next page is indicated by some attribute called nextlink (found in response). If this attribute is missing or null then it stops fetching the next page.
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH(
SRC=@'https://zappysys.com/downloads/files/test/pagination_nextlink_inarray_1.json'
,NextUrlAttributeOrExpr = '$.nextlink'  --keep reading until this attribute is missing. If attribute name contains dot then use brackets like this $.['my.attr.name']
)</pre>
<h3>Paginate by URL Parameter (Loop until certain StatusCode)</h3>
This example shows how to paginate API calls where you need to pass page number via URL. The driver keeps incrementing page number and calls next URL until the last page detected (401 error). There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/page-xml.aspx?page=1&amp;mode=DetectBasedOnResponseStatusCode'
,PagingMode='ByUrlParameter'
,PagingByUrlAttributeName='page'
,PagingByUrlEndStrategy='DetectBasedOnResponseStatusCode'
,PagingByUrlCheckResponseStatusCode=401
,IncrementBy=1
)</pre>
<h3>Paginate by URL Path (Loop until no record)</h3>
This example shows how to paginate API calls where you need to pass page number via URL Path. The driver keeps incrementing page number and calls next URL until the last page is detected. There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/cust-&lt;%page%&gt;.xml'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='&lt;%page%&gt;'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)</pre>
<h3>Paginate by Header Link (RFC 5988)</h3>
API like GitHub / Wordpress use Next link in Headers (<a href="https://tools.ietf.org/html/rfc5988" target="_blank" rel="noopener">RFC 5988</a>)
<pre class="lang:default decode:true ">SELECT * FROM $
LIMIT 25
WITH(
	 Src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)</pre>
&nbsp;</div>
<h2>Error Handling in REST API / SOAP</h2>
<div class="content_block" id="custom_post_widget-3894">Sometimes errors occur... they just do and there is nothing you can do! Or can you? Actually, in ODBC PowerPack you can handle them in two ways.
<h3>METHOD 1 - Using Error Handling Options</h3>
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3949" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-error-handling-1.png" alt="" width="668" height="702" />
<h4>When to use?</h4>
You may want to use them when your source is a resource located on the Internet; e.g. a file on a website, a file on an FTP server or just a plain API HTTP response. By default, when a remote server returns an error, data retrieval is stopped, an error is raised and no data is given back to you. This might not be always desirable.
<h4>Scenario 1</h4>
Imagine a scenario, that there is a web server which each day at 12 AM releases a new JSON file with that day's date as filename, e.g. <span style="text-decoration: underline;"><em>http://www.some-server.com/data/2018-06-20.json</em></span>. And, of course, you want to download it and use it daily in your Power BI report. But you have a problem: Power BI report data sources are refreshed each hour and you may get <a href="https://en.wikipedia.org/wiki/HTTP_404" target="_blank" rel="noopener">HTTP 404 status code</a> (no file was found) when a file is not released yet. Which consequentially means other data sources won't be updated as well and you will see old and cached data on the report. That's where you could use <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue on any error</span></strong> or <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue when Url is invalid or missing (404 Errors)</span></strong> to avoid an error being raised and let other data sources to be updated.
<h4>Scenario 2</h4>
Another scenario is when you expect a web server to raise some kind of HTTP error when accessing a URL. You don't want ODBC Data Source to raise an error but instead, you want to get response data. That's where you can use <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue on any error</span></strong> or alike together with  <strong><span class="lang:default highlight:0 decode:true crayon-inline">Get response data on error</span></strong> to continue on an error and get the data:

<img loading="lazy" decoding="async" class="alignnone wp-image-3961 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error.png" alt="" width="547" height="235" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error.png 547w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error-300x129.png 300w" sizes="(max-width: 547px) 100vw, 547px" />
<h3>METHOD 2 - Using Connection [Retry Settings]</h3>
Another scenario you may run into is a buggy web server. You ask it to give you some file or data and it, like a snotty kid, just doesn't give it to you! You have to ask twice or thrice before it does its job. If that's the case, you have to retry HTTP requests using <em>Connection</em>:

<img loading="lazy" decoding="async" class="alignnone wp-image-3963 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-error-handling-3.png" alt="" width="671" height="572" /></div>
<h2>REST API / SOAP Connection Types in Qlik (OAuth / HTTP)</h2>
<div class="content_block" id="custom_post_widget-3896"><div style="margin-bottom: 1em;">If you need to authenticate or authorize your user to access a web resource, you will need to use one of the <em>Connections:</em></div>
<ul>
 	<li>HTTP</li>
 	<li>OAuth</li>
</ul>
<img loading="lazy" decoding="async" class="wp-image-4078 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png" alt="ZappySys XML Driver - HTTP and OAuth Connection Types" width="577" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png 577w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252-300x157.png 300w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>HTTP Connection</h3>
<div style="margin-bottom: 1em;">Use <em>HTTP Connection</em> for simple Windows, Basic, NTLM or Kerberos authentication. Just fill in a username and a password and you are good to go!</div>
<div style="margin-bottom: 1em;">You can also use <em>HTTP Connection</em> for more sophisticated authentication like:</div>
<ul>
 	<li><strong>SOAP WSS</strong> (when accessing a SOAP WebService)</li>
 	<li><strong>Static Token / API Key</strong> (when need to pass an API key in HTTP header)</li>
 	<li><strong>Dynamic Token</strong> (same as Static Token method except that each time you need to log in and retrieve a fresh API key)</li>
 	<li><strong>JWT Token</strong> (As per RFC 7519)</li>
</ul>
<img loading="lazy" decoding="async" class="alignnone wp-image-4091 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-1.png" alt="" width="622" height="570" />
<h3>OAuth</h3>
If you are trying to access REST API resource, it is a huge chance, you will need to use <em>OAuth Connection</em>. <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">Read this article</a> to understand how OAuth authentication and authorization works and how to use it (article originally was written for <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>, but the concepts and UI stay the same): <br/>
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/</a>
<img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-2.png" width="721" height="708" /></div>
<h2>Performance consideration for Web API Calls</h2>
<div class="content_block" id="custom_post_widget-4455">While calling APIs you may face some performance issues. There are a few tips you can consider to speed up things.
<h4><span style="font-size: 14pt;"><strong>Use Server-side filtering if possible in URL or Body Parameters</strong></span></h4>
Many API supports filtering your data by URL parameters or via Body. Whenever possible try to use such features.  Here is an example of <a href="http://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">odata API</a>, In the below query the first query is faster than the second query because in the first query we filter at the server.
<pre class="lang:tsql decode:true">SELECT * FROM value
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json&amp;$filter=Country eq ''USA'''
	,DataFormat='Odata'
)

-- Slow query - Client-side filtering
SELECT * FROM value
WHERE Country ='USA'
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json'
	,DataFormat='Odata'
)</pre>
<h4><span style="font-size: 14pt;"><strong>Avoid Special features in SQL Query (e.g. WHERE, Group By, Order By)</strong></span></h4>
ZappySys API engine triggers client-side processing if special features are used in Query. Following SQL Features will trigger Client-Side processing which is several times slower than server-side processing. So always try to use simple query (Select col1, col2 .... from mytable )
<ul>
 	<li>WHERE Clause</li>
 	<li>GROUP BY Clause</li>
 	<li>HAVING Clause</li>
 	<li>ORDER BY</li>
 	<li>FUNCTIONS (e.g. Math, String, DateTime, Regex... )</li>
</ul>
LIMIT clause does not trigger client-side processing.
<h4><span style="font-size: 14pt;"><strong>Consider using pre-generated Metadata / Cache File</strong></span></h4>
Use META option in WITH Clause to use static metadata (Pre-Generated)There are two more options to speedup query processing time. Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details.
<ol>
 	<li>
<pre class="lang:default decode:true">select * from value WITH( meta='c:\temp\meta.txt' )
--OR--
select * from value WITH( meta='my-meta-name' )
--OR--
select * from value WITH( meta='[ {"Name": "col1",&amp;nbsp;"Type": "String", Length: 100},&amp;nbsp;{"Name": "col2",&amp;nbsp;"Type": "Int32"} ...... ]' )</pre>
</li>
 	<li>Enable Data Caching Options (Found on <strong>Property Grid</strong> &gt; <strong>Advanced</strong> Mode Only )</li>
</ol>
<h4><span style="font-size: 14pt;"><strong>Consider using Metadata / Data Caching Option</strong></span></h4>
ZappySys API drivers support Caching Metadata and Data rows to speed up query processing. If your data doesn't change often then you can enable this option to speed up processing significantly.

Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details how to enable Data cache / metadata cache feature for datasource level or query level.

To define cache option at query level you can use like below.
<pre class="">SELECT * FROM $
WITH 
(  SRC='https://myhost.com/some-api'
  ,CachingMode='All'  --cache metadata and data rows both
  ,CacheStorage='File' --or Memory
  ,CacheFileLocation='c:\temp\myquery.cache'
  ,CacheEntryTtl=300 --cache for 300 seconds
)
</pre>
&nbsp;

&nbsp;
<h4><strong><span style="font-size: 14pt;">Use --FAST Option to enable Stream Mode</span></strong></h4>
ZappySys JSON / XML drivers support <strong>--FAST</strong> suffix for Filter. By using this suffix after Filter driver enables Stream Mode, <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Reading_Large_Files_Streaming_Mode_for_XML_JSON" target="_blank" rel="noopener">Read this article</a> to understand how this works.
<pre class="lang:default decode:true">SELECT * FROM $ 
LIMIT 10 --//add this just to test how fast you can get 10 rows
WITH(
  Filter='$.LargeArray[*]--FAST' --//Adding --FAST option turn on STREAM mode (large files)
 ,SRC='https://zappysys.com/downloads/files/test/large_file_100k_largearray_prop.json.gz'
 --,SRC='c:\data\large_file.json.gz'
 ,IncludeParentColumns='False'  --//This Must be OFF for STREAM mode (read very large files)
 ,FileCompressionType='GZip' --Zip or None (Zip format only available for Local files)
)</pre>
&nbsp;</div>
<h2>Other considerations for Web API calls in Qlik</h2>
<div class="content_block" id="custom_post_widget-3901">There are few settings you can coder while calling Web API
<h3><strong>API Limit / Throttling</strong></h3>
While calling public API or other external web services one important aspect you have to check,  how many requests are allowed by your API. Especially when you use API pagination options to pull many records you have to slow down based on API limits. For example, your API may allow you only 5 requests per second. Use Throttling Tab on Driver UI to set delay after each request.
<h3><strong>2D Array Transformation</strong></h3>
If you are using JSON or XML API Driver then possible you may have to transform your data using 2D array transformation feature. <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Check this link</a> for more information.

&nbsp;</div>
<h2>Conclusion</h2>
<p>To conclude, we can say that Qlik Sense with the help of <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys ODBC PowerPack</a> can be useful to access to different data using REST API. We learned how to connect Qlik Sense with ODBC to connect to OData, Google Drive Sheets, Facebook information and Twitter. If you enjoy it. Try<a href="https://zappysys.com/products/odbc-powerpack/download/"> our product</a>.</p>
<h2>References</h2>
<p>Finally, for more information about Qlik Sense and REST API with ODBC, refer<br />
to these links:</p>
<ul>
<li><a href="https://zappysys.com/products/odbc-powerpack/">ODBC PowerPack – Drivers for REST API, JSON, XML, OData</a></li>
<li><a href="https://www.youtube.com/watch?v=8QTsuFpVh44">Qlik Sense &#8211; Getting Started Webinar</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/">Qlik REST Connector Examples &#8211; Read JSON / XML API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
