<?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>rest api Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/rest-api/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/rest-api/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 19 Mar 2026 23:08:10 +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>rest api Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/rest-api/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to create custom ODBC Driver for API without coding</title>
		<link>https://zappysys.com/blog/create-custom-odbc-driver-api-without-coding/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 10 Apr 2023 19:16:12 +0000</pubDate>
				<category><![CDATA[API Driver]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10024</guid>

					<description><![CDATA[<p>Introduction Imagine this situation, you or users of your product wants to consume some REST API in ETL / BI / Programming Tools using ODBC / JDBC Driver interface but there are no ODBC / JDBC Driver available for that API and you dont even know coding? If you are in a situation No Problem [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/create-custom-odbc-driver-api-without-coding/">How to create custom ODBC Driver for API without coding</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Imagine this situation, you or users of your product wants to consume some REST API in ETL / BI / Programming Tools using ODBC / JDBC Driver interface but there are no ODBC / JDBC Driver available for that API and you dont even know coding? If you are in a situation No Problem !!! In this post you will learn how to create a custom ODBC Driver for API (i.e. REST / SOAP / OData) without writing code&#8230; and access in most BI / ETL / Reporting tools using Industry Standard such as ODBC Interface&#8230;.. Yes you heard it right&#8230; 🙂</p>
<p>Generally speaking, creating an ODBC Driver requires a lot of coding effort and that&#8217;s why most vendors don&#8217;t invest in providing ODBC Driver and let you consume their API using code only. They assume that your company / team has really sharp C# / JAVA / C++ coders available 🙂 &#8230;. but we all know that coding is not cheap and not easy to maintain in long run.</p>
<p>Basically, the approach mentioned in this article requires you to create an XML File (or call it Connector File) and then consume it using <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API Driver (ODBC)</a> So let&#8217;s get started!</p>
<div class="content_block" id="custom_post_widget-9166"><h2>Requirements</h2>
In order to access API data inside your App using ODBC Driver you will need to make sure following requirements 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>
</ol></div>
<h2>API Connector File &#8211; The Concept</h2>
<p>ZappySys has developed a highly flexible API Connector Framework which you can use to build API Connector Files which can be used by <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> in different apps. This API Connector Framework is so flexible that it can handle pretty much any API out there.</p>
<p>Here are a few example connector files we built using the same framework. Don&#8217;t worry about various parts in those connector files for now, you might not need to implement all those. We will start simple and explain to you advanced use cases later.</p>
<p><strong>Example Connector Files</strong></p>
<ul>
<li><a href="https://zappysys.com/api/integration-hub/youtube-connector/help/source-code">Youtube</a></li>
<li><a href="https://zappysys.com/api/integration-hub/stripe-connector/help/source-code">Stripe</a></li>
<li><a href="https://zappysys.com/api/integration-hub/jira-connector/help/source-code">Jira</a></li>
<li><a href="https://zappysys.com/api/integration-hub/shopify-connector/help/source-code">Shopify</a></li>
</ul>
<h2>Basic Example of API Connector File</h2>
<p>Here is a very simple example of some API to read Customers and Orders. Keep in mind most features are omitted for simplicity.</p>
<p>Below connector file shows few concepts which we will discuss later in this article. Such as API Base URL (i.e. Service URL), Authetication, Pagination, EndPoints, Metadata, Parameters, Templates, Tables so on.</p>
<ol>
<li>Open Notepad</li>
<li>Copy / Paste below XMl in notepad and save as <strong>NorthwindConnector.xml</strong></li>
<li>Then you can Create a new ODBC DSN <a href="https://zappysys.com/api/integration-hub/odata-connector/odbc">as mentioned here</a> and use our connector file for Testing (Use Saved Connector File Option on new DSN wizard).</li>
</ol>
<p><strong>NorthwindConnector.xml</strong></p><pre class="crayon-plain-tag">&lt;?xml version="1.0"?&gt;
&lt;ApiConfig Name="Northwind" Slug="northwind-api" Desc="Sample connector for Northwind OData Service" Logo="https://www.odata.org/assets/ODataLogo-96.png"&gt;
  &lt;ServiceUrls&gt;
    &lt;ServiceUrl Name="V3_API" Url="https://services.odata.org/V3/Northwind/Northwind.svc"/&gt;
    &lt;ServiceUrl Name="V4_API" Url="https://services.odata.org/V4/Northwind/Northwind.svc"/&gt;
  &lt;/ServiceUrls&gt;


  &lt;!-- Implement supported way to Authenticate API calls --&gt;
  &lt;Auths&gt;
    &lt;Auth Name="ApiKeyAuth" Type="Http" TestEndPoint="get_customers" ConnStr="CredentialType=Token;TokenAuthHeader=X-APIKEY;Password=[$ApiKey$]"&gt;
      &lt;Params&gt;
        &lt;Param Name="ApiKey" Label="Enter your API  Key" Secret="True"/&gt;
      &lt;/Params&gt;
    &lt;/Auth&gt;  
  &lt;/Auths&gt;

  &lt;!-- Reusable Templates (i.e. API Pagination Properties) --&gt;
  &lt;Template&gt;
    &lt;EndPoint Name="PaginatedCall"&gt;
      &lt;Params&gt;
        &lt;Param Name="NextUrlAttributeOrExpr" Type="Property" Value="$.['odata.nextLink']"/&gt;
      &lt;/Params&gt;    
    &lt;/EndPoint&gt;
  &lt;/Template&gt;

  &lt;!-- EndPoints --&gt;
  &lt;EndPoints&gt;
    &lt;EndPoint Name="get_customers" Template="PaginatedCall" Url="/Customers?$format=json" Filter="$.value[*]" Method="GET"&gt;
      &lt;OutputColumns&gt;
        &lt;Column Name="CustomerID" Label="Id" DataType="DT_WSTR" Length="20"/&gt;
        &lt;Column Name="CompanyName" DataType="DT_WSTR" Length="100"/&gt;
      &lt;/OutputColumns&gt;
    &lt;/EndPoint&gt;

    &lt;EndPoint Name="get_orders" Template="PaginatedCall" Url="/Orders?$format=json" Filter="$.value[*]" Method="GET"&gt;

      &lt;OutputColumns&gt;
        &lt;Column Name="OrderID" Label="Id" DataType="DT_I4"/&gt;
        &lt;Column Name="OrderDate" DataType="DT_DBTIMESTAMP"/&gt;
        &lt;Column Name="CustomerID" DataType="DT_WSTR" Length="20"/&gt;
        &lt;Column Name="Notes" DataType="DT_NTEXT"/&gt;
      &lt;/OutputColumns&gt;
    &lt;/EndPoint&gt;
  &lt;/EndPoints&gt;

  &lt;!-- Tables (with SELECT, LOOKUP UPDATE, INSERT, DELETE operations. For Demo we have used just SELECT EndPoint) --&gt;
  &lt;Tables&gt; 
    &lt;Table Name="Orders" SelectEndPoint="get_orders"/&gt;
    &lt;Table Name="Customers" SelectEndPoint="get_customers"/&gt;
  &lt;/Tables&gt;
&lt;/ApiConfig&gt;</pre><p>
&nbsp;</p>
<h2>Using API Connector File in Apps</h2>
<p>Once API connector file is created</p>
<h3>Use in ODBC Apps</h3>
<p><a href="https://zappysys.com/api/integration-hub/odata-connector/odbc">Click here to see an example</a> &#8211; Using API connector file in ODBC Apps (ODATA). For other popular apps <a href="https://zappysys.com/api/integration-hub/odata-connector/">check this page</a> and click on desired app.</p>
<p>Here is how it may look like if we import the previous connector file in API Driver UI. Notice how we selected the V3 Base URL as API. Also, see how various connector file elements translated to Driver UI&#8230;. very cool right ?</p>
<div id="attachment_10033" style="width: 603px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/04/reading-api-data-using-custom-api-connector-odbc-app.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-10033" class="size-full wp-image-10033" src="https://zappysys.com/blog/wp-content/uploads/2023/04/reading-api-data-using-custom-api-connector-odbc-app.png" alt="Using Custom API Connector File - New ODBC DSN - ZappySys API Driver" width="593" height="610" srcset="https://zappysys.com/blog/wp-content/uploads/2023/04/reading-api-data-using-custom-api-connector-odbc-app.png 593w, https://zappysys.com/blog/wp-content/uploads/2023/04/reading-api-data-using-custom-api-connector-odbc-app-292x300.png 292w" sizes="(max-width: 593px) 100vw, 593px" /></a><p id="caption-attachment-10033" class="wp-caption-text">Using Custom API Connector File &#8211; New ODBC DSN &#8211; ZappySys API Driver</p></div>
<div id="attachment_10028" style="width: 584px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/04/create-custom-api-connector-odbc-driver.png"><img decoding="async" aria-describedby="caption-attachment-10028" class="size-full wp-image-10028" src="https://zappysys.com/blog/wp-content/uploads/2023/04/create-custom-api-connector-odbc-driver.png" alt="Using Custom API Connector file in ZappySys API ODBC Driver" width="574" height="442" srcset="https://zappysys.com/blog/wp-content/uploads/2023/04/create-custom-api-connector-odbc-driver.png 574w, https://zappysys.com/blog/wp-content/uploads/2023/04/create-custom-api-connector-odbc-driver-300x231.png 300w" sizes="(max-width: 574px) 100vw, 574px" /></a><p id="caption-attachment-10028" class="wp-caption-text">Using Custom API Connector file in ZappySys API ODBC Driver</p></div>
<p>Here is the output from Preview Tab</p>
<div id="attachment_10029" style="width: 675px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/04/get-data-custom-api-driver-odbc.png"><img decoding="async" aria-describedby="caption-attachment-10029" class="size-full wp-image-10029" src="https://zappysys.com/blog/wp-content/uploads/2023/04/get-data-custom-api-driver-odbc.png" alt="Preview Data from Custom API Driver - Using ZappySys API Driver" width="665" height="703" srcset="https://zappysys.com/blog/wp-content/uploads/2023/04/get-data-custom-api-driver-odbc.png 665w, https://zappysys.com/blog/wp-content/uploads/2023/04/get-data-custom-api-driver-odbc-284x300.png 284w" sizes="(max-width: 665px) 100vw, 665px" /></a><p id="caption-attachment-10029" class="wp-caption-text">Preview Data from Custom API Driver &#8211; Using ZappySys API Driver</p></div>
<h3>Use in JAVA Apps</h3>
<p><a href="https://zappysys.com/api/integration-hub/odata-connector/java">Click here to see an example</a> &#8211; Using API connector file in JAVA based Apps (It uses ZappySys Data Gateway as Bridge rather than direct ODBC call in Java becuase JAVA doesnt support ODBC directly)</p>
<h3>Use in SQL Server (T-SQL code)</h3>
<p><a href="https://zappysys.com/api/integration-hub/odata-connector/sql-server">Click here to see an example</a> &#8211; Using API connector file in SQL Server (It uses ZappySys Data Gateway as Bridge rather than direct ODBC call in SQL Servr becuase of some known issues of direct ODBC)</p>
<h3>Use in SSIS Package</h3>
<p><a href="https://zappysys.com/api/integration-hub/odata-connector/ssis">Click here to see an example</a> &#8211; Using API connector file in SSIS Packages. It uses native API Source / API Destination components.</p>
<h2>Create / Edit Connector file using Wizard from API Driver UI</h2>
<p>If you like to edit your file previously created using Wizard then you can do the following steps.</p>
<ol>
<li>Assuming you have already setup <a href="https://zappysys.com/api/integration-hub/odata-connector/odbc">ODBC DSN for API Connector File</a> we previously created.</li>
<li>Open Odbc UI (search for &#8220;<strong>ODBC</strong>&#8221; in the start menu and select &#8220;ODBC Administrator&#8221;)</li>
<li>Double-click on the Data source you like to edit</li>
<li>On the <strong>Properties</strong> Tab &gt; Go to <strong>Advanced</strong> Tab</li>
<li>Click on <strong>Customize &#8211; Current Connector File</strong> (If you wish to create a new API connector file then you can click on <strong>Create New Connector File</strong> Button instead)</li>
</ol>
<div id="attachment_10031" style="width: 787px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/04/edit-custom-api-connector-file-odbc-driver-ui.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10031" class="size-full wp-image-10031" src="https://zappysys.com/blog/wp-content/uploads/2023/04/edit-custom-api-connector-file-odbc-driver-ui.png" alt="Create / Edit Custom API Connector File - From API ODBC Driver UI" width="777" height="695" srcset="https://zappysys.com/blog/wp-content/uploads/2023/04/edit-custom-api-connector-file-odbc-driver-ui.png 777w, https://zappysys.com/blog/wp-content/uploads/2023/04/edit-custom-api-connector-file-odbc-driver-ui-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/04/edit-custom-api-connector-file-odbc-driver-ui-768x687.png 768w" sizes="(max-width: 777px) 100vw, 777px" /></a><p id="caption-attachment-10031" class="wp-caption-text">Create / Edit Custom API Connector File &#8211; From API ODBC Driver UI</p></div>
<h2>Create Connector file from SSIS JSON / XML Source UI Settings</h2>
<p>If you are an SSIS user and you have configured <a href="https://zappysys.com/api/integration-hub/json-connector/ssis">JSON Source</a> or <a href="https://zappysys.com/api/integration-hub/xml-connector/ssis">XML Source</a> then you convert those UI settings into a basic API connector file by going on <strong>API Template</strong> and clicking on <strong>Create New Connector File</strong> button like below.</p>
<div id="attachment_10032" style="width: 898px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/04/create-new-custom-api-connector-file-from-ssis-json-xml-source-ui.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10032" class="size-full wp-image-10032" src="https://zappysys.com/blog/wp-content/uploads/2023/04/create-new-custom-api-connector-file-from-ssis-json-xml-source-ui.png" alt="Create a new Custom API Connector File - From SSIS JSON / XML Source UI" width="888" height="731" srcset="https://zappysys.com/blog/wp-content/uploads/2023/04/create-new-custom-api-connector-file-from-ssis-json-xml-source-ui.png 888w, https://zappysys.com/blog/wp-content/uploads/2023/04/create-new-custom-api-connector-file-from-ssis-json-xml-source-ui-300x247.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/04/create-new-custom-api-connector-file-from-ssis-json-xml-source-ui-768x632.png 768w" sizes="(max-width: 888px) 100vw, 888px" /></a><p id="caption-attachment-10032" class="wp-caption-text">Create a new Custom API Connector File &#8211; From SSIS JSON / XML Source UI</p></div>
<h2>Create API Connector file from scratch</h2>
<p>So far you have understood the basic ideas about connector files. Also explored creating / editing API Connector File using Wizard in ODBC / SSIS.</p>
<p>Now let&#8217;s look at concepts of creating connector file in detail.</p>
<h3>Basic Properties (Name, Slug, Logo)</h3>
<p>Coming Soon</p>
<h3>Service URL (API Base URL)</h3>
<p>Coming Soon</p>
<h3>Authentication</h3>
<p>Coming Soon</p>
<h3>Templates</h3>
<p>Coming Soon</p>
<h3>Parameters</h3>
<p>Coming Soon</p>
<h3>EndPoints</h3>
<p>Coming Soon</p>
<h3>Metadata / OutputColumns</h3>
<p>Coming Soon</p>
<h3>Tables</h3>
<p>Coming Soon</p>
<h2>Contact Us &#8211; We will build Custom API Driver for you</h2>
<p>If you are still not sure how to use all these on your own or you do not have time/experience&#8230; no worries. <a href="https://zappysys.com/contact-us/">Contact us</a> and we will provide you an estimate for building a custom API Driver / connector.</p>
<p>In the contact form above provide us following details (or as much as you can provide)</p>
<ul>
<li>Which connector do you like to build?</li>
<li>How are you planning to consume that data (i.e. which apps e.g. Power BI, Tableau)?</li>
<li>Your use case (e.g. read customer data from Zoho Invoice System)</li>
<li>Include table / data feed names you prefer to read from (e.g. Read Invoices, Read/Write Customers)</li>
</ul>
<h2>Conclusion</h2>
<p>In this article, we explored how easy it is to create your custom ODBC Driver for API using a powerful API Connector Framework. <a href="https://zappysys.com/products/odbc-powerpack/download/">Download ODBC PowerPack</a> and build your own API Driver in a few clicks.</p>
<p>The post <a href="https://zappysys.com/blog/create-custom-odbc-driver-api-without-coding/">How to create custom ODBC Driver for API without coding</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to download images from a web page using SSIS</title>
		<link>https://zappysys.com/blog/how-to-download-images-from-a-web-page-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Mon, 27 Mar 2023 11:49:52 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[SSIS CSV Source]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9918</guid>

					<description><![CDATA[<p>Introduction The article shows how to download images from a web page using SSIS. Sometimes we need to download the images from a web page. In this post, we will show how to do this. Prerequisites Before we perform steps listed in this article, you will need to make sure following prerequisites are met: SSIS [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-download-images-from-a-web-page-using-ssis/">How to download images from a web page using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><strong>Introduction</strong></h2>
<p>The article shows how to download images from a web page using SSIS. Sometimes we need to download the images from a web page. In this post, we will show how to do this.</p>
<h2><strong>Prerequisites</strong></h2>
<p>Before we perform steps listed in this article, you will need to make sure following prerequisites are met:</p>
<ol>
<li>SSIS designer installed. Sometimes it is referred as BIDS or SSDT (<a href="https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver16">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/">download it</a>).</li>
<li>Optional (If you want to Deploy and Schedule ) &#8211; <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593">Deploy and Schedule SSIS Packages</a></li>
</ol>
<h2><strong>Steps-by-step process to download images from HTML using SSIS</strong></h2>
<h3>Use REST API task to get the HTML body</h3>
<p>1. Drag and drop the REST API Task from SSIS toolbox, select the html page you want and save it in a variable.</p>
<div id="attachment_9958" style="width: 846px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9958" class="size-full wp-image-9958" src="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1.png" alt="" width="836" height="713" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1.png 836w, https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1-300x256.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1-768x655.png 768w" sizes="(max-width: 836px) 100vw, 836px" /></a><p id="caption-attachment-9958" class="wp-caption-text">Select the page you want to get the images</p></div>
<p>2. Go to <strong>Response Settings. </strong>Check the option Save the response content. In <strong>Save Mode, </strong>select <strong>Save to File. </strong>In the option <strong>Enter File Path</strong>, write the path for the html file.</p>
<div id="attachment_9959" style="width: 846px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9959" class="size-full wp-image-9959" src="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2.png" alt="" width="836" height="713" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2.png 836w, https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2-300x256.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2-768x655.png 768w" sizes="(max-width: 836px) 100vw, 836px" /></a><p id="caption-attachment-9959" class="wp-caption-text">Save the page in a file</p></div>
<h3>Parse the image with Regular Expression parser task</h3>
<p>3. From the SSIS toolbox drag and drop Regular Expression Parser Task on the Control flow designer surface.</p>
<p>4. The next step is to save the source path from the images. You need to use Regex and here are two example you can use, in this page <a href="https://regex101.com/">Regex101</a> you can check more details about the expressions we are using:</p>
<p>Expression 1: <pre class="crayon-plain-tag">&lt;img.*?src="(.*?)"{{*}}</pre>
Expression 2: <pre class="crayon-plain-tag">src="([a-z\-_0-9\/\:\.]*\.(png|jpg|jpeg|gif|png))"{{*}}</pre>
<div id="attachment_9960" style="width: 692px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/Regex1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9960" class="wp-image-9960 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/Regex1.png" alt="download images from a web page - Regex configuration" width="682" height="805" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/Regex1.png 682w, https://zappysys.com/blog/wp-content/uploads/2023/02/Regex1-254x300.png 254w" sizes="(max-width: 682px) 100vw, 682px" /></a><p id="caption-attachment-9960" class="wp-caption-text">Regex expression to get the image code from the page</p></div>
<h3>Read the image source with CSV source in order to download images from a Web page</h3>
<p>5. Now, Drag and Drop SSIS <b>Data Flow Task</b> from SSIS Toolbox.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" width="460" height="155" /></p>
<p>6. Double click on the DataFlow task to see DataFlow designer surface.</p>
<p>7. From the SSIS toolbox drag and drop CSV source and insert the variable you are using from the previous task</p>
<div id="attachment_9961" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/csv.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9961" class="wp-image-9961 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/csv.png" alt="CSV Source configuration" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/csv.png 826w, https://zappysys.com/blog/wp-content/uploads/2023/02/csv-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/csv-768x682.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-9961" class="wp-caption-text">Use CSV source to read the variable</p></div>
<h3>Get the image name, image full path and the destination folder to download images from a Web Page</h3>
<p>8. From the SSIS toolbox drag and drop Derived Column transform to remove the HTML code and get the image name.</p>
<p>Expression for the Image name:</p><pre class="crayon-plain-tag">(DT_WSTR,1000)REVERSE(LEFT(REVERSE(REPLACE(REPLACE(Column1,"src=\"",""),"\"","")),(FINDSTRING(REVERSE(REPLACE(REPLACE(Column1,"src=\"",""),"\"","")),"/",1) - 1)))</pre><p>
Remove the HTML code:</p><pre class="crayon-plain-tag">REPLACE(REPLACE(Column1,"src=\"",""),"\"","")</pre><p>
<div id="attachment_9962" style="width: 796px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9962" class="wp-image-9962 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1.png" alt="Image name" width="786" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1.png 786w, https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1-300x242.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1-768x620.png 768w" sizes="(max-width: 786px) 100vw, 786px" /></a><p id="caption-attachment-9962" class="wp-caption-text">Add a new column and remove HTML code</p></div>
<p>9. Now we will drag and drop another Derived Column, this one is for the file path for the images and validate if the image URL is valid. If the image URL has “http” in the stringm then it is valid otherwise you need to add the rest of the URL. Here is our example for the filePath and validate the URL image. If everything is OK, we can send the image URL.</p><pre class="crayon-plain-tag">File path: (DT_WSTR,2500)@[User::vDestinationFolder] + ImageName

Validate image URL: ((FINDSTRING(Column1,"http",1) &gt; 0) ? Column1 : (DT_WSTR,2500)("https://www.urlexample/image/" + Column1))

Note: @[User::vDestinationFolder] is a variable we used for the local path</pre><p>
<div id="attachment_9963" style="width: 796px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9963" class="wp-image-9963 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2.png" alt="Expression in derived column" width="786" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2.png 786w, https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2-300x242.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2-768x620.png 768w" sizes="(max-width: 786px) 100vw, 786px" /></a><p id="caption-attachment-9963" class="wp-caption-text">Add a new column and verify the HTML path</p></div>
<h3>Send the request and save the image In the folder TO download images from a Web Page</h3>
<p>10. Now we will drag and drop a web API destination and select the column in the input column to URL. If the request is right, we can save the image in the local file.</p>
<div id="attachment_11103" style="width: 728px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/03/wad1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11103" src="https://zappysys.com/blog/wp-content/uploads/2023/03/wad1.jpg" alt="Web API destination for images URL" width="718" height="771" class="size-full wp-image-11103" srcset="https://zappysys.com/blog/wp-content/uploads/2023/03/wad1.jpg 718w, https://zappysys.com/blog/wp-content/uploads/2023/03/wad1-279x300.jpg 279w" sizes="(max-width: 718px) 100vw, 718px" /></a><p id="caption-attachment-11103" class="wp-caption-text">Send a request for all images you get</p></div>
<p>11. Now drag and drop an Export Column transformation and select the ResponseText from the request and the file path.</p>
<div id="attachment_9967" style="width: 761px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/exportColumn.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9967" class="wp-image-9967 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/exportColumn.png" alt="download images from a web page - Export properties" width="751" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/exportColumn.png 751w, https://zappysys.com/blog/wp-content/uploads/2023/02/exportColumn-300x254.png 300w" sizes="(max-width: 751px) 100vw, 751px" /></a><p id="caption-attachment-9967" class="wp-caption-text">Select the image response and the local file path</p></div>
<p>12. Finally, we use a trash destination to close the flow.</p>
<div id="attachment_9964" style="width: 352px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/dataflow2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9964" class="wp-image-9964 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/dataflow2.png" alt="download images from a web page - All the tasks together " width="342" height="523" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/dataflow2.png 342w, https://zappysys.com/blog/wp-content/uploads/2023/02/dataflow2-196x300.png 196w" sizes="(max-width: 342px) 100vw, 342px" /></a><p id="caption-attachment-9964" class="wp-caption-text">The final result</p></div>
<h2>Conclusion</h2>
<p>If everything is OK, you will be able to download the images from your HTML page. To do that, we read the list of URLs from a list. Then we get the name of the images using expressions. Then we add a path for each image to store them. Finally, we save the images.</p>
<p>The post <a href="https://zappysys.com/blog/how-to-download-images-from-a-web-page-using-ssis/">How to download images from a web page using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to call NetSuite RESTlet API in SSIS / ODBC</title>
		<link>https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 23 May 2022 21:18:19 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[NetSuite]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9657</guid>

					<description><![CDATA[<p>Introduction In our previous post we saw how to read API data in SSIS. This post we will cover how to call NetSuite RESTlet to read / write data in SSIS or ODBC Apps. For demo purpose we will use SSIS PowerPack REST API Task but concepts and many UI elements remain same for ODBC [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</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/2022/05/netsuite-logo.png"><img loading="lazy" decoding="async" class=" wp-image-9658 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png" alt="" width="144" height="114" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png 309w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo-300x238.png 300w" sizes="(max-width: 144px) 100vw, 144px" /></a>In our previous post we saw how to <a href="https://zappysys.com/blog/ssis-read-api-data-load-sql-table/">read API data in SSIS</a>. This post we will cover how to call <a href="https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N2979684.html">NetSuite RESTlet</a> to read / write data in SSIS or ODBC Apps. For demo purpose we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS PowerPack REST API Task</a> but concepts and many UI elements remain same for <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/">ODBC JSON Driver</a> too. This article assumes you know how to write Netsuite RESTlet and you have obtained Credentials to call RESTlet from extranal app.</p>
<h2></h2>
<h2></h2>
<h2>What is NetSuite RESTlets</h2>
<p>NetSuite added a really nice feature to expose business data and workflows as API by writing Javascript functions which they call it <strong>RESTlets</strong>. You can secure and customize these restlets as per your need.</p>
<p>You can automate CRUD (Create /Read / Write / Delete) operations in NetSuite by writing special functions in JavaScript and expose those functions as API URL which can be called by any external Systems (i.e. SSIS Packages , ODBC Apps like Power BI, Informatica, SSRS).</p>
<p>RESTlet can be secured few ways such as OAuth 1.0 and OAuth 2.0 authentication. We will cover both approach briefly in this article. You can choose any one as per your need</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>Creating NetSuite RESTlet / Obtain OAuth Credentials (Client ID and Secret)</h2>
<p>Below video shows how to obtain necessary credentials to call Netsuites API (RESTlet).</p>
<p>At mark 4:30 seconds it will show you How to use OAuth 2.0 for calling RESTlet</p>
<a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FMAOMQp5dh0U%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<p>&nbsp;</p>
<h2>Create NetSuite RESTlet Connection</h2>
<p>There are few ways to authenticate NetSuite RESTlet. If you are using ZappySys Products then it makes it super easy to use either approach. Lets look at both approaches.</p>
<h3>Using OAuth 2.0 (Recommended)</h3>
<p>As per above video if you obtained Client ID and Secret for OAuth 2.0 you can follow below steps to configure OAuth connection to call RESTlet.</p>
<p>What you need to use OAuth 2.0.</p>
<ul>
<li>Your Account ID (it goes in URL)</li>
<li>Your Client ID and Secret (Obtained from Netsuite Portal) &#8211; See above video Mark 04:30</li>
<li>Register Redirect URL in NetSuite portal (we recommend you use <strong>https://zappysys.com/oauth</strong> as call back Url for Automatic Code extraction)</li>
</ul>
<p><strong>Steps to configure OAuth Connection</strong></p>
<ol>
<li>Right click on Connection Panel and choose Choose &#8220;New Connection..&#8221;. Select <strong>ZS-OAUTH</strong> type<br />
<strong><strong><br />
</strong></strong></p>
<div id="attachment_1569" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1569" class="size-full wp-image-1569" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div>
<p>&nbsp;</p>
<p>&nbsp;</li>
<li> Enter following things<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On General Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
ClientID and Secret: <strong>&lt;get it from NetSuite&gt;</strong><br />
Authorization URL: <strong>https://&lt;accountID&gt;.</strong><a href="http://app.netsuite.com/app/login/oauth2/authorize.nl" target="_blank" rel="noopener noreferrer"><strong>app.netsuite.com/app/login/oauth2/authorize.nl</strong></a><br />
Token URL: <strong>https://&lt;accountID&gt;.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token<br />
</strong>Scope: <strong><strong><strong>restlet</strong></strong></strong></p>
<div id="attachment_9660" style="width: 642px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9660" class="size-full wp-image-9660" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png" alt="Configure NetSuite OAuth 2.0 Connection for API call" width="632" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png 632w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection-300x198.png 300w" sizes="(max-width: 632px) 100vw, 632px" /></a><p id="caption-attachment-9660" class="wp-caption-text">Configure NetSuite OAuth 2.0 Connection for API call</p></div>
<p>&nbsp;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On Advanced Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Callback / Redirect URL:  <strong>https://zappysys.com/oauth </strong> (this must be entered same way in NetSuite Portal)</p>
<div id="attachment_9659" style="width: 563px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9659" class="size-full wp-image-9659" src="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png" alt="OAuth2 Connection - Callback / Redirect URL" width="553" height="201" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png 553w, https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url-300x109.png 300w" sizes="(max-width: 553px) 100vw, 553px" /></a><p id="caption-attachment-9659" class="wp-caption-text">OAuth2 Connection &#8211; Callback / Redirect URL</p></div></li>
<li>Now go back to General Tab and click <strong>Generate Token</strong> button</li>
<li>Follow login screen and try to finish the flow. At the end it will generate Tokens and populate on UI</li>
<li>Click OK to save</li>
</ol>
<h3>Using OAuth 1.0</h3>
<p>Another approach is use OAuth 1.0 (Older version). If you have enabled OAuth 1.0 in NetSuite then follow below steps (Create connection is same as before).</p>
<ol>
<li>Setup General Tab and Advanced Tab as below.<br />
On <strong>==== </strong><strong>General Tab====</strong>:<br />
Enter ClientID, ClientSecret, AccessToken, AccessToken Secret<br />
On <strong>==== </strong><strong>Advanced Tab ====</strong>:<br />
Check <strong>Do Not Include Empty Key/Value Pairs</strong><br />
Select Signature Method as <strong>HMAC-SHA256</strong><br />
For Extra Token Attribute enter <strong>realm=&lt;your-account-number&gt;_SB1</strong></li>
<li>Click OK to Save</li>
</ol>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9662" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9661" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<h2></h2>
<h2>Call NetSuite RESTlet in SSIS</h2>
<ol>
<li>Create a new SSIS Package</li>
<li>Drag REST API Task from SSIS Toolbox<img decoding="async" class="figureimage" title="SSIS REST Api Web Service Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="SSIS REST Api Task - Drag and Drop" /></li>
<li>Double click the Task to configure</li>
<li>Select <strong>URL from Connection </strong></li>
<li>From Connection dropdown select OAuth connection we created in the earlier section (either OAuth 1 or OAuth 2)</li>
<li>Enter the URL as below. Assuming you copied URL from NetSuite Replace script ID and account number<br />
<pre class="crayon-plain-tag">https://&lt;account-number&gt;-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=&lt;scriptid&gt;&amp;deploy=1</pre>Enter <strong>&lt;account-number&gt;</strong><br />
Enter <strong>&lt;scriptid&gt;</strong></li>
<li>Change Method to POST if your script supports Parameters (Else you can supply id=xxxx and recordtype=xxxxx in the URL for GET request)</li>
<li>If its POST request then chnage ContentType to ApplicationJSON (application/json)</li>
<li>Enter your Input in the body. In below example our RESTlet takes sql query as input so we enter just one parameter named query but you can have different parameter(s)<br />
<pre class="crayon-plain-tag">Syntax:  { param1_name : &lt;value&gt; , param2_name : &lt;value&gt; ....  }</pre>
</li>
<li>Now click Test see everything works
<div id="attachment_9663" style="width: 1178px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9663" class="size-full wp-image-9663" src="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png" alt="Calling NetSuite RESTlet in SSIS (Using REST API Task)" width="1168" height="928" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png 1168w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-300x238.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-768x610.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-1024x814.png 1024w" sizes="(max-width: 1168px) 100vw, 1168px" /></a><p id="caption-attachment-9663" class="wp-caption-text">Calling NetSuite RESTlet in SSIS (Using REST API Task)</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>We saw how easy it is to call NetSuite RESTlets or other NetSuite API in SSIS / other BI Apps using ODBC Drivers provided by ZappySys. <a href="https://zappysys.com/products/ssis-powerpack/download/">Download SSIS PowerPack</a> and try your self see how easy it is to consume virtually any API in SSIS.</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</title>
		<link>https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 28 Apr 2022 18:38:33 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[manageengine]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[servicedesk]]></category>
		<category><![CDATA[zoho]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9624</guid>

					<description><![CDATA[<p>Introduction In this post, you will learn how to read / write ManageEngine ServiceDesk data in SSIS (Drag and drop approach without any coding).  We will use SSIS JSON/ REST API Source to extract data from Servicedesk API and use SSIS Web API Destination to write data to Zoho. We will look at step-by-step instructions to read ServiceDesk  data [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/">Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho 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/zoho-managedengine-service-desk-plus-connector/">API Connector for Zoho / ManageEngine ServiceDesk Pro OnDemand (Cloud Version)</a> which makes it much simpler to <strong>Read/Write ServiceDesk 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>
<p>In this post, you will learn how to read / write ManageEngine ServiceDesk data in SSIS (Drag and drop approach without any coding).  We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON/ REST API Source</a> to extract data from Servicedesk API and use <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination</a> to write data to Zoho.</p>
<p>We will look at step-by-step instructions to read ServiceDesk  data (e.g. Request, Problems, Contacts) and load into SQL Server Database Table.</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>Authentication ServiceDesk REST API in SSIS (Use OAuth 2.0)</h2>
<p>Very first step to call ServiceDesk API is you need to register OAuth App in Zoho Portal. Don&#8217;t get confused if you see Zoho Portal for ServiceDesk a Product from ManageEngine is in fact Zoho subsidiary (in other words Zoho is the parent company). ServiceDesk has On-Premises version too but this article is only about Cloud version.</p>
<h3>Register Zoho OAuth App and get ClientID/ Secret (*** MUST READ ***)</h3>
<p><a href="https://zappysys.com/blog/register-oauth-app-zoho-api/" target="_blank" rel="noopener">Check this article</a> to register your OAuth App and obtain Client ID  /Client Secret</p>
<h3>Create ServiceDesk API Connection in SSIS</h3>
<p>Once you create Zoho OAuth App now its time to call some Zoho API. Let&#8217;s create the OAuth Connection first. In the next section we will see how to load data in SQL Server.</p>
<ol>
<li>Right click on Connection Panel and choose Choose &#8220;New Connection..&#8221;. Select <strong>ZS-OAUTH</strong> type
<div id="attachment_1569" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1569" class="size-full wp-image-1569" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div></li>
<li>Configure your OAuth connection General Tab as below</li>
<li>OAuth Provider: <strong>Custom</strong></li>
<li>OAuth Version: <strong>OAuth2</strong></li>
<li><strong>Client Id</strong> , <strong>Client Secret </strong></li>
<li>Enter One Scope Per Line (For more info on scope <a href="https://www.manageengine.com/products/service-desk/sdpod-v3-api/getting-started/oauth-2.0.html#scopes" target="_blank" rel="noopener">read here</a>) . For write you can change READ to WRITE or use ALL as per the help link.<br />
<pre class="crayon-plain-tag">SDPOnDemand.requests.READ</pre>
</li>
<li>Auth URL : <strong>https://accounts.zoho.com/oauth/v2/auth</strong></li>
<li>Token URL:  <strong><strong>https://accounts.zoho.com/oauth/v2/token</strong></strong><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9617" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png" alt="" width="577" height="328" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png 577w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes-300x171.png 300w" sizes="(max-width: 577px) 100vw, 577px" /></a></li>
<li>Configure Advanced tab as below</li>
<li>Enter Callback URL : <strong>https://zappysys.com/oauth</strong></li>
<li>Enter Extra Attribute for /Auth : <strong>access_type=offline&amp;prompt=consent</strong><br />
This is needed to obtain refresh_token (if you ommit this then only access_token returned which cannot be renewed once expired after 1hr)</p>
<div class="mceTemp"></div>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9618" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png" alt="" width="551" height="320" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png 551w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url-300x174.png 300w" sizes="(max-width: 551px) 100vw, 551px" /></a></li>
<li>Now go back to general tab and <strong>Click Generate Token</strong>. Close the Popup and use Full browser instead if you see prompt.</li>
<li>Click OK to save the connection UI</li>
</ol>
<h2>Read data from ServiceDesk API in SSIS JSON Source</h2>
<p>In this section we will learn how to read data from ServiceDesk using SSIS JSON Source. We will use OAuth connection created in earlier section.</p>
<p>Now lets look at step by step example of reading ManageEngine ServiceDesk data using SSIS (e.g. Requests).</p>
<p>ManageEngine provides JSON API for read action so we will Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a> for this purpose.</p>
<h3>Configure JSON Source</h3>
<p>So below steps shows example of reading from ManageEngine Requests API</p>
<ol>
<li>Open SSIS Package</li>
<li>Drag data flow task from Control flow SSIS Toolbox
<div style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="Drag data flow from SSIS Toolbox" width="460" height="155" /><p class="wp-caption-text">Drag data flow from SSIS Toolbox</p></div></li>
<li>Go to data flow and drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a> from SSIS Toolbox
<div style="width: 551px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="Drag and drop SSIS JSON Source (REST API or File)" width="541" height="144" /><p class="wp-caption-text">Drag and drop SSIS JSON Source (REST API or File)</p></div></li>
<li>Double click JSON Source to configure. Enter URL as below. You can supply few more parameters. <a href="https://www.zoho.com/crm/developer/docs/api/get-records.html" target="_blank" rel="noopener">Click Here to get full list of parameters and usage</a>. In below example we are reading records from Leads Module but you can replace Leads to something else (e.g. Accounts). Refer to above help link for available Modules.<br />
<pre class="crayon-plain-tag">https://sdpondemand.manageengine.com/api/v3/requests</pre>
</li>
<li>Check Use Credentials. Select OAuth connection manager we created in the previous section.</li>
<li>Add the Accept header in HTTP Headers.<br />
<pre class="crayon-plain-tag">Accept: application/vnd.manageengine.sdp.v3+json</pre>
</li>
<li>Under filter options tab, enter <strong>Array Filter</strong> as  <pre class="crayon-plain-tag">$.requests[*]</pre></li>
<li>Now click Preview to see your data</li>
<li>Click OK to save UI. In the next section, we will see how to setup pagination and incremental extract of Servicedesk records. After that we will see how to load data into SQL Server Table.</li>
</ol>
<div id="attachment_9626" style="width: 961px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9626" class="size-full wp-image-9626" src="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png" alt="Read ManageEngine ServiceDesk Plus data in SSIS (Cloud Version) - Zoho API" width="951" height="909" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png 951w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api-300x287.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api-768x734.png 768w" sizes="(max-width: 951px) 100vw, 951px" /></a><p id="caption-attachment-9626" class="wp-caption-text">Read ManageEngine ServiceDesk Plus data in SSIS (Cloud Version) &#8211; Zoho API</p></div>
<h3>ServiceDesk API Pagination (Read all Requests)</h3>
<p>Just like most API ServiceDesk also uses pagination. See below to learn how to configure pagination in JSON Source for ServiceDesk API.</p>
<ol>
<li>Double click JSON Source</li>
<li>Change URL to include two things (Page size (how many rows per page and start row). Note &lt;%page%&gt; must match with <strong>Page Num Indicator </strong>you going enter in the next screen<br />
<pre class="crayon-plain-tag">https://sdpondemand.manageengine.com/api/v3/requests?input_data={"list_info":{"row_count":100,"start_index":&lt;%page%&gt;}}</pre>
</li>
<li>Go to <strong>Pagination</strong> Tab and select <strong>URL Path Mode</strong></li>
<li>For <strong>Page Num Indicator</strong> : Enter <pre class="crayon-plain-tag">&lt;%page%&gt;</pre></li>
<li>For <strong>Increment By</strong> : Enter <pre class="crayon-plain-tag">100</pre></li>
<li>Page Start Number select New variable call it StartIndex and start default value <strong>1</strong></li>
</ol>
<p>Once you configure this way now your API will return all records until last page is detected. For more information on pagination <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">check this article</a></p>
<div id="attachment_9628" style="width: 1043px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9628" class="size-full wp-image-9628" src="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png" alt="How to paginate ManageEngine ServiceDesk API" width="1033" height="1006" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png 1033w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-300x292.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-768x748.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-1024x997.png 1024w" sizes="(max-width: 1033px) 100vw, 1033px" /></a><p id="caption-attachment-9628" class="wp-caption-text">How to paginate ManageEngine ServiceDesk API</p></div>
<h3>Loading ServiceDesk data into SQL Server Table / 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>
<h3>Write data to ServiceDesk using OAuth 2.0</h3>
<p>If you like to load data from any source (i.e. SQL Server) to Zoho CRM then you can use <a href="https://www.zoho.com/crm/developer/docs/api/insert-records.html" target="_blank" rel="noopener">Records API (POST)</a>. Use a combination of the following Transforms  / Components. Later in this article we have some more examples (Older API) which may give you one more ways to load data into Zoho (Use of Template Transform).</p>
<p>Basically you have to build POST Body using JSON Generator Transform or Template Transform and then use that data in Web API Destination to call POST API request to push data to ServiceDesk. Basically screnshot below is just an example using some other Zoho API but you get the idea.</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/images/SSIS-PowerPack/ssis-json-generator-transform.png" alt="JSON Generator Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a></td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-parser-transform/ssis-json-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<div id="attachment_8312" style="width: 678px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8312" class="size-full wp-image-8312" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png" alt="Create JSON for POST request (Single dataset pattern)" width="668" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png 668w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write-275x300.png 275w" sizes="(max-width: 668px) 100vw, 668px" /></a><p id="caption-attachment-8312" class="wp-caption-text">Create JSON for POST request (Single dataset pattern)</p></div>
<p>&nbsp;</p>
<div id="attachment_8313" style="width: 757px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8313" class="size-full wp-image-8313" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png" alt="Insert data to Zoho Table using SSIS (Lead, Account Modules) - Bulk Load using POST API call" width="747" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png 747w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts-300x253.png 300w" sizes="(max-width: 747px) 100vw, 747px" /></a><p id="caption-attachment-8313" class="wp-caption-text">Insert data to Zoho Table using SSIS (Lead, Account Modules) &#8211; Bulk Load using POST API call</p></div>
<h2>Write data to ServiceDesk using SSIS (Import SQL Server Table to ServiceDesk)</h2>
<p>Now you know how to read data from Zoho CRM using JSON API Source next step is to load data to Zoho CRM. For writing data we will use following three components</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"></td>
<td>Template Transform</td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/xml-parser-transform/ssis-xml-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-parser-transform/" target="_blank" rel="noopener">XML Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<div class="mceTemp"></div>
<div class="content_block" id="custom_post_widget-1887"><h3>Truncation related error</h3>
<p style="text-align: justify;">The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected. For detailed instructions on how to fix common metadata related errors read an article "<a href="//zappysys.com/blog/handling-ssis-component-metadata-issues/" target="_blank" rel="noopener">How to handle SSIS errors (truncation, metadata issues)</a>".</p>

<h3>Authentication related error</h3>
Another frequent error you may get is an authentication error, which happens when you deploy/copy a package to another machine and run it there. Check <a href="#Deployment_to_Production">the paragraph below</a> to see why it happens and how to solve this problem.</div>
<div class="content_block" id="custom_post_widget-2021"><h2>Things have gone bad: Error handling &amp; debugging</h2>
<p style="text-align: justify;">Incidentally, bad things can happen<i>. </i>A remote server may go offline or your server may go out of memory. In any case, you may want to know when that happens and take actions accordingly. For that purpose, you have to redirect bad rows to some other destination. For this example, we will take and use <em>Web API Destination</em>, but basically, you can use any SSIS component:</p>

<h3>Handling errors</h3>
<ol style="margin-left: 0;">
 	<li>Add a <em>Derived Column</em> above <em>Web API Destination</em> with expression <strong>"(DT_WSTR,4000)ZS_JSON_OUT"</strong> and name it <strong>"JsonAsString"</strong>. This will let you see what JSON you are actually passing.</li>
 	<li>Then add a database or file destination or use another <em>Trash Destination</em> for debugging purposes and redirect the bad rows (<span style="color: #d66565;">red arrow</span>) from <em><em>Web API Destination </em></em>into it<em><em>. </em></em>Don't forget to set <span class="lang:default decode:true crayon-inline">Redirect row</span> option for both, <em>Error</em> and <em>Truncation</em> columns:<em><em>
</em></em>
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1487 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" alt="Redirect bad rows from &lt;em&gt;Web API Destination&lt;/em&gt; to &lt;em&gt;Trash Destination&lt;/em&gt; when load from SQL Server to Elasticsearch is failing. Add derived column JsonAsString to be able to read JSON you are using." width="739" height="267" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png 739w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows-300x108.png 300w" sizes="(max-width: 739px) 100vw, 739px" /></a>
<p class="wp-caption-text">Redirected failed requests from <em>Web API Destination</em> to a desired destination when loading from SQL Server to REST API Service is failing. Derived Column <em>JsonAsString</em> added to be able to read JSON which was passed to Elasticsearch</p>

</div></li>
 	<li>Finally, add a <a href="https://technet.microsoft.com/en-us/library/ms140318%28v=sql.90%29.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener"><em>Data Viewer</em></a> for the red path, if you want to debug the flow. You will be able to see URL, JSON and the error message for each record. You may want to copy-paste <em>ErrorMessage</em> to <em>Notepad </em>if you want it to be more readable:
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1494 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" alt="Use Data Viewer to view HTTP requests that failed to be fulfilled in Elasticsearch" width="752" height="280" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png 752w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-300x112.png 300w" sizes="(max-width: 752px) 100vw, 752px" /></a>
<p class="wp-caption-text">Use Data Viewer to view HTTP requests that failed to be fulfilled.</p>

</div></li>
</ol>
<div class="su-note" style="border-color: #e5dea5; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;">
<div class="su-note-inner su-clearfix" style="background-color: #fff7b7; border-color: #fffdf1; color: #333333; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"><strong>NOTE</strong>: You can read more about redirecting rows in <a href="//zappysys.com/blog/ssis-error-handling-in-data-flow-redirect-bad-rows/" target="_blank" rel="noopener">SSIS Error Handling (Redirect bad rows)</a> article.</div>
</div>
<h3>Debugging HTTP requests</h3>
<p style="text-align: justify;">A common thing you have to do when working with HTTP requests is to debug those requests; e.g. to check what headers, body or URL was passed. <span id="Debug_Web_API_call_using_Fiddler"></span>To test how things look behind the scenes we strongly suggest to use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> - a popular web debugging tool.</p>
<p style="text-align: justify;">Inside it, you can double-click the URL entry (Right side) to see Request and Response Panels. The top panel is Request (URL, Headers, Body) and Bottom Panel is Response. For https:// (secure URL) make sure you enable HTTPS option in Fiddler (Tools &gt; Options &gt; HTTPS &gt; Check Decrypt https request):</p>

<div id="attachment_2344" class="wp-caption alignnone">

<a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-2344 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/05/ssis-rest-api-call-debug-via-fiddler.png" alt="Debugging Web API call using Fiddler in SSIS" width="1287" height="564" data-attachment-id="2344" data-permalink="https://zappysys.com/blog/pass-authorization-header-redirected-location/ssis-rest-api-call-debug-via-fiddler/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=1287%2C564&amp;ssl=1" data-orig-size="1287,564" 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="ssis-rest-api-call-debug-via-fiddler" data-image-description="&lt;p&gt;Debugging Web API call using Fiddler in SSIS&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=720%2C316&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png 1287w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-768x337.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-1024x449.png 1024w" sizes="(max-width: 1287px) 100vw, 1287px" /></a>
<p class="wp-caption-text">Debugging Web API call using Fiddler in SSIS</p>

</div></div>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>Manageengine  Servicedesk API provides a great way to automate data read/write operations. However, to call Service API  you have to use SDK / coding approach (e.g. C#, Java, Python, Ruby). Luckily ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> provides a great way to integrate any Servicedesk API call via a  simple drag and drop approach without coding. Try  <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> for free and call virtually any REST API in a few clicks.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/">Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read Salesforce Metadata in SSIS using REST API (JSON Source)</title>
		<link>https://zappysys.com/blog/read-salesforce-metadata-ssis-using-rest-api-json-source/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 18 May 2020 16:13:07 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS Salesforce Connection]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[salesforce]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8909</guid>

					<description><![CDATA[<p>Introduction In our previous posts we saw how to read and write Salesforce Data using SSIS. In this post we will see how to read Salesforce Metadata in SSIS using JSON Source. Step-By-Step In this section you will learn how to use ZappySys JSON Source Adapter to extract data from Salesforce REST API (JSON Format). You [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-salesforce-metadata-ssis-using-rest-api-json-source/">How to read Salesforce Metadata in SSIS using REST API (JSON Source)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous posts we saw how to <a href="https://zappysys.com/blog/export-data-from-salesforce-to-sql-server-using-ssis/" target="_blank" rel="noopener">read</a> and <a href="https://zappysys.com/blog/loading-data-salesforce-using-ssis-bulk-insert-update-delete/" target="_blank" rel="noopener">write</a> Salesforce Data using SSIS. In this post we will see how to read Salesforce Metadata in SSIS using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a>.</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>Step-By-Step</h2>
<p>In this section you will learn how to use ZappySys JSON Source Adapter to extract data from Salesforce REST API (JSON Format). You can call pretty much Any REST API to fetch data from salesforce but our example for this post would be read metadata (i.e. table list) from salesforce (we will call <a href="https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_basic_info.htm" target="_blank" rel="noopener">sobjects</a> to get all table information) .</p>
<p>So lets get started.</p>
<ol>
<li>In case you missed the previous section, You need to <b>Download and Install</b> SSIS <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">ZappySys PowerPack.</a></li>
<li>Once you finished first step, Open Visual Studio and Create New SSIS Package Project.</li>
<li>Now, Drag and Drop SSIS <b>Data Flow Task</b> from SSIS Toolbox.<br />
<img decoding="async" class="figureimage" title="SSIS Data Flow Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" /></li>
<li>Double click on the Data Flow task to see Data Flow designer surface.</li>
<li>From the SSIS toolbox drag and drop JSON Source on the Data Flow designer surface.<br />
<img decoding="async" class="figureimage" title="SSIS JSON Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="SSIS JSON Source - Drag and Drop" /></li>
<li>Now double click JSON Source enter any valid REST API URL like below. Make sure you used correct instance name. Using wrong instance name might slow down connection or fail your request. If you are not sure then just login to salesforce portal using credentials you like to use and observe browser URL.. It will have instance number.<br />
<pre class="crayon-plain-tag">https://na34.salesforce.com/services/data/v20.0/sobjects/Account/describe/</pre>
</li>
<li>Check Use Connection and select New <strong>ZS-Salesforce</strong> Connection from the list.
<div id="attachment_8918" style="width: 602px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/create-ssis-rest-api-connection-connect-http-oauth-salesforce.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8918" class="size-full wp-image-8918" src="https://zappysys.com/blog/wp-content/uploads/2018/07/create-ssis-rest-api-connection-connect-http-oauth-salesforce.png" alt="Create new REST API Connection in SSIS (For JSON, XML or CSV Source)" width="592" height="215" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/create-ssis-rest-api-connection-connect-http-oauth-salesforce.png 592w, https://zappysys.com/blog/wp-content/uploads/2018/07/create-ssis-rest-api-connection-connect-http-oauth-salesforce-300x109.png 300w" sizes="(max-width: 592px) 100vw, 592px" /></a><p id="caption-attachment-8918" class="wp-caption-text">Create new REST API Connection in SSIS (For JSON, XML or CSV Source)</p></div></li>
<li>Configure your salesforce connection<br />
<img decoding="async" class="figureimage" title="SSIS Salesforce Connection Manager UI " src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/salesforce-connection/ssis-salesforce-connection-manager-ui.png" alt="SSIS Salesforce Connection Manager UI " /></li>
<li>Select or type filter. For example in this case you will type <pre class="crayon-plain-tag">$.sobjects[*]</pre></li>
<li>Click OK to Save UI and attach your source to some target like OLEDB Destination and run your data flow to test.</li>
<li>Here is full UI after all configurations.
<div id="attachment_10310" style="width: 909px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10310" class="wp-image-10310 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list.png" alt="ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list" width="899" height="792" srcset="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list.png 899w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list-300x264.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list-768x677.png 768w" sizes="(max-width: 899px) 100vw, 899px" /></a><p id="caption-attachment-10310" class="wp-caption-text">Read Salesforce Metadata in SSIS (Get Table List Example &#8211; SOObject REST API Call)</p></div></li>
</ol>
<h2>How to read Salesforce Table Fields Metadata</h2>
<p>If you have need to read fields and its information for tables then use below steps</p>
<ol>
<li>Use almost identical steps as previous section. Except two things. Our URL and Filter would be different.</li>
<li>Configure your API URL as below<br />
<pre class="crayon-plain-tag">https://YOUR-INSTANCE.salesforce.com/services/data/v20.0/sobjects/YOUR-TABLE/describe/</pre>
<strong>Example:</strong><br />
<pre class="crayon-plain-tag">https://demo.salesforce.com/services/data/v20.0/sobjects/Account/describe/</pre>
</li>
<li>Configure Filter as a <pre class="crayon-plain-tag">$.fields[*]</pre></li>
</ol>
<div id="attachment_10311" style="width: 902px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10311" class="wp-image-10311 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1.png" alt="ssis-salesforce-get-table-fields-metadata-1" width="892" height="757" srcset="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1.png 892w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1-300x255.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1-768x652.png 768w" sizes="(max-width: 892px) 100vw, 892px" /></a><p id="caption-attachment-10311" class="wp-caption-text">Get Salesforce Table Fields Metadata using REST API call in SSIS</p></div>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-salesforce-metadata-ssis-using-rest-api-json-source/">How to read Salesforce Metadata in SSIS using REST API (JSON Source)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to migrate Postman API call to SSIS / ODBC PowerPack</title>
		<link>https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 17 Oct 2019 16:41:23 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[postman]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8172</guid>

					<description><![CDATA[<p>Introduction In the previous article, we learned how to copy settings from curl to ZappySys products, and in this article, we will continue on how to migrate Postman API call to SSIS / ODBC PowerPack. Postman is a very popular client tool to test API calls. Many API providers document how to call their API using [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/">How to migrate Postman API call to SSIS / ODBC PowerPack</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><img loading="lazy" decoding="async" class="wp-image-8173 size-thumbnail alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon.png 330w" sizes="(max-width: 150px) 100vw, 150px" /></p>
<p style="text-align: justify;">In the previous article, we learned <a href="https://zappysys.com/blog/using-ssis-curl-syntax-to-ssis-api-task/" target="_blank" rel="noopener">how to copy settings from curl to ZappySys products</a>, and in this article, we will continue on how to migrate Postman API call to SSIS / ODBC PowerPack. <a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a> is a very popular client tool to test API calls. Many API providers document how to call their API using Postman. In this article we will focus on how to use the same settings in ZappySys Products to implement API integration in SSIS or other apps like Power BI, Informatica, Excel, Tableau, SSRS&#8230; many ODBC apps.</p>
<p style="text-align: justify;">When you are connecting to an API you may have examples of how to do that in <a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a>. If you know how to do it in Postman, you are one step away from making it work in <a href="https://www.zappysys.com/products/ssis-powerpack" target="_blank" rel="noopener">SSIS PowerPack</a> and <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a> (JSON, XML, CSV Drivers, and other). Most of the examples will show how to do that specifically using ODBC PowerPack and <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">JSON Driver</a>, but since ODBC PowerPack UI is very similar to the connectors of SSIS PowerPack, it will be quite clear where to use it in SSIS PowerPack as well. In the examples where UI differs significantly, both &#8211; ODBC and SSIS PowerPack &#8211; examples will be presented.</p>
<h2></h2>
<h2>Prerequisites</h2>
<p>In this article we assume you meet these requirements:</p>
<h3><span style="font-size: 12pt;">When migrating Postman API call to SSIS PowerPack</span></h3>
<ol>
<li><a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a> installed.</li>
<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 Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
</ol>
<h3><span style="font-size: 12pt;">When migrating Postman API call to to ODBC PowerPack</span></h3>
<ol>
<li><a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a> installed.</li>
<li><a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed (<a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
</ol>
<h2>The Basics</h2>
<p>This section shows how to migrate simple options such as URL, HTTP Request Method, and HTTP Headers.</p>
<h3>How to configure the URL and HTTP Request Method</h3>
<div id="attachment_8187" style="width: 767px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8187" class="wp-image-8187 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method.png" alt="Migrate Postman API call to SSIS / ODBC (API URL setting to ODBC Driver (GET / POST) )" width="757" height="617" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method.png 757w, https://zappysys.com/blog/wp-content/uploads/2019/10/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method-300x245.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></a><p id="caption-attachment-8187" class="wp-caption-text">Migrate Postman API call to SSIS / ODBC (API URL setting to ODBC Driver (GET / POST) )</p></div>
<h3>How to configure HTTP Headers</h3>
<div id="attachment_8186" style="width: 583px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8186" class="wp-image-8186 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="Migrate Postman HTTP Headers setting to ODBC Driver" width="573" height="701" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 573w, https://zappysys.com/blog/wp-content/uploads/2019/10/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis-245x300.png 245w" sizes="(max-width: 573px) 100vw, 573px" /></a><p id="caption-attachment-8186" class="wp-caption-text">Migrate Postman HTTP Headers setting to ODBC Driver</p></div>
<h2>Posting data</h2>
<p>In this section, you will find how to post data in ZappySys products. You will learn how to post different formats of data, upload files and send multi-part data.</p>
<h3>How to configure POST raw body</h3>
<div id="attachment_8188" style="width: 765px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8188" class="wp-image-8188 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png" alt="Migrate Postman Body / Content-Type setting to ODBC Driver" width="755" height="738" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png 755w, https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration-300x293.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></a><p id="caption-attachment-8188" class="wp-caption-text">Migrate Postman Body / Content-Type setting to ODBC Driver</p></div>
<h3>How to configure POST JSON body</h3>
<div id="attachment_8435" style="width: 794px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8435" class="wp-image-8435 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png" alt="Migrate Postman Body / Content-Type setting to ODBC Driver" width="784" height="688" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png 784w, https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration-768x674.png 768w" sizes="(max-width: 784px) 100vw, 784px" /></a><p id="caption-attachment-8435" class="wp-caption-text">Migrate Postman Body / Content-Type setting to ODBC Driver</p></div>
<p>Use this table to determine what kind of <em>Body Content Type</em> to configure:</p>
<div class="su-table su-table-alternate">
<table style="border-collapse: collapse;width: 100%;height: 87px" border="1">
<tbody>
<tr style="height: 22px">
<td style="width: 50%;height: 22px"><strong>Data type</strong></td>
<td style="width: 50%;height: 22px"><strong>Body Content Type</strong></td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 21px">Text</td>
<td style="width: 50%;height: 21px">text/plain</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">JSON</td>
<td style="width: 50%;height: 22px">application/json</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">HTML</td>
<td style="width: 50%;height: 22px">text/html</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">XML</td>
<td style="width: 50%;height: 22px">application/xml</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">You don&#8217;t know the type</td>
<td style="width: 50%;height: 22px">Default  (i.e. form/x-www-form-urlencoded data)</td>
</tr>
</tbody>
</table>
</div>
<h3>How to configure POST form/x-www-form-urlencoded data</h3>
<div id="attachment_8189" style="width: 674px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8189" class="wp-image-8189 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Migrate Postman Body (x-www-form-urlencoded) setting to ODBC Driver" width="664" height="568" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png 664w, https://zappysys.com/blog/wp-content/uploads/2019/10/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis-300x257.png 300w" sizes="(max-width: 664px) 100vw, 664px" /></a><p id="caption-attachment-8189" class="wp-caption-text">Migrate Postman Body (x-www-form-urlencoded) setting to ODBC Driver</p></div>
<h3>How to configure multipart form POST data</h3>
<div id="attachment_8190" style="width: 868px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8190" class="wp-image-8190 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Migrate Postman Multi-Part File Upload setting to ODBC Driver (Upload File)" width="858" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png 858w, https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis-300x260.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis-768x667.png 768w" sizes="(max-width: 858px) 100vw, 858px" /></a><p id="caption-attachment-8190" class="wp-caption-text">Migrate Postman Multi-Part File Upload setting to ODBC Driver (Upload File)</p></div>
<h2>Authentication</h2>
<p>This section will cover all common authentication methods, starting from using API Key to OAuth 2.0.</p>
<h3>How to authenticate using API Key in HTTP headers</h3>
<div id="attachment_8191" style="width: 707px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8191" class="wp-image-8191 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="Authentication - Migrate Postman API Key (via header) setting to ODBC Driver" width="697" height="746" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 697w, https://zappysys.com/blog/wp-content/uploads/2019/10/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis-280x300.png 280w" sizes="(max-width: 697px) 100vw, 697px" /></a><p id="caption-attachment-8191" class="wp-caption-text">Authentication &#8211; Migrate Postman API Key (via header) setting to ODBC Driver</p></div>
<h3>How to authenticate using API Key as a parameter in URL</h3>
<div id="attachment_8202" style="width: 767px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-2/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8202" class="wp-image-8202 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-1.png" alt="Authentication - Migrate Postman API Key (via URL query parameter) setting to ODBC Driver" width="757" height="567" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-1.png 757w, https://zappysys.com/blog/wp-content/uploads/2019/10/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-1-300x225.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></a><p id="caption-attachment-8202" class="wp-caption-text">Authentication &#8211; Migrate Postman API Key (via URL query parameter) setting to ODBC Driver</p></div>
<h3>How to authenticate using Bearer Token</h3>
<div id="attachment_8193" style="width: 763px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8193" class="wp-image-8193 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Authentication - Migrate Postman Bearer Token setting to SSIS / ODBC Driver" width="753" height="636" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis.png 753w, https://zappysys.com/blog/wp-content/uploads/2019/10/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis-300x253.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-8193" class="wp-caption-text">Authentication &#8211; Migrate Postman Bearer Token setting to SSIS / ODBC Driver</p></div>
<h3>How to authenticate using Basic Authentication</h3>
<h4>In ODBC PowerPack</h4>
<div id="attachment_8194" style="width: 674px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8194" class="wp-image-8194 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Authentication - Migrate Postman Basic Auth setting to SSIS / ODBC Driver (Login using Userid / password)" width="664" height="732" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis.png 664w, https://zappysys.com/blog/wp-content/uploads/2019/10/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis-272x300.png 272w" sizes="(max-width: 664px) 100vw, 664px" /></a><p id="caption-attachment-8194" class="wp-caption-text">Authentication &#8211; Migrate Postman Basic Auth setting to SSIS / ODBC Driver (Login using Userid / password)</p></div>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-HTTP Connection Manager using instructions below:</p>
<div id="attachment_8195" style="width: 739px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8195" class="wp-image-8195 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png" alt="Authentication - Migrate Postman Basic Auth setting to SSIS JSON / XML Source (Login using Userid / password)" width="729" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png 729w, https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 729px) 100vw, 729px" /></a><p id="caption-attachment-8195" class="wp-caption-text">Authentication &#8211; Migrate Postman Basic Auth setting to SSIS JSON / XML Source (Login using Userid / password)</p></div>
<h3>How to authenticate using OAuth</h3>
<h4>In ODBC PowerPack</h4>
<ol style="margin-left: 0;">
<li>Configure main options:
<div id="attachment_8198" style="width: 864px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8198" class="wp-image-8198 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration.png" alt="Authentication - Migrate Postman OAuth setting to SSIS / ODBC Drivers ( JSON / XML / CSV API) - Client ID / Secret / Scope / Auth and Token Url (Client Credential Grant Type, Password Grant Type, Code Authorization Grant Type)" width="854" height="1112" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration.png 854w, https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration-230x300.png 230w, https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration-768x1000.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration-786x1024.png 786w" sizes="(max-width: 854px) 100vw, 854px" /></a><p id="caption-attachment-8198" class="wp-caption-text">Authentication &#8211; Migrate Postman OAuth setting to SSIS / ODBC Drivers ( JSON / XML / CSV API) &#8211; Client ID / Secret / Scope / Auth and Token Url (Client Credential Grant Type, Password Grant Type, Code Authorization Grant Type)</p></div></li>
<li>Configure Callback/Return Url:
<div id="attachment_8199" style="width: 694px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8199" class="wp-image-8199 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url.png" alt="Authentication - Migrate Postman OAuth setting to SSIS / ODBC Drivers ( Callback / Redirect URL )" width="684" height="458" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url.png 684w, https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url-300x201.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url-272x182.png 272w" sizes="(max-width: 684px) 100vw, 684px" /></a><p id="caption-attachment-8199" class="wp-caption-text">Authentication &#8211; Migrate Postman OAuth setting to SSIS / ODBC Drivers ( Callback / Redirect URL )</p></div></li>
</ol>
<p>If you are using a known, public API service, you may try locating it in the OAuth Providers list, which will save you from configuring Authorization and Access Token URLs:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list/#main" rel="attachment wp-att-8230"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-8230" src="https://zappysys.com/blog/wp-content/uploads/2019/10/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list.png" alt="" width="586" height="493" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list.png 586w, https://zappysys.com/blog/wp-content/uploads/2019/10/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list-300x252.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></a></p>
<p>For simplicity and if your company policy allows it or at least for testing purposes, you can use a Default OAuth Application created by ZappySys:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app/#main" rel="attachment wp-att-8231"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-8231" src="https://zappysys.com/blog/wp-content/uploads/2019/10/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app.png" alt="" width="531" height="495" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app.png 531w, https://zappysys.com/blog/wp-content/uploads/2019/10/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app-300x280.png 300w" sizes="(max-width: 531px) 100vw, 531px" /></a></p>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-OAUTH Connection Manager using instructions below:</p>
<div id="attachment_8196" style="width: 740px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/010-how-to-authenticate-with-oauth-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8196" class="wp-image-8196 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png" alt="Authentication - Migrate Postman OAuth setting to SSIS JSON / XML Source" width="730" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png 730w, https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 730px) 100vw, 730px" /></a><p id="caption-attachment-8196" class="wp-caption-text">Authentication &#8211; Migrate Postman OAuth setting to SSIS JSON / XML Source</p></div>
<h3>How to authenticate using AWS Signature</h3>
<h4>In ODBC PowerPack</h4>
<div id="attachment_8200" style="width: 702px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8200" class="wp-image-8200 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="Authentication - Migrate Postman AWS API call setting to SSIS / ODBC Drivers ( JSON / XML / CSV API call)" width="692" height="465" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 692w, https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis-272x182.png 272w" sizes="(max-width: 692px) 100vw, 692px" /></a><p id="caption-attachment-8200" class="wp-caption-text">Authentication &#8211; Migrate Postman AWS API call setting to SSIS / ODBC Drivers ( JSON / XML / CSV API call)</p></div>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-OAUTH Connection Manager using instructions below:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/010-how-to-authenticate-with-oauth-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-8196 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png" alt="" width="730" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png 730w, https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 730px) 100vw, 730px" /></a></p>
<h3>How to authenticate using NTLM Authentication</h3>
<h4>In ODBC PowerPack</h4>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-8201 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="" width="724" height="578" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 724w, https://zappysys.com/blog/wp-content/uploads/2019/10/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis-300x240.png 300w" sizes="(max-width: 724px) 100vw, 724px" /></a></p>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-HTTP Connection Manager using instructions below:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-8195 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png" alt="" width="729" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png 729w, https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 729px) 100vw, 729px" /></a></p>
<h2>Conclusion</h2>
<p>This article was quite self-explanatory, but if you have any questions or you have an authentication method that is not listed here and you don&#8217;t know how to proceed, please, contact us and we will try to help you: <a href="https://zappysys.com/support/" target="_blank" rel="noopener">https://zappysys.com/support/</a>.</p>
<p>The post <a href="https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/">How to migrate Postman API call to SSIS / ODBC PowerPack</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read YouTube API data in SSIS (Videos, Channels, Playlists)</title>
		<link>https://zappysys.com/blog/read-youtube-api-data-ssis-videos-channels-playlists/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 06 May 2019 18:06:07 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS CSV Generator Transform]]></category>
		<category><![CDATA[SSIS JSON Parser Transform]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[youtube]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6894</guid>

					<description><![CDATA[<p>Introduction In last few articles we saw how to read data from various Google Services. In this article we will see how to read YouTube API data in SSIS. This blog mainly focus on SSIS approach but steps mentioned to call Google APIs can be useful for any developer regardless which programming language or toolset [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-youtube-api-data-ssis-videos-channels-playlists/">How to read YouTube API data in SSIS (Videos, Channels, Playlists)</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/youtube-connector/">API Connector for YouTube</a> which makes it much simpler to <strong>Read/Write YouTube 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>
<a href="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo.png"><img loading="lazy" decoding="async" class=" wp-image-6904 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo.png" alt="" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo.png 400w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo-300x300.png 300w" sizes="(max-width: 100px) 100vw, 100px" /></a>In last <a href="https://zappysys.com/blog/category/google-api/">few articles</a> we saw how to read data from various Google Services. In this article we will see how to read YouTube API data in SSIS. This blog mainly focus on SSIS approach but steps mentioned to call Google APIs can be useful for any developer regardless which programming language or toolset you use.</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>Connect to YouTube API in SSIS (OAuth Connection)</h2>
<p>Very first step to call any Google API is to create an API project for Google Service and then enable APIs you like to call in Console. In our case we need to enable YouTube API.</p>
<p><a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">Check this article</a> to learn how to create API Project and obtain Client ID and Client Secret to connect to YouTube API. For ease of use use Default Application provided by ZappySys but we still recommend using your own Custom Application  on OAuth Connection.</p>
<p>Before we try our first YouTube API example, we recommend you to get familiar with <a href="https://developers.google.com/youtube/v3/docs/" target="_blank" rel="noopener">YouTube API here</a>. Once you done with above steps you can perform the following steps to call YouTube API in SSIS.</p>
<ol>
<li>Open existing SSIS Project or Create new One in Visual Studio (i.e. SSDT)</li>
<li>Create a new SSIS Package. Right click in the Connection Manager Panel and click <strong>&#8220;New Connection&#8230;&#8221;</strong>.<br />
<img decoding="async" class="figureimage" title="SSIS Create New Connection" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/ssis-new-connection.png" alt="SSIS Create New Connection" /></li>
<li>When Dialog box opens select <strong>ZS-OAUTH</strong> connection type.
<div id="attachment_4724" style="width: 681px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4724" class="size-full wp-image-4724" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png" alt="SSIS Connection Maangers List: Select O-AUTH Connection Manager" width="671" height="549" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png 671w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager-300x245.png 300w" sizes="(max-width: 671px) 100vw, 671px" /></a><p id="caption-attachment-4724" class="wp-caption-text">SSIS Connection Managers List: Select O-AUTH Connection Manager</p></div></li>
<li>Once OAuth UI opens, Configure Google connection like below.
<ol>
<li>Select Service Type as <strong>Google</strong></li>
<li>You can select Default App for ease of use or Select Custom Application (Enter Client Id and Secret Obtained using <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">these steps</a> )</li>
<li>In the Scope Enter below &#8211; One scope per line for calling correct YouTube API. Refer to <a href="https://developers.google.com/youtube/v3/docs/" target="_blank" rel="noopener">YouTube API documentation</a> incase you need extra permissions. For read only operation we just need below scopes. Last scope is only needed if you need to use <a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">YouTube Analytics Reports</a><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/youtube
https://www.googleapis.com/auth/youtube.readonly
https://www.googleapis.com/auth/yt-analytics.readonly</pre>
</li>
</ol>
</li>
<li>Click Generate Token to obtain Refresh Token (You may see Login Prompt, and then Grant Permission Confirmation Screen)
<div id="attachment_6855" style="width: 930px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6855" class="size-full wp-image-6855" src="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png" alt="Connect to Google API using OAuth 2.0 (Youtube API Example)" width="920" height="1032" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png 920w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-267x300.png 267w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-768x861.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-913x1024.png 913w" sizes="(max-width: 920px) 100vw, 920px" /></a><p id="caption-attachment-6855" class="wp-caption-text">Connect to Google API using OAuth 2.0 (YouTube API Example)</p></div></li>
<li>Click OK to save UI.</li>
</ol>
<h2>Call YouTube REST API Example</h2>
<p>Now lets look at how to call YouTube API <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a> this task is more suitable to call GET, POST, DELETE, PUT requests without parsing data in Rows and Columns. If you need to parse data and load into Database table then see next section (Use JSON Source)</p>
<ol>
<li>From SSIS Toolbox look for items starting with “ZS”. Drag and Drop <b>[ZS Rest API Task]</b> to Designer Surface.<br />
<img decoding="async" class="figureimage" title="SSIS REST Api Web Service Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="SSIS REST Api Task - Drag and Drop" /></li>
<li>Double click it to configure like below.
<ol>
<li>Select URL From Connection option</li>
<li>Select OAuth connection created in previous section.</li>
<li>Enter URL like below (For example <a href="https://developers.google.com/youtube/v3/docs/playlists/list" target="_blank" rel="noopener">get all playlists</a>). Replace xxxxxxxxxxx with your own channel ID (Its usually found in URL when you visit Youtube Channel Homepage)<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/playlists?part=snippet,id&amp;channelId=xxxxxxxxxxxxx</pre>
</li>
<li>Click Test Request Button</li>
</ol>
</li>
<li>Here is how it looks like
<div id="attachment_6896" style="width: 854px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6896" class="size-full wp-image-6896" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url.png" alt="Call Youtube API in SSIS Example (Dynamic URL)" width="844" height="640" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url.png 844w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url-300x227.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url-768x582.png 768w" sizes="(max-width: 844px) 100vw, 844px" /></a><p id="caption-attachment-6896" class="wp-caption-text">Call Youtube API in SSIS Example (Dynamic URL)</p></div></li>
</ol>
<p>That&#8217;s it we have successfully configured Connection for YouTube API in SSIS. In the next section we will see how to use this connection and read various data from YouTube API.</p>
<h2>Read YouTube Playlists in SSIS</h2>
<p>Once we done creating OAuth Connection Manager we can move forward to read YouTube data inside Data Flow.</p>
<p>Configure SSIS JSON / REST API Source</p>
<ol>
<li>Now, Drag and Drop SSIS <b>Data Flow Task</b> from SSIS Toolbox.<br />
<img decoding="async" class="figureimage" title="SSIS Data Flow Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" /></li>
<li>Double click on the Data Flow task to see Data Flow designer surface.</li>
<li>From the SSIS toolbox drag and drop JSON Source on the dataflow designer surface.<br />
<img decoding="async" class="figureimage" title="SSIS JSON Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="SSIS JSON Source - Drag and Drop" /></li>
<li>Double click JSON Source and enter URL as below (Use variable or Hardcode Channel Id). maxResults controls how many rows you want to get in each response. Rep<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/playlists?part=snippet,id&amp;maxResults=50&amp;channelId={{User::varChannelId}}
--OR-- 
https://www.googleapis.com/youtube/v3/playlists?part=snippet,id&amp;maxResults=50&amp;channelId=xxxxxxxxxxxxxxxxxxxxxx</pre>
</li>
<li>Check Use Credentials and select existing OAuth connection or Create New one</li>
<li>Select Array Filter (Items node) or type <pre class="crayon-plain-tag">$.items[*]</pre>  as below.
<div id="attachment_6900" style="width: 857px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6900" class="size-full wp-image-6900" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists.png" alt="Get Playlists for YouTube Channel" width="847" height="738" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists.png 847w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists-768x669.png 768w" sizes="(max-width: 847px) 100vw, 847px" /></a><p id="caption-attachment-6900" class="wp-caption-text">Get Playlists for YouTube Channel</p></div></li>
<li>That&#8217;s it you can now Click <strong>Preview</strong> to see sample data. In the next section we will configure Pagination to read all records if you have more than 100 rows.</li>
</ol>
<h3>Configure YouTube REST API Pagination</h3>
<p>Most REST APIs dont return data in one big response. So you have to make sure you implement looping / pagination to read more records. Luckily ZappySys supports <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/">many different Pagination Settings</a>. Here is how to configure YouTube REST API Pagination.</p>
<ol>
<li>Go to Pagination Tab found on JSON Source and select following 3 settings</li>
<li>Select Pagination Mode as <pre class="crayon-plain-tag">Response Attribute Mode</pre></li>
<li>Enter Next Link as <pre class="crayon-plain-tag">$.nextPageToken</pre></li>
<li>Enter Suffix for Next URL as <pre class="crayon-plain-tag">&amp;pageToken=&lt;%nextlink%&gt;</pre></li>
</ol>
<div id="attachment_6899" style="width: 555px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6899" class="size-full wp-image-6899" src="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination.png" alt="YouTube REST API Pagination Settings" width="545" height="246" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination.png 545w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination-300x135.png 300w" sizes="(max-width: 545px) 100vw, 545px" /></a><p id="caption-attachment-6899" class="wp-caption-text">YouTube REST API Pagination Settings</p></div>
<h2>Read YouTube Playlist Videos in SSIS</h2>
<p>So in previous section we saw simple API call to read all playlists from YouTube. Now lets see how to get information about <a href="https://developers.google.com/youtube/v3/docs/playlistItems/list" target="_blank" rel="noopener">Playlist Videos</a>.</p>
<p>For that everything should remain same as previous section except change URL as below. Where xxxxxxxxxxxxxxxxxxxxx is your Playlist ID obtained from Previous Call.</p><pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,id&amp;maxResults=50&amp;playlistId=xxxxxxxxxxxxxxxxxxxxx</pre><p>
<h2>Get all Videos for YouTube Channel</h2>
<p>If you want to get all video name and ID for specific channel then use below URL. Click here to <a href="https://developers.google.com/youtube/v3/docs/search/list" target="_blank" rel="noopener">read more</a>. Replace xxxxxxxxxxxxxxxxxxx with your Channel ID.</p><pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/search?channelId=xxxxxxxxxxxxxxxxxxx&amp;part=snippet,id&amp;order=date&amp;maxResults=50</pre><p>
&nbsp;</p>
<h2>Read YouTube Video Views, Likes, Dislikes (Extended Videos)</h2>
<p>Another common request from YouTube API is get Video Information such as Views, Likes, Dislikes, Comment Count etc. For that you can <a href="https://developers.google.com/youtube/v3/docs/videos/list" target="_blank" rel="noopener">use this api</a> . However the issue is this endpoint requires you to pass Comma separated Ids of Video. You can only pass 25 Ids in one requests so if you have 200 videos for which you need to get information then you have to make 8 requests (25 Ids in each Request). In below screenshot you can see we used <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler to debug web requests</a>.</p>
<p>So here is how high level process to fetch extended information for all Videos in your channel. Full <a href="https://zappysys.com/blog/wp-content/uploads/2019/05/Google_Youtube_API_Demo.zip">SSIS Package is attached here (SSIS 2012 Format)</a>.</p>
<ol>
<li>Get all videos for your channel by calling (Assuming you will paginate in below request.<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/search?channelId=xxxxxxxxxxxxxxxxxxx&amp;part=snippet,id&amp;order=date&amp;maxResults=50</pre>
</li>
<li>Build Video Id groups for 25 Ids from above result and submit requests. For example if above request returns 200 Videos then your request to fetch extended information may look like below.<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&amp;id=ID1,ID2,ID3........ID25
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&amp;id=ID26,ID27,ID28........ID50
........
........
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&amp;id=ID176,ID177,ID178........ID200</pre>
</li>
<li>Parse response coming from each Request Above&#8230;. Each Response will give you details about 25 videos you requesting.</li>
</ol>
<p>Here is the flow of our complete data flow to read extended information for all videos. You can read extended information one by one too but it wont be good idea if you have many videos.</p>
<p>We have used Following Components to achieve Bulk Mode</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source (REST API Source)</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-parser-transform/" target="_blank" rel="noopener">CSV Parser Transform</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a></li>
</ul>
<div id="attachment_6901" style="width: 1306px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6901" class="size-full wp-image-6901" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes.png" alt="Get YouTube Video View Clicks, Likes, Dislikes (Bulk Mode for all videos)" width="1296" height="823" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes.png 1296w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes-768x488.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes-1024x650.png 1024w" sizes="(max-width: 1296px) 100vw, 1296px" /></a><p id="caption-attachment-6901" class="wp-caption-text">Get YouTube Video View Clicks, Likes, Dislikes (Bulk Mode for all videos)</p></div>
<h2>Read data from YouTube Analytics / Reporting API (Metrics, Dimensions Report)</h2>
<p>So far we have seen basic YouTube APIs to extract your Channel information. However there is another very powerful API endpoint to query custom reports from YouTube. Check <a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">this YouTube Analytics API endpoint</a>. In this section we will learn how to extract useful information from YouTube using Analytics API.</p>
<h3>Step-By-Step</h3>
<p>Let&#8217;s look at an example to read total views, estimated watch time, average view duration and some other metrics by date for channel you have access.</p>
<ol>
<li>Go to Data Flow, Drag ZS JSON Source from SSIS Toolbox</li>
<li>Double click to configure.</li>
<li>Check Use Credentials. Select OAuth connection we created in previous section.</li>
<li>In the URL field, Enter Below Sample URL. Change Parameters as per your need or leave it default.<br />
For example:<br />
<strong>ids=channel==MINE</strong>   (where MINE can be replaced by other channel id or keep it as MINE to get data for your own channel)<br />
<strong>metrics</strong> (can be changed from any <a href="https://developers.google.com/youtube/analytics/metrics" target="_blank" rel="noopener">valid list here</a>)<br />
<strong>dimensions</strong> (can be changed to any valid <a href="https://developers.google.com/youtube/analytics/dimensions" target="_blank" rel="noopener">list from here</a>)<br />
<strong>startDate</strong> (Must be YYYY-MM-DD format)<br />
<strong>endDate</strong> (Must be YYYY-MM-DD format)<br />
<pre class="crayon-plain-tag">https://youtubeanalytics.googleapis.com/v2/reports?ids=channel==MINE&amp;metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained&amp;dimensions=day&amp;startDate=2019-03-01&amp;endDate=2019-04-01</pre>
</li>
<li>Change Filter to <pre class="crayon-plain-tag">$.rows[*]</pre></li>
<li>Go to <strong>2D Array Transform</strong> tab.<br />
Select Method as <pre class="crayon-plain-tag">Simple 2-dimensional array</pre>
EnterColumn Filter as  <pre class="crayon-plain-tag">$.columnHeaders[*].name</pre>
<div id="attachment_6909" style="width: 906px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6909" class="size-full wp-image-6909" src="https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api.png" alt="YouTube Analytics API Advanced Transformation" width="896" height="270" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api.png 896w, https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api-300x90.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api-768x231.png 768w" sizes="(max-width: 896px) 100vw, 896px" /></a><p id="caption-attachment-6909" class="wp-caption-text">YouTube Analytics API Advanced Transformation</p></div></li>
<li>That&#8217;s it now Preview your data. See below over all steps.
<div id="attachment_6910" style="width: 978px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6910" class="size-full wp-image-6910" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics.png" alt="Read data from YouTube Analytics API (Custom Reports using Dimensions, Metrics Query)" width="968" height="741" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics.png 968w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics-300x230.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics-768x588.png 768w" sizes="(max-width: 968px) 100vw, 968px" /></a><p id="caption-attachment-6910" class="wp-caption-text">Read data from YouTube Analytics API (Custom Reports using Dimensions, Metrics Query)</p></div></li>
</ol>
<h3>Build YouTube Analytics / Reporting API Query (API Playground)</h3>
<p>With Analytics API You can extract many interesting data. You can use Test Tool found <a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">on this page to build</a> some interesting queries. Scroll to <strong>Common Use Cases</strong> section on that link. On the right side you can select Credentials Type as OAuth and click Execute.</p>
<p><a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">https://developers.google.com/youtube/analytics/reference/reports/query</a></p>
<div id="attachment_6911" style="width: 944px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6911" class="size-full wp-image-6911" src="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder.jpg" alt="YouTube Analytics / Reporting API Explorer (Testing API Calls)" width="934" height="688" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder.jpg 934w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder-300x221.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder-768x566.jpg 768w" sizes="(max-width: 934px) 100vw, 934px" /></a><p id="caption-attachment-6911" class="wp-caption-text">YouTube Analytics / Reporting API Explorer (Testing API Calls)</p></div>
<h2>Loading YouTube API Data into SQL Server</h2>
<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>Download Sample SSIS Package</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/Google_Youtube_API_Demo.zip">SSIS Package is attached here (SSIS 2012 Format)</a>.</p>
<h2>Conclusion</h2>
<p>In this article we saw how to extract information from REST API such as YouTube REST API using OAuth 2.0. We also learned techniques like Pagination, JSON Parsing, Request Batching using multiple components to achieve full scale API integration. To explore many other scenarios not discussed in this article download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here (includes 70+ Components)</a>.</p>
<p>The post <a href="https://zappysys.com/blog/read-youtube-api-data-ssis-videos-channels-playlists/">How to read YouTube API data in SSIS (Videos, Channels, Playlists)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read Freshdesk data in SSIS &#8211; REST API Call</title>
		<link>https://zappysys.com/blog/read-freshdesk-data-ssis-rest-api-call/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 09 Apr 2019 15:42:16 +0000</pubDate>
				<category><![CDATA[HTTP Connection]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[freshdesk]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6722</guid>

					<description><![CDATA[<p>Introduction In this post we will learn how to read Freshdesk data in SSIS using ZappySys JSON / REST API Source. We will see how to authenticate, paginate / parse and load Freshdesk data into SQL Server Table in just few clicks. If you don&#8217;t use Freshdesk and considering using Zendesk instead then check our previous [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-freshdesk-data-ssis-rest-api-call/">Read Freshdesk data in SSIS &#8211; REST API Call</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/04/freshdesk-logo.png"><img loading="lazy" decoding="async" class=" wp-image-6732 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/04/freshdesk-logo.png" alt="" width="146" height="101" /></a>In this post we will learn how to read Freshdesk data in SSIS using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZappySys JSON / REST API Source</a>. We will see how to authenticate, paginate / parse and load Freshdesk data into SQL Server Table in just few clicks. If you don&#8217;t use Freshdesk and considering using Zendesk instead then check our previous post on how to <a href="https://zappysys.com/blog/read-zendesk-data-in-ssis-call-rest-api/" target="_blank" rel="noopener">Read Zendesk data in SSIS</a>.</p>
<p><a href="https://freshdesk.com" target="_blank" rel="noopener">Freshdesk</a> is a cloud based / managed service like Zendesk to for Support / Customer service.</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>Getting Started</h2>
<p>So let&#8217;s get started. We will see step by step instructions to configure Freshdesk API connection, setup JSON Source to read data from Freshdesk and finally load data into SQL Server table. We will use <a href="https://developers.freshdesk.com/api/#list_all_tickets" target="_blank" rel="noopener">List Tickets API</a> in this article for demo purpose but read other useful information on that page if you are new to REST API.</p>
<h3>Setup Freshdesk REST API Connection</h3>
<p>Very first step to call any Freshdesk API in SSIS is to configure HTTP connection (<a href="https://developers.freshdesk.com/api/#authentication">Basic Authentication</a> &#8211; Using UserID/ Password).</p>
<ol>
<li>Open Visual Studio (i.e. SSDT) to create new SSIS Package</li>
<li>From Control Flow SSIS Toolbox drag REST API task</li>
<li>Select URL From HTTP Connection Option from Drop down</li>
<li>Click New HTTP Connection</li>
<li>Configure HTTP connection like below.</li>
<li>Enter any Valid URL (This will be ignored if you Override URL on REST API Task)</li>
<li>Select Basic Authentication (Use User ID and Password)
<div id="attachment_6725" style="width: 1024px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6725" class="size-full wp-image-6725" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection.png" alt="Configure Freshdesk REST API Connection in SSIS - Basic Authentication (User ID / Password)" width="1014" height="705" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection.png 1014w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection-300x209.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection-768x534.png 768w" sizes="(max-width: 1014px) 100vw, 1014px" /></a><p id="caption-attachment-6725" class="wp-caption-text">Configure Freshdesk REST API Connection in SSIS &#8211; Basic Authentication (User ID / Password)</p></div></li>
<li>Click OK to close HTTP Connection</li>
<li>On Main UI of REST API Task, check Use Direct URL and enter below URL (Change YourDomain Part)<br />
https://{your-domain}.freshdesk.com/api/v2/tickets</li>
<li>Click Test Request / Response. If you see OK status then you have successfully called Freshdesk API. That&#8217;s all.
<div id="attachment_6726" style="width: 734px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-call-freshdesk-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6726" class="size-full wp-image-6726" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-call-freshdesk-rest-api.png" alt="Calling Freshdesk REST API in SSIS ( Read Tickets example)" width="724" height="677" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-call-freshdesk-rest-api.png 724w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-call-freshdesk-rest-api-300x281.png 300w" sizes="(max-width: 724px) 100vw, 724px" /></a><p id="caption-attachment-6726" class="wp-caption-text">Calling Freshdesk REST API in SSIS ( Read Tickets example)</p></div></li>
</ol>
<p>In the section we will see how to Parse REST API response and load data into SQL Table.</p>
<h3>Read Freshdesk data in SSIS</h3>
<p>Now let&#8217;s look at steps to configure SSIS JSON Source to read from Freshdesk REST API.</p>
<ol>
<li>Drag Data Flow task from toolbox. Double click to go to Data Flow designer</li>
<li>Drag ZS JSON Source (For File / REST API)</li>
<li>Configure JSON Source like below.</li>
<li>Check Use Connection option and select HTTP connection created in the previous section.</li>
<li>Enter API URL from which you like to read data. In out example we want to read tickets created after 2019-01-01 so we will call API like below. You can skip ?updated_since=2019-01-01 if you like to read all tickets.<br />
<pre class="crayon-plain-tag">https://{your-domain}.freshdesk.com/api/v2/tickets?updated_since=2019-01-01</pre>
</li>
<li>You can also Use <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm" target="_blank" rel="noopener">Variable Placeholder</a> in URL to make things dynamic like below<br />
<pre class="crayon-plain-tag">https://{your-domain}.freshdesk.com/api/v2/tickets?updated_since={{User::MyDateVar,yyyy-MM-dd}}</pre>
</li>
<li>Click Preview to see sample data.
<div id="attachment_6730" style="width: 1116px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6730" class="size-full wp-image-6730" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example.png" alt="Read Freshdesk data in SSIS - Fetch Tickets example (With REST API pagination)" width="1106" height="799" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example.png 1106w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example-300x217.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example-768x555.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example-1024x740.png 1024w" sizes="(max-width: 1106px) 100vw, 1106px" /></a><p id="caption-attachment-6730" class="wp-caption-text">Read Freshdesk data in SSIS &#8211; Fetch Tickets example (With REST API pagination)</p></div></li>
<li>Configure Pagination like below. Basically you have to select Pagination Mode = <strong>URL Parameter Mode</strong>. Enter Page num indicator as <pre class="crayon-plain-tag">page</pre>
<div id="attachment_6728" style="width: 724px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-pagination-url-parameter-mode.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6728" class="size-full wp-image-6728" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-pagination-url-parameter-mode.png" alt="Configure REST API pagination (URL Parameter Mode)" width="714" height="210" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-pagination-url-parameter-mode.png 714w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-pagination-url-parameter-mode-300x88.png 300w" sizes="(max-width: 714px) 100vw, 714px" /></a><p id="caption-attachment-6728" class="wp-caption-text">Configure REST API pagination (URL Parameter Mode)</p></div></li>
<li>Thats it. Now click OK to save UI.</li>
</ol>
<h3>Load Freshdesk data into SQL Server Table</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 article we saw how easy it is to read data from any REST API service like Freshdesk REST API and load into Relational DB like SQL Server. Try <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack for FREE</a> and explore many other 70+ Tasks /Components not discussed in this article.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-freshdesk-data-ssis-rest-api-call/">Read Freshdesk data in SSIS &#8211; REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Understand HTTP Status Code and Fix Common Errors in REST API</title>
		<link>https://zappysys.com/blog/understand-http-status-codes-fix-common-errors-rest-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 19 Mar 2019 19:31:25 +0000</pubDate>
				<category><![CDATA[ODBC Drivers]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6595</guid>

					<description><![CDATA[<p>Introduction Any time you send HTTP Request according to HTTP Standard using tools like ZappySys REST API Drivers or SSIS Connectors you may receive web response along with HTTP Status Codes. Dealing with REST / SOAP API calls you may face errors and you may find it challenging to understand generic error message from server along with [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/understand-http-status-codes-fix-common-errors-rest-api/">Understand HTTP Status Code and Fix Common Errors in REST 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/06/REST-API-icon.jpg"><img loading="lazy" decoding="async" class=" wp-image-4254 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/06/REST-API-icon.jpg" alt="Logo REST API" width="80" height="85" /></a>Any time you send HTTP Request according to <a href="https://tools.ietf.org/html/rfc2616" target="_blank" rel="noopener">HTTP Standard</a> using tools like ZappySys <a href="https://zappysys.com/products/odbc-powerpack/">REST API Drivers</a> or <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS Connectors</a> you may receive web response along with HTTP Status Codes. Dealing with REST / SOAP API calls you may face errors and you may find it challenging to understand generic error message from server along with some Numeric value (Called HTTP Status Code).  In this article we will try to decode certain status codes and discuss various way to solve it.</p>
<h2>Example of HTTP Error and Status Code</h2>
<p>Before we dive deep on this topic of HTTP Errors Status Codes let&#8217;s check an example HTTP Error with Status Code 400 (BadRequest). As you notice we passed some bad data in Request Body to produce this error. As you may see in below screenshot there are few parts we need to configure to call REST API request.</p>
<ol>
<li><strong>URL </strong> (and optionally <strong>parameters</strong> in URL)</li>
<li><strong>Request Method</strong>  (i.e. GET / POST)</li>
<li><strong>Request Body</strong> (Optional &#8211; Not needed for GET request but for POST /PUT API requests you may need to pass)</li>
<li><strong>Request Content Type</strong> ( Optional &#8211; i.e. application/xml . This is not needed for GET Request)</li>
<li><strong>Request Headers</strong> (Optional &#8211; Many tools generate default headers behind the scene. In our example we passed only two headers but see how many more added automatically in below Raw View obtained by tools <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">like Fiddler</a> )</li>
</ol>
<p>Sample Request:</p><pre class="crayon-plain-tag">POST
https://accounts.google.com/o/oauth2/token

&gt;&gt;&gt;&gt; HEADERS &lt;&lt;&lt;&lt;&lt;

User-Agent: ZappySysApp/1.0.2019.10310
Content-Type: application/xml
Accept: */*
Cache-Control: no-cache
Host: accounts.google.com
Content-Length: 13
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

&gt;&gt;&gt;&gt; BODY &lt;&lt;&lt;&lt;&lt;

some bad data</pre><p>
Sample Response:</p><pre class="crayon-plain-tag">HTTP/1.1 400 Bad Request

{
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unexpected token.\nsome bad data\n^",
    "status": "INVALID_ARGUMENT"
  }
}</pre><p>
Here is a screenshot of <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">SSIS REST API Task</a> which can be used for calling XML / JSON API to automate ETL workflows.</p>
<div id="attachment_6598" style="width: 1027px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-example-call-rest-api-http-error-status-code-400-bad-request.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6598" class="wp-image-6598 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-example-call-rest-api-http-error-status-code-400-bad-request.png" alt="Example of Calling REST API which returns HTTP Error Status Code 400 (Bad Request) - Invalid POST Body / Syntax Error" width="1017" height="706" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-example-call-rest-api-http-error-status-code-400-bad-request.png 1017w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-example-call-rest-api-http-error-status-code-400-bad-request-300x208.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-example-call-rest-api-http-error-status-code-400-bad-request-768x533.png 768w" sizes="(max-width: 1017px) 100vw, 1017px" /></a><p id="caption-attachment-6598" class="wp-caption-text">Example of Calling REST API which returns HTTP Error Status Code 400 (Bad Request) &#8211; Invalid POST Body / Syntax Error</p></div>
<h2>Common HTTP Error Status Codes / Reasons / Possible Fix</h2>
<p>Status codes can be anywhere between 100 to 505. Most of them <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" target="_blank" rel="noopener">documented here</a> also <a href="https://tools.ietf.org/html/rfc2616#page-57" target="_blank" rel="noopener">here (RFC2616 &#8211; HTTP / 1.1)</a>. Out of these status codes we will discuss few most common ones in this article and how to fix them.</p>
<p>Microsoft has also provided great explanation for most common HTTP Status Code <a href="https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.7.2" target="_blank" rel="noopener">here</a>.</p>
<h3>Status Code 400 &#8211; Bad Request</h3>
<p><strong>Possible Reason(s):</strong></p>
<ul>
<li>One or more URL Parameter is wrong</li>
<li>Request body may be wrong (For example: Either data is invalid in Body or Syntax is invalid &#8211; such as JSON Property name misspelled or missing closing brackets)</li>
</ul>
<p><strong>Possible Fix:</strong></p>
<ul>
<li>Make sure you passing URL Parameters correct way (Refer your API help file or some sample code)</li>
<li>For POST / PUT request check your Parameter names, Data format, JSON / XML syntax (Refer your API help file or some sample code)</li>
<li>If you want to validate JSON / XML Syntax use some FREE online validators for JSON  or XML</li>
</ul>
<h3>Status Code 401 &#8211; Unauthorized</h3>
<p><strong>Possible Reason(s):</strong></p>
<ul>
<li>You did not pass userid / password or session token</li>
<li>Your credentials are invalid or session token is expired</li>
<li>Some tool may not save Sensitive Information unless you set Save Sensitive Information option. For example in SSIS if you set PackageProtectionLevel= DoNotSaveSensitive then password will not be sent along with your API request.</li>
</ul>
<p><strong>Possible Fix:</strong></p>
<ul>
<li>Make sure you passing credentials either directly via HTTP Headers or URL Parameter</li>
<li>For ZappySys Products <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">use HTTP</a> or <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">OAuth connection</a> manager to pass credentials securely without worrying about manual HTTP Headers</li>
<li>If you configured PackageProtectionLevel= DoNotSaveSensitive in SSIS then <a href="https://zappysys.com/forums/topic/ssis-runtime-connection-error-packageprotectionlevel-set-donotsavesensitive/" target="_blank" rel="noopener">Check this</a> and <a href="https://zappysys.com/blog/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server/" target="_blank" rel="noopener">this </a> article to learn how to pass sensitive information in SSIS at runtime / design time.</li>
</ul>
<h3>Status Code 404 &#8211; Page Not Found</h3>
<p><strong>Possible Reason(s):</strong></p>
<ul>
<li>You entered invalid URL</li>
<li>URL is intranet only and you trying to access from outside network</li>
</ul>
<p><strong>Possible Fix:</strong></p>
<ul>
<li>Check your URL and correct it so its not throwing 404 error when you test in Browser (It must return data or throw some other error &#8211; E.g. 400 &#8211; Bad request or 401-Unauthorized)</li>
</ul>
<h3>Status Code 405 &#8211; Method Is Not Allowed</h3>
<p><strong>Possible Reason(s):</strong></p>
<ul>
<li>You selected invalid Request Method (see #2 in above screenshot)</li>
</ul>
<p><strong>Possible Fix:</strong></p>
<ul>
<li>Select correct Request Method. Refer to your API see it supports the method you selected. For example You selected POSt method to update some data but your API is expecting PUT method rather than POST.</li>
</ul>
<h3>Status Code 411 &#8211; Length Required</h3>
<p><strong>Possible Reason(s):</strong></p>
<ul>
<li>You selected request method as POST or PUT but did not pass any body</li>
</ul>
<p><strong>Possible Fix:</strong></p>
<ul>
<li>Make sure you supply some value in the Request Body field as per API specification. See #4 in the screenshot above.</li>
</ul>
<h3>Status Code 415 &#8211; Media Type Is Not Supported</h3>
<p><strong>Possible Reason(s):</strong></p>
<ul>
<li>You did not pass correct Content-Type Header or your API was expecting different content-type setting than what you passed.</li>
</ul>
<p><strong>Possible Fix:</strong></p>
<ul>
<li>Pass HTTP Header Content-Type with correct value (Check API documentation). Typically for JSON API its <pre class="crayon-plain-tag">application/json</pre>  and for XML SOAP API its <pre class="crayon-plain-tag">text/xml</pre></li>
<li>If you are using Zappysys REST API Drivers or SSIS Connectors you will see Content Type Dropdown on UI see #4 in above screenshot. Change it to correct setting. If your content type not in the dropdown then you can set direct HTTP Header<br />
Example =&gt; <pre class="crayon-plain-tag">Content-Type: application/json</pre>  see #5 in screenshot.</li>
</ul>
<h2>Debugging HTTP Web Requests</h2>
<p>If you want to make sure what&#8217;s being passed to web server you can use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">this tool (Fiddler)</a> and debug your web requests. It will show you all parts of your HTTP Request / Response (i.e.  Headers, Body, URL Parameters)</p>
<p>The post <a href="https://zappysys.com/blog/understand-http-status-codes-fix-common-errors-rest-api/">Understand HTTP Status Code and Fix Common Errors in REST API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to batch REST API requests in SSIS (Bulk Operation)</title>
		<link>https://zappysys.com/blog/batch-rest-api-requests-ssis-bulk-operation/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 06 Feb 2019 21:32:43 +0000</pubDate>
				<category><![CDATA[SSIS CSV Generator Transform]]></category>
		<category><![CDATA[SSIS JSON Generator Transform]]></category>
		<category><![CDATA[SSIS Script Component]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[SSIS XML Generator Transform]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6305</guid>

					<description><![CDATA[<p>Introduction In our previous article we saw how to POST data to REST API using few different ways. Now let&#8217;s go one step further and discuss another common scenario to batch REST API requests in SSIS. For efficient data transfer many API provides you to submit multiple records in a single request. In this article [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/batch-rest-api-requests-ssis-bulk-operation/">How to batch REST API requests in SSIS (Bulk Operation)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous article we saw <a href="https://zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/" target="_blank" rel="noopener">how to POST data to REST API</a> using few different ways. Now let&#8217;s go one step further and discuss another common scenario to batch REST API requests in SSIS. For efficient data transfer many API provides you to submit multiple records in a single request. In this article we will look at few ways to batch our requests using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">SSIS JSON Generator Transform</a> and  <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API destination</a>.</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>Method 1 &#8211; Batch records using SSIS JSON / XML Generator Transform</h2>
<p>First let&#8217;s look at common way to group multiple records and generate single JSON or XML document for desired batch size. We will also see another technique where you can assign Unique BatchID to each document.</p>
<p>For example below screenshot shows how to product one JSON document for every 10 input rows. We have also use BatchID column on the root level. This will use use BatchID from first row of that batch. You can use <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-generator-transform/" target="_blank" rel="noopener">XML Generator Transform</a> if you like to produce XML Document rather than JSON.</p>
<p>To generate Unique BatchID you can use function like newid() in SQL Server.</p><pre class="crayon-plain-tag">SELECT newid() as BatchID,CustomerID,CompanyName FROM Customers</pre><p>
<div id="attachment_6306" style="width: 1115px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-json-with-batch-setting.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6306" class="size-full wp-image-6306" src="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-json-with-batch-setting.png" alt="Using SSIS JSON Generator Transform with Batch Option (Multiple Records in a single document)" width="1105" height="865" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-json-with-batch-setting.png 1105w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-json-with-batch-setting-300x235.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-json-with-batch-setting-768x601.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-json-with-batch-setting-1024x802.png 1024w" sizes="(max-width: 1105px) 100vw, 1105px" /></a><p id="caption-attachment-6306" class="wp-caption-text">Using SSIS JSON Generator Transform with Batch Option (Multiple Records in a single document)</p></div>
<p>&nbsp;</p>
<p>Here if full flow to batch your JSON Requests and Submit to REST API.</p>
<div id="attachment_6307" style="width: 671px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-post-data-rest-api-in-batch.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6307" class="size-full wp-image-6307" src="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-post-data-rest-api-in-batch.png" alt="POST data to REST API in Bulk Mode (Batch multiple rows)" width="661" height="785" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-post-data-rest-api-in-batch.png 661w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-post-data-rest-api-in-batch-253x300.png 253w" sizes="(max-width: 661px) 100vw, 661px" /></a><p id="caption-attachment-6307" class="wp-caption-text">POST data to REST API in Bulk Mode (Batch multiple rows)</p></div>
<p>&nbsp;</p>
<h2>Method 2 &#8211; Using SSIS Web API destination Batch Mode with Header / Footer</h2>
<p>Another method of batching is use Web API destination and turn on Batch mode.  You can <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">use Fiddler</a> to debug your web requests incase you are not sure how its generating and sending POST requests after this setting.</p>
<div id="attachment_2616" style="width: 919px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-smartsheet-rest-api-post-bulk-mode-web-api-destination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2616" class="size-full wp-image-2616" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-smartsheet-rest-api-post-bulk-mode-web-api-destination.png" alt="Configure SSIS Web API Destination for Bulk API call (Smartsheet REST API - Insert multiple rows)" width="909" height="445" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-smartsheet-rest-api-post-bulk-mode-web-api-destination.png 909w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-smartsheet-rest-api-post-bulk-mode-web-api-destination-300x147.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-smartsheet-rest-api-post-bulk-mode-web-api-destination-768x376.png 768w" sizes="(max-width: 909px) 100vw, 909px" /></a><p id="caption-attachment-2616" class="wp-caption-text">Configure SSIS Web API Destination for Bulk API call (Insert multiple rows)</p></div>
<h2>Method 3 &#8211; Batch CSV records using CSV Generator Transform</h2>
<p>So far we looked at how to batch JSON and XML format. Now let&#8217;s look at scenario where you have to POST CSV formatted data to REST API endpoint.</p>
<p>Assume that you have an API endpoint where you can submit data in multiple batches. Also you have few additional requirements</p>
<ol>
<li>First row of First batch must have column names (any other batch must not contains CSV Header)</li>
<li>In each Batch we want to submit maximum 5 rows as per API call</li>
<li>Each batch must contain Unique Batch Number in URL</li>
</ol>
<p>Here is high level flow.</p>
<div id="attachment_6333" style="width: 1148px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-csv-using-output-in-batch-setting.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6333" class="size-full wp-image-6333" src="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-csv-using-output-in-batch-setting.png" alt="Generate CSV using Batch Setting , Send data to REST API in multiple batches, Debug REST API in Fiddler" width="1138" height="508" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-csv-using-output-in-batch-setting.png 1138w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-csv-using-output-in-batch-setting-300x134.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-csv-using-output-in-batch-setting-768x343.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-generate-csv-using-output-in-batch-setting-1024x457.png 1024w" sizes="(max-width: 1138px) 100vw, 1138px" /></a><p id="caption-attachment-6333" class="wp-caption-text">Generate CSV using Batch Setting , Send data to REST API in multiple batches, Debug REST API in Fiddler</p></div>
<h3>Include CSV Header in First Batch Only</h3>
<p>Now let&#8217;s break down the problem and find out how to do. First problem is we need to include CSV Header only in First batch. To achieve this we use old school trick where we output column names as data row&#8230; and when we generate CSV in the next section we will turn off Column Headers option.</p>
<p>If you are consuming records from SQL Server or any other RDBMS you can write following style source query. If you don&#8217;t use relational source then use native UNION Transform in SSIS.</p><pre class="crayon-plain-tag">select 'CustomerID' as Column1, 'OrderID' as Column2
UNION ALL
select top 12 cast(CustomerID as varchar(1000)), cast(OrderID as varchar(1000)) from Invoices</pre><p>
<h3>Batch records and output CSV data</h3>
<p>Now next step would be to generate CSV data but in batches&#8230; so in our example we have to output size of 5 rows per batch. For this perform the following steps</p>
<ol>
<li>Drag ZS CSV Generator Transform (Included in <strong>v2.8</strong> and Higher)</li>
<li>Connect source to CSV Generator Transform</li>
<li>Now before we edit in UI mode, <strong>right click</strong> and select <strong>Properties</strong>. Change following 3 properties  (You can also change QuoteAroundValue and Dimiliter if needed). In future version batch setting will be visible in UI mode too.
<ol>
<li>ArrayBatchSize  = yourbatchsize (in our case it was just 5 rows per batch)</li>
<li>OutputMode = SingleFileFormat</li>
<li>FirstRowsHasColumnNames  =False</li>
</ol>
</li>
<li>Now double click to configure ZS Generator Output</li>
<li>Right click on Mappings folder node and Add Elements &gt; Select Multiple Columns  &gt; Check columns you like to output</li>
<li>Click OK to Save UI</li>
</ol>
<div id="attachment_6336" style="width: 611px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-csv-generator-output-data-in-batch.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6336" class="size-full wp-image-6336" src="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-csv-generator-output-data-in-batch.png" alt="Generate CSV data in SSIS (Batch Output Setting)" width="601" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-csv-generator-output-data-in-batch.png 601w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-csv-generator-output-data-in-batch-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-csv-generator-output-data-in-batch-300x300.png 300w" sizes="(max-width: 601px) 100vw, 601px" /></a><p id="caption-attachment-6336" class="wp-caption-text">Generate CSV data in SSIS (Batch Output Setting)</p></div>
<h3>Generate unique URL with Batch using Script Component</h3>
<p>Now next task we have to achieve is generate Unique Batch Number. Put that Batch ID in URL like below&#8230;</p><pre class="crayon-plain-tag">http://httpbin.org/post?batch=0
http://httpbin.org/post?batch=1
http://httpbin.org/post?batch=2
.....</pre><p>
<ol>
<li>For this drag SSIS Script Component and select Transformation Mode</li>
<li>Now go to <strong>Inputs and Outputs</strong> tab &gt; Select <strong>Output Columns</strong> &gt; Click <strong>Add Column</strong> &gt; Name it as <strong>URL</strong> &gt; Configure <strong>DataType</strong> as <strong>DT_WSTR</strong> , <strong>Length</strong> = 500</li>
<li>Now got Script Tab and Click Edit. Remove old code and enter following code (Assuming You selected C#). This code will generate new URL with Unique batch ID each time. You can use this same technique to generate Unique row number too (in that case rather than DT_WSTR type you can use DT_I4 type)</p><pre class="crayon-plain-tag">[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{
    private static int _batch;
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    {
        Row.Url = string.Format("http://httpbin.org/post?batch={0}",_batch);
        //If you have to send GUID rather than Integer for Batch ID then use below code
        //Row.Url = string.Format("http://httpbin.org/post?batch={0}",System.Guid.NewGuid());

        _batch = _batch+1;
    }
}</pre><p>
</li>
<li>Click OK to Save script.</li>
</ol>
<div id="attachment_6334" style="width: 681px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-script-component-unique-row-number-output-new-column.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6334" class="size-full wp-image-6334" src="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-script-component-unique-row-number-output-new-column.png" alt="Output Unique URL or Number using SSIS Script Transform" width="671" height="768" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-script-component-unique-row-number-output-new-column.png 671w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-script-component-unique-row-number-output-new-column-262x300.png 262w" sizes="(max-width: 671px) 100vw, 671px" /></a><p id="caption-attachment-6334" class="wp-caption-text">Output Unique URL or Number using SSIS Script Transform</p></div>
<h3>Configure Web API Destination to POST CSV Data</h3>
<p>Now final step is to configure SSIS Web API Destination to POST CSV data to API.</p>
<ol>
<li>Drag ZS Web API Destination and connect Source Transform to Web API destination.</li>
<li>Double click to configure</li>
<li>Select Connection Manager</li>
<li>Once connection setup, select Input Column for URL ( This will be same column from Script Transform)</li>
<li>Select column for Body (e.g. ZS_CSV_OUT)</li>
<li>Click OK to save</li>
</ol>
<div id="attachment_6335" style="width: 739px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-configure-web-api-destination-post-csv-data-in-batch.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6335" class="size-full wp-image-6335" src="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-configure-web-api-destination-post-csv-data-in-batch.png" alt="POST data to REST API in multiple batches using SSIS Web API destination" width="729" height="764" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-configure-web-api-destination-post-csv-data-in-batch.png 729w, https://zappysys.com/blog/wp-content/uploads/2019/02/ssis-configure-web-api-destination-post-csv-data-in-batch-286x300.png 286w" sizes="(max-width: 729px) 100vw, 729px" /></a><p id="caption-attachment-6335" class="wp-caption-text">POST data to REST API in multiple batches using SSIS Web API destination</p></div>
<h2>Debug Web API Requests using Fiddler</h2>
<p>Now we ready to run entire flow. Once you execute data flow, observe Input rows before CSV Generator Transform and after. CSV Generator transform must produce less rows before we now grouping multiple rows in a single batch.</p>
<p>Another important aspect to play with API request is to debug it, We recommend you to to look at <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">this article about using Fiddler to debug web requests</a>.</p>
<h2>Download Sample Package</h2>
<p>Here is the <a href="https://zappysys.com/blog/wp-content/uploads/2019/02/RestAPI_Batch.zip">Sample SSIS Package (2012 format) &#8211; Rest API_Batching</a></p>
<h2>Conclusion</h2>
<p>In this post, we saw how easy it is to handle complex REST API  / CSV /JSON / XML operations in SSIS. We configured REST API POST Operation using Batching Method. Hope this post helps you to achieve your API integration without coding.  Feel free to <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">download SSIS PowerPack</a> and try many other components not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/batch-rest-api-requests-ssis-bulk-operation/">How to batch REST API requests in SSIS (Bulk Operation)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
