<?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>odata Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/odata/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/odata/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 02 Oct 2025 19:16:52 +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>odata Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/odata/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</title>
		<link>https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 27 Jul 2019 06:34:32 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[hana]]></category>
		<category><![CDATA[ms access]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[s/4hana]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7506</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to read JIRA data in SQL Server. Now let’s learn how to Import SAP S/4HANA OData Service Data Into MS Access. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use ODBC XML Driver to read SAP data and load [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/">Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" target="_blank" rel="noopener"><img decoding="async" class="alignleft wp-image-7491 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" alt="SAP S/4HANA" width="150" height="150" /></a></p>
<p>In our previous blog we saw how to <a href="https://zappysys.com/blog/load-jira-data-sql-server-odbc-call-rest-api/" target="_blank" rel="noopener">read JIRA data in SQL Server</a>. Now let’s learn how to Import SAP S/4HANA OData Service Data Into MS Access. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML Driver</a> to read SAP data and load into MS Access.</p>
<p>So, let’s get started.</p>
<div id="custom_post_widget-2523" class="content_block">
<h2></h2>
<h2></h2>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>A first requirement, make sure that Microsoft Access installed</li>
<li>Finally, make sure to have <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
</ol>
</div>
<h2><span id="About_SAP_HANA_OData_REST_API_Service">About SAP HANA / OData REST API Service</span></h2>
<p>You can expose your SAP Data using ODATA REST API Service. Here is a <a href="https://www.erpworkbench.com/sap-webapps/segw-odata-gateway-service.htm" target="_blank" rel="noopener">good article</a> which shows how to expose data as OData Service.   For more information on SAP OData Service feature check this <a href="https://help.sap.com/doc/05d53b2d3bbb43d2ab5efa23829b2777/1610%20001/en-US/frameset.htm?ecaeea50ca692309e10000000a445394.html" target="_blank" rel="noopener">SAP help page</a>. If you are new to OData Standard then <a href="https://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">read here</a> to know more how OData can facilitate data extraction using HTTP REST API. If you need Sample XML based OData Service then use below test URLs.</p><pre class="crayon-plain-tag">https://services.odata.org/Northwind/Northwind.svc/
https://services.odata.org/Northwind/Northwind.svc/Customers
https://services.odata.org/Northwind/Northwind.svc/Orders
https://services.odata.org/Northwind/Northwind.svc/Invoices
https://services.odata.org/Northwind/Northwind.svc/Products</pre><p>
Now let’s look at how to read SAP Data using ODBC Driver. At this point we assume you have exposed your data as OData Endpoint.</p>
<h2><span id="Read_SAP_HANA_data_using_XML_Source">Read SAP S/4HANA data using XML Driver</span></h2>
<p>First let’s look at steps to configure XML Driver. We will read data from SAP S/4HANA OData Service and then in next section we will look at how to load data into MS Access or other target.</p>
<ol>
<li>First, <strong>Windows search</strong>, write <strong>ODBC</strong> and select the <strong>ODBC Data sources (32 bits)</strong>
<div id="attachment_2780" class="wp-caption aligncenter">
<div id="attachment_2780" style="width: 395px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?ssl=1" target="_blank" rel="noopener"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?zoom=0.8999999761581421&amp;resize=385%2C520&amp;ssl=1" alt="Open ODBC Data source" width="385" height="520" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></div>
</div>
</li>
<li>As a second step, in ODBC Data source Administrator press the <strong>Add</strong> button.
<div id="attachment_2725" style="width: 600px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2725" class="wp-image-2725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png" alt="Add ZappySys" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-2725" class="wp-caption-text">Add ZappySys</p></div></li>
<li>In this step, create the new data source, select <strong>ZappySys XML Driver.</strong>
<div id="attachment_2772" style="width: 302px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="wp-image-2772 size-medium" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?zoom=0.8999999761581421&amp;resize=292%2C218&amp;ssl=1" alt="add new zappysys" width="292" height="217" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys xml driver</p></div></li>
<li>Now edit that XML data source to configure it. Enter your OData Service URL its typically like below. Replace 3 parts with your own value (i.e. replace {MY-INSTANCE},  {MY-PROJECT}, {MY-TABLE})<br />
<pre class="crayon-plain-tag">https://{MY-INSTANCE}/sap/opu/odata/sap/{MY-PROJECT}/{MY-TABLE}</pre>
For example if you are hosting SAP HANA in Cloud Instance then your URL may look like below<br />
<pre class="crayon-plain-tag">https://myXXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/MyTestProject/PurchaseOrders</pre>
And create New ZS-HTTP connection in it select <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">Basic Authentication</a> and enter your SAP HANA UserID / Password to call OData Service and select the desire filter.</p>
<div id="attachment_7497" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7497" class="wp-image-7497 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png" alt="XML Driver : SAP S/4HANA OData Service Configuration" width="720" height="503" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-300x210.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png 1019w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7497" class="wp-caption-text">XML Driver : SAP S/4HANA OData Service Configuration</p></div></li>
<li>Now go to Data Format / Compression (Zip/GZip) tab and select Data Format as OData to get all the records.
<div id="attachment_7498" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7498" class="wp-image-7498 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png" alt="Data Format : Odata" width="720" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-300x174.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png 792w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7498" class="wp-caption-text">Data Format : Odata</p></div></li>
<li>Finally, now using Query Builder and Code Generator we will generate the query and click on Preview the data.
<div id="attachment_6416" style="width: 766px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6416" class="wp-image-6416 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" alt="odbc-json-driver-generate-quickbooks-query" width="756" height="432" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png 756w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query-300x171.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a><p id="caption-attachment-6416" class="wp-caption-text">Generate Query</p></div></li>
<li>That’s it we are ready to load SAP S/4HANA OData Service data to MS Access.</li>
</ol>
<h2>Load SAP S/4HANA OData Service in MS Access</h2>
<ol>
<li>In MS Access, go to <strong>External Data</strong> Ribbon and select <strong>New Data Source</strong> and select <strong>From Other Sources</strong> and <strong>ODBC Database</strong>.
<div id="attachment_5171" style="width: 1235px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5171" class="wp-image-5171 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" alt="Configuration in MS Access: Import Data From REST API" width="1225" height="572" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png 1225w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-300x140.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-768x359.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-1024x478.png 1024w" sizes="(max-width: 1225px) 100vw, 1225px" /></a><p id="caption-attachment-5171" class="wp-caption-text">A configuration in MS Access: Import Data From REST API</p></div></li>
<li>Select the Source and destination of the data, select <strong>Import the source data into a new table in the current database</strong> and press OK.
<div id="attachment_2726" class="wp-caption alignnone">
<div id="attachment_5172" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5172" class="wp-image-5172 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" alt="Get External Data - ODBC Database" width="736" height="543" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc-300x221.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5172" class="wp-caption-text">Get External Data &#8211; ODBC Database</p></div>
</div>
</li>
<li>Select your newly created JSON Driver Data Source and click<strong><strong><strong> OK.<br />
</strong></strong></strong></p>
<div id="attachment_5223" style="width: 455px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5223" class="wp-image-5223 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" alt="Get External Data - Select your newly created ODBC Data Source (JSON Driver)" width="445" height="395" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png 445w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1-300x266.png 300w" sizes="(max-width: 445px) 100vw, 445px" /></a><p id="caption-attachment-5223" class="wp-caption-text">Get External Data &#8211; Select your newly created ODBC Data Source (JSON Driver)</p></div>
<p>&nbsp;</li>
<li>Select tables from the list of tables in the Import Objects screen and click <strong><strong>OK.<br />
</strong></strong></p>
<div id="attachment_5174" style="width: 473px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5174" class="wp-image-5174 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" alt="Get External Data - Select tables from Import Objects Screen" width="463" height="452" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png 463w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables-300x293.png 300w" sizes="(max-width: 463px) 100vw, 463px" /></a><p id="caption-attachment-5174" class="wp-caption-text">Get External Data &#8211; Select tables from Import Objects Screen</p></div></li>
<li>Select <strong>Save Import Steps</strong> from the screen and click on <strong>Save Import</strong> button.
<div id="attachment_5175" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5175" class="wp-image-5175 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" alt="Get External Data - Select Save Import Steps" width="736" height="576" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps-300x235.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5175" class="wp-caption-text">Get External Data &#8211; Select Save Import Steps</p></div></li>
<li>That&#8217;s it If everything is OK, you will be able to see the data.
<div id="attachment_5176" style="width: 1353px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5176" class="wp-image-5176 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" alt="Data Imported Successfully in MS Access DB Table" width="1343" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png 1343w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-300x90.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-768x231.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-1024x308.png 1024w" sizes="(max-width: 1343px) 100vw, 1343px" /></a><p id="caption-attachment-5176" class="wp-caption-text">Data Imported Successfully in MS Access DB Table</p></div></li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel">How to link REST API data to Access</span></h2>
<p>The linking process is very similar to importing data into the Access table. Follow steps of the previous paragraph &#8211; <a href="#how-to-import-data">How to import REST API data to Access</a> &#8211; but on step 2 select the second option to create a <em><strong>linked table</strong></em><b><i> </i></b>instead. Then at last it&#8217;s asked to select a unique record identifier, don&#8217;t select anything:</p>
<div id="attachment_7445" style="width: 326px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7445" class="wp-image-7445 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png" alt="Link table approach - don't select unique record identifier" width="316" height="382" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png 316w, https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack-248x300.png 248w" sizes="(max-width: 316px) 100vw, 316px" /><p id="caption-attachment-7445" class="wp-caption-text">Linked table approach &#8211; Don&#8217;t select a unique Record identifier</p></div>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">SAP S/4HANA Integration with Other BI Tools</span></h2>
<div class="content_block" id="custom_post_widget-7051">ZappySys ODBC Drivers built using ODBC standard which is widely adopted by industry for a long time. Which mean the majority of BI Tools / Database Engines / ETL Tools already there will support native / 3rd party ODBC Drivers. Below is the small list of most popular tools / programming languages our Drivers support. If your tool / programming language doesn't appear in the below list, which means we have not documented use case but as long as your tool supports ODBC Standard, our drivers should work fine.

&nbsp;

<img loading="lazy" decoding="async" class="" src="//zappysys.com/images/odbc-powerpack/odbc-powerpack-integration.jpg" alt="ZappySys ODBC Drivers for REST API, JSON, XML - Integrate with Power BI, Tableau, QlikView, QlikSense, Informatica PowerCenter, Excel, SQL Server, SSIS, SSAS, SSRS, Visual Studio / WinForm / WCF, Python, C#, VB.net, PHP. PowerShell " width="750" height="372" />
<table style="valign: top;">
<tbody>
<tr>
<td>
<p style="text-align: center;"><strong>BI / Reporting Tools
Integration</strong></p>
</td>
<td style="text-align: center;"><strong>ETL Tools
Integration
</strong></td>
<td style="text-align: center;"><strong>Programming Languages</strong>
<strong>Integration</strong></td>
</tr>
<tr>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/" target="_blank" rel="noopener">Microsoft Power BI</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-tableau-read-json-soap-xml-csv/">Tableau</a></li>
 	<li><a href="https://zappysys.com/blog/read-rest-api-using-ssrs-reports-call-json-xml-web-service/" target="_blank" rel="noopener">SSRS (SQL Reporting Services)</a></li>
 	<li><a href="https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/" target="_blank" rel="noopener">QlikView /Qlik Sense</a></li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/" target="_blank" rel="noopener">MicroStrategy</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-google-sheet-call-appscript-load-json-soap-xml-csv/" target="_blank" rel="noopener">Google Sheet</a></li>
 	<li><a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/" target="_blank" rel="noopener">Microsoft Excel</a></li>
 	<li><a href="https://zappysys.com/api/integration-hub/rest-api-connector/access?context=connector" target="_blank" rel="noopener">Microsoft Access</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/" target="_blank" rel="noopener">Informatica PowerCenter</a> (Windows)</li>
 	<li>Informatica Cloud</li>
 	<li>SSIS (SQL Integration Services)</li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">SQL Server</a></li>
 	<li><a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/" target="_blank" rel="noopener">Talend Data Studio</a></li>
 	<li><a href="https://zappysys.com/blog/pentaho-read-rest-api-in-pentaho/" target="_blank" rel="noopener">Pentaho Kettle</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li>Visual Studio</li>
 	<li><a href="https://zappysys.com/blog/calling-rest-api-in-c/" target="_blank" rel="noopener">C#</a></li>
 	<li>C++</li>
 	<li><a href="https://zappysys.com/blog/connect-java-to-rest-api-json-soap-xml/" target="_blank" rel="noopener">JAVA</a></li>
 	<li><a href="https://zappysys.com/blog/set-rest-python-client/" target="_blank" rel="noopener">Python</a></li>
 	<li>PHP</li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-powershell-script-export-json-csv/" target="_blank" rel="noopener">PowerShell</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">T-SQL (Using Linked Server)</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
&nbsp;</div>
<div class="content_block" id="custom_post_widget-8935"><h2>Troubleshooting Errors</h2>
<p>While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "<strong>License type [ODBC_PP_TRIAL] not found or its expired</strong>"</p>

<p>Please refer to this article for the same:  <a href="https://zappysys.zendesk.com/hc/en-us/articles/360042521533-Troubleshooting-License-type-ODBC-PP-TRIAL-not-found-or-its-expired-error-in-Microsoft-Access" target="_blank" rel="noopener">Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access</a></p></div>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">Conclusion</span></h2>
<p>So in this blog, we learned how to Import SAP S/4HANA OData Service Data in Access using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a> in a very simple way. You can achieve many more functionalities with this tool. Check our blogs/articles on <strong><a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/" target="_blank" rel="noopener">XML File / REST API Driver</a> </strong>to find out what <em>this tool</em> is capable of more.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of SAP S/4HANA OData Service with our tools:</p>
<ul>
<li><a href="https://api.sap.com/" target="_blank" rel="noopener">SAP API Business Hub</a></li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a>, you can also find <a href="https://youtu.be/iwezz0Z3D4U" target="_blank" rel="noopener">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of XML Driver.</li>
<li><strong>Blog/articles link</strong>: <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/" target="_blank" rel="noopener">https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/">Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API)</title>
		<link>https://zappysys.com/blog/read-microsoft-dynamics-365-odata-api-data-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 25 May 2019 10:28:13 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[365]]></category>
		<category><![CDATA[CRM 365]]></category>
		<category><![CDATA[dynamics crm]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[Microsoft Dynamics 365]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7004</guid>

					<description><![CDATA[<p>Introduction In our previous article, we talked about how to read from Dynamics CRM using easy to use SSIS Dynamics CRM Source connector. In this post, you will learn how to use SSIS JSON Source (for REST API) instead of CRM Source. Using SSIS JSON Source you can read virtually any REST API or JSON file data including Dynamics CRM [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-microsoft-dynamics-365-odata-api-data-ssis/">How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web 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/05/dynamics-crm-365-logo-300x300.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-3577 size-thumbnail alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/05/dynamics-crm-365-logo-300x300-150x150.png" alt="" width="150" height="150" /></a>In our previous article, we talked about how to <a href="https://zappysys.com/blog/ssis-dynamics-crm-read-import-crm-365-onpremises/" target="_blank" rel="noopener">read from Dynamics CRM</a> using easy to use <a href="https://zappysys.com/products/ssis-powerpack/ssis-dynamics-crm-source-connector/" target="_blank" rel="noopener">SSIS Dynamics CRM Source connector</a>. In this post, you will learn how to use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source (for REST API)</a> instead of CRM Source. Using SSIS JSON Source you can read virtually any REST API or JSON file data including Dynamics CRM / Dataverse. For this article, our goal is to learn <strong>How to read Microsoft Dynamics 365 data using Web API (OData API) in SSIS.</strong> We will use drag and drop approach without any coding.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2><strong>Why use Web API (OAuth) for Dynamics 365 CRM?</strong></h2>
<p>Microsoft has announced depreciation of older CRM API (SOAP API with WS-Trust Authentication) which means they are no longer going to support the older style of authentication so no option but to switch to newer authentication / API.</p>
<p>In the older approach (SOAP API with WS-Trust Authentication) you must pass your User Name and Password to authenticate, also if MFA / 2FA (Multi-Factored Auth) is turned on by organization policy you cannot use your user id / password in API call. In new authentication (i.e. OAuth) you have to use Client Id and Client Secret only.</p>
<p>Now let&#8217;s look at the step by step approach to call Dynamics 365 REST API.</p>
<h2>Step-1 : Register Dynamics CRM / Dataverse App obtain App Id / Client Secret</h2>
<p>The very first step to access Microsoft Dynamics CRM 365 API is to obtain Application Id (also referred as Client Id)  and Client Secret. We will use this information later in this article (on OAuth connection UI).</p>
<ol>
<li><a href="https://zappysys.com/blog/register-app-dynamics-crm-365-cds-dataverse-api-azure-ad-oauth/" target="_blank" rel="noopener">Register Dynamics CRM / Dataverse App With Azure</a> and get the credential (App Id, Client Secret).</li>
</ol>
<h2></h2>
<h2>Step-2 : Read Microsoft Dynamics 365 API data in SSIS using JSON Source</h2>
<p>Let&#8217;s start with an example. We use SSIS JSON Source Task to make calls to Microsoft Dynamics 365 API, we will load Dynamics 365 Leads data to SQL Server.</p>
<p>Please refer to this link for more information: <a href="https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/about?view=dynamics-ce-odata-9" target="_blank" rel="noopener">Microsoft Dynamics 365 Web API Reference</a></p>
<h3>Find out API Url for your environment (organization url)</h3>
<p>Once we are done with the creation of the Azure AD app to obtain App Id /Secret out next step is to find out the base API URL for your organization / environment.</p>
<p>If you have multiple environments (i.e. Prod, Sandbox) then each environment might have its own unique URL)</p>
<ol>
<li>To find your API Service URL, Click on <strong>Gear Icon</strong></li>
<li>Choose <strong>Advanced Settings</strong></li>
<li>Click down arrow on <strong>Settings</strong></li>
<li>Click <strong>Customization</strong></li>
<li>Click <strong>Developer Resource</strong> Link</li>
<li>On this page now you can see various URLs. For examples used in this article, we need to get is <strong>Service Root URL</strong> for <strong>Web API</strong></li>
</ol>
<div id="attachment_10125" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10125" class="wp-image-10125 size-large" src="https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-1024x626.png" alt="dynamics-crm-find-organization-url-soap-web-api" width="720" height="440" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-1024x626.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-300x183.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-768x469.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1.png 1028w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-10125" class="wp-caption-text">How to Find Organization Id / Web API URL / SOAP API Service URL (Unique Environment Instance URL)</p></div>
<p>&nbsp;</p>
<h3>Create SSIS Data Flow to read data from Dynamics CRM / Dataverse</h3>
<ol>
<li>
        First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.<img class="yoast-text-mark" /></p>
<p>        <div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop SSIS Data Flow Task from SSIS Toolbox</p></div>
    </li>
<li>
        Furthermore, Drag and Drop JSON Source(REST API and File) File Task from the SSIS Toolbox.<img class="yoast-text-mark" /></p>
<p>        <div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="size-full wp-image-3766" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div>
    </li>
</ol>
<h3></h3>
<h3>Create OAuth Connection for Dynamics CRM / Dataverse</h3>
<p>Now lets look at how to create and configure OAuth connection to call Web API for Dynamics CRM / Dataverse</p>
<ol>
<li>
        Check Use Credentials Option and select a new ZS-OAuth Connection from the drop-down.</p>
<p>        <div id="attachment_7689" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-check-use-credentials-select-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7689" class="wp-image-7689 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-check-use-credentials-select-connection-768x593.png" alt="Check Use Credentials " width="720" height="556" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-check-use-credentials-select-connection-768x593.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-check-use-credentials-select-connection-300x232.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-check-use-credentials-select-connection.png 823w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7689" class="wp-caption-text">Check Use Credentials</p></div>
    </li>
<li>
        Once OAuth Connection UI opens up. Configure like below on General Tab.<br />
        Change OAuth Version to <strong>OAuth2</strong><br />
        Change Grant Type to <strong>Client Credentials</strong><br />
        Enter <strong>Client Id</strong> (Azure AD App Id) (Obtained in the Previous Section)<br />
        Enter <strong>Client Secret</strong> (Obtained in the Previous Section)<br />
        Enter <strong>Token URL</strong> (see below)</p>
<div id="attachment_10127" style="width: 616px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-oauth-client-credentials-grant-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10127" class="wp-image-10127 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-oauth-client-credentials-grant-1.png" alt="azure-ad-app-oauth-client-credentials-grant" width="606" height="351" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-oauth-client-credentials-grant-1.png 606w, https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-oauth-client-credentials-grant-1-300x174.png 300w" sizes="(max-width: 606px) 100vw, 606px" /></a><p id="caption-attachment-10127" class="wp-caption-text">Configure OAuth Connection for Azure AD App &#8211; Client Credentials Grant (Tenant Specific Token EndPoints)</p></div>
<p>        <span style="text-decoration: underline;"><strong>For Client Credentials Grant</strong></span><br />
        Enter Token URL as <strong>https://login.microsoftonline.com/<span style="color: #0000ff;">&lt;your-tenant-id&gt;</span>/oauth2/token</strong><br />
        (You can find Tenant ID on the Overview page of your Azure AD App)</p>
<p>        <span style="text-decoration: underline;"><strong>For Default Grant (3-legged &#8211; requires User Login Prompt)</strong></span><br />
        Enter Auth URL as <strong>https://login.microsoftonline.com/common/oauth2/authorize</strong><br />
        Enter Token  URL as <strong><strong>https://login.microsoftonline.com/common/oauth2/token</strong></strong></p>
<p>        &nbsp;</p>
<div id="attachment_10128" style="width: 858px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-token-url-with-tenant-id-oauth-v1-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10128" class="wp-image-10128 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-token-url-with-tenant-id-oauth-v1-1.png" alt="azure-ad-app-token-url-with-tenant-id-oauth-v1" width="848" height="448" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-token-url-with-tenant-id-oauth-v1-1.png 848w, https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-token-url-with-tenant-id-oauth-v1-1-300x158.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-token-url-with-tenant-id-oauth-v1-1-768x406.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/azure-ad-app-token-url-with-tenant-id-oauth-v1-1-720x380.png 720w" sizes="(max-width: 848px) 100vw, 848px" /></a><p id="caption-attachment-10128" class="wp-caption-text">Where to find Token Endpoint with Tenant ID in the URL (Azure AD App)</p></div>
<p>        &nbsp;
    </li>
<li>
        Now go to Advanced Tab and configure like belowEnter <strong>Extra Attribute for /auth</strong> as  <pre class="crayon-plain-tag">resource=https://&lt;your-instance-id&gt;.api.&lt;your-crm-region&gt;.dynamics.com</pre>
<p>        <div id="attachment_9471" style="width: 595px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/resource-dyanmics-crm-connection-for-cleint-cred-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9471" class="size-full wp-image-9471" src="https://zappysys.com/blog/wp-content/uploads/2019/05/resource-dyanmics-crm-connection-for-cleint-cred-token.png" alt="Client Credentials Grant for Dynamics CRM / Dataverse - API Access (Azure AD App / OAuth)" width="585" height="254" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/resource-dyanmics-crm-connection-for-cleint-cred-token.png 585w, https://zappysys.com/blog/wp-content/uploads/2019/05/resource-dyanmics-crm-connection-for-cleint-cred-token-300x130.png 300w" sizes="(max-width: 585px) 100vw, 585px" /></a><p id="caption-attachment-9471" class="wp-caption-text">Client Credentials Grant for Dynamics CRM / Dataverse &#8211; API Access (Azure AD App / OAuth)</p></div>
    </li>
<li>Click OK to Save connection.</li>
</ol>
<h3>Get all Accounts, Contacts, and Leads using Dynamics 365 API</h3>
<p>Now let&#8217;s configure API URL from where you like to read data.</p>
<p>For example, if you just use the root URL then it will list all possible entries</p>
<p>Root URL: <pre class="crayon-plain-tag">https://{{organization-uri}}/api/data/v9.1/</pre>
<ol>
<li>Double click on the Component to Edit the Configurations.</li>
<li>Change Data Format to <strong>OData</strong>.</li>
<li>
        In the Web URL Field, you can enter any valid URL for Web API. Please refer to this link of <a href="https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/account?view=dynamics-ce-odata-9" target="_blank" rel="noopener">Dynamics 365 Rest API</a> for more information.<strong>Example Data URLs</strong></p><pre class="crayon-plain-tag">https://{{organization-uri}}/api/data/v9.1/
https://{{organization-uri}}/api/data/v9.1/accounts
https://{{organization-uri}}/api/data/v9.1/contacts
https://{{organization-uri}}/api/data/v9.1/leads</pre><p>
        Here, replace <strong>{{organization-uri}} </strong>in URL to your Microsoft Dynamics 365 site domain name (Example <strong><span style="text-decoration: underline;">zappy6.api.crm.dynamics.com</span></strong> Dynamics 365 URL)<strong>.</strong></p>
<p>        <div id="attachment_7211" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-D365-API-set-url-json-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7211" class="wp-image-7211 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-D365-API-set-url-json-source-768x682.png" alt="Set URL in JSON Source" width="720" height="639" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-D365-API-set-url-json-source-768x682.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-D365-API-set-url-json-source-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-D365-API-set-url-json-source.png 826w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7211" class="wp-caption-text">Set URL in JSON Source</p></div>
    </li>
</ol>
<h3>Preview / Query Dynamics 365 Data</h3>
<ol>
<li>Now select Array filter as <pre class="crayon-plain-tag">$.value[*]</pre>  (Click <strong>Select Filter</strong> Button &#8211; Choose value node)</li>
<li>
        Click on the Preview button to get the data.</p>
<p>        <div id="attachment_7687" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-json-source-preview-dynamic-crm.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7687" class="wp-image-7687 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-json-source-preview-dynamic-crm-768x631.png" alt="Preview Data" width="720" height="592" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-json-source-preview-dynamic-crm-768x631.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-json-source-preview-dynamic-crm-300x246.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-json-source-preview-dynamic-crm.png 891w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7687" class="wp-caption-text">Preview Data</p></div>
    </li>
<li>Finally, click OK to save JSON Source settings.</li>
<li>That’s it we are ready to load Dynamics 365 API data to SQL Server.</li>
</ol>
<h3>Load Microsoft Dynamics 365 API data into SQL Server</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><span id="Conclusion">Conclusion</span></h2>
<p>In this post you have seen how to Read Microsoft Dynamics 365 API data in SSIS. We used <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source Component</a> to call Dynamics 365 REST API and load data into SQL server. You can <a href="https://zappysys.com/products/ssis-powerpack/">download SSIS PowerPack here</a> to try many other scenarios not discussed in this blog along with 70+ other components.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of Dynamics 365 REST API with our tools:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a>, you can also find <a href="https://youtu.be/t4fSghbSZLo" target="_blank" rel="noopener">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=json-source.htm" target="_blank" rel="noopener">SSIS Json Source</a></li>
<li><a href="https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/about?view=dynamics-ce-odata-9" target="_blank" rel="noopener">Microsoft Dynamics CRM Web API Reference</a></li>
<li><a href="https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/entitytypes?view=dynamics-ce-odata-9" target="_blank" rel="noopener">Dynamics 365 Web API EntityType Reference</a></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-microsoft-dynamics-365-odata-api-data-ssis/">How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read SAP S4 / HANA data in SSIS (OData REST API)</title>
		<link>https://zappysys.com/blog/read-sap-s4-hana-data-ssis-cloud-odata-rest-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 20 Dec 2018 00:12:16 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS Upsert Destination]]></category>
		<category><![CDATA[SSIS XML Source (File / SOAP)]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[s/4hana]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5663</guid>

					<description><![CDATA[<p>Introduction In our previous post, we saw how to call REST API in SSIS. Now let&#8217;s learn how to read data from SAP S4 / HANA OData Service (i.e. S/4HANA). SAP HANA provides an OData REST API interface to access data in your application using HTTP Protocol. We will use the SSIS XML Source component to read [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-sap-s4-hana-data-ssis-cloud-odata-rest-api/">Read SAP S4 / HANA data in SSIS (OData 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/12/sap-logo.png"><img loading="lazy" decoding="async" class=" wp-image-5680 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/12/sap-logo.png" alt="" width="110" height="110" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/sap-logo.png 195w, https://zappysys.com/blog/wp-content/uploads/2018/12/sap-logo-150x150.png 150w" sizes="(max-width: 110px) 100vw, 110px" /></a>In our previous post, we saw how to <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">call REST API in SSIS</a>. Now let&#8217;s learn how to read data from SAP S4 / HANA OData Service (i.e. S/4HANA). SAP HANA provides an OData REST API interface to access data in your application using HTTP Protocol. We will use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a> component to read SAP data and load it into the SQL Server Table in a few clicks.</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>About SAP HANA / OData REST API Service</h2>
<p>You can expose your SAP Data using ODATA REST API Service. Here is a <a href="https://www.erpworkbench.com/sap-webapps/segw-odata-gateway-service.htm" target="_blank" rel="noopener">good article</a> that shows how to expose data as an OData Service. For more information on the SAP OData Service feature check the <a href="https://help.sap.com/doc/05d53b2d3bbb43d2ab5efa23829b2777/1610%20001/en-US/frameset.htm?ecaeea50ca692309e10000000a445394.html" target="_blank" rel="noopener">SAP help page</a>. If you are new to OData standard then <a href="https://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">read an article</a> to learn more about it. If you need an XML-based OData Service then use the test URLs below:</p><pre class="crayon-plain-tag">https://services.odata.org/Northwind/Northwind.svc/
https://services.odata.org/Northwind/Northwind.svc/Customers
https://services.odata.org/Northwind/Northwind.svc/Orders
https://services.odata.org/Northwind/Northwind.svc/Invoices
https://services.odata.org/Northwind/Northwind.svc/Products</pre><p>
Now let&#8217;s look at how to read SAP Data in SSIS. At this point, we assume you have exposed your data as OData Endpoint.</p>
<h2>Step-by-Step Instructions</h2>
<p>Let&#8217;s look at the step-by-step approach to how to read SAP data using SSIS components. Then we will load SAP HANA data into SQL Server.</p>
<h3>Read SAP HANA data using XML Source</h3>
<p>First, let&#8217;s look at the steps on how to configure XML Source. We will read data from SAP S4 / HANA OData Service and then we will look at how to load data into SQL Server in the next section.</p>
<ol>
<li>Open an SSIS package.</li>
<li>Drag <strong>Data Flow Task</strong> from <em>SSIS Toolbox </em>and double-click it to open it.</li>
<li>From the <em>SSIS Toolbox</em> drag <strong>ZS XML Source</strong> onto the background of Data Flow (in the designer). Double-click it to open the <em>XML Source</em> configuration window.</li>
<li>Change <em>Data Format</em> to <strong>OData</strong>. Selecting this option will take care of <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">REST API pagination</a> too.</li>
<li>Enter your <em>OData Service URL. </em>Its format looks similar to the one shown below. Replace 3 parts with your own value (i.e. replace {MY-INSTANCE}, {MY-PROJECT}, {MY-TABLE}):<br />
<pre class="crayon-plain-tag">https://{MY-INSTANCE}/sap/opu/odata/sap/{MY-PROJECT}/{MY-TABLE}</pre>
For example, if you are hosting SAP HANA in a cloud instance then your URL may look like this:<br />
<pre class="crayon-plain-tag">https://myXXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/MyTestProject/PurchaseOrders</pre>
</li>
<li>Check the <strong>Use Credentials</strong> checkbox and select the <strong>New ZS-HTTP Connection</strong> option.</li>
<li>In <em>HTTP Connection Manager</em> select the <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">Basic Authentication</a> option and enter your SAP HANA UserID / Password.
<div id="attachment_5668" style="width: 867px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/read-sap-s4-hana-odata-ssis-xml-rest-api-service.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5668" class="size-full wp-image-5668" src="https://zappysys.com/blog/wp-content/uploads/2018/12/read-sap-s4-hana-odata-ssis-xml-rest-api-service.png" alt="Configure SSIS HTTP Connection (SAP S4 / HANA OData Service - Using Basic Authentication)" width="857" height="740" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/read-sap-s4-hana-odata-ssis-xml-rest-api-service.png 857w, https://zappysys.com/blog/wp-content/uploads/2018/12/read-sap-s4-hana-odata-ssis-xml-rest-api-service-300x259.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/read-sap-s4-hana-odata-ssis-xml-rest-api-service-768x663.png 768w" sizes="(max-width: 857px) 100vw, 857px" /></a><p id="caption-attachment-5668" class="wp-caption-text">Configure SSIS HTTP Connection (SAP S4 / HANA OData Service &#8211; Using Basic Authentication)</p></div></li>
<li>Let&#8217;s get back to the <em>XML Source</em> connector we created in the previous stage. Press the <strong>Select Filter</strong> button or directly type <pre class="crayon-plain-tag">$.feed.entry[*]</pre>  into the field as shown below:
<div id="attachment_5669" style="width: 893px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-odata-read-xml-data-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5669" class="size-full wp-image-5669" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-odata-read-xml-data-source.png" alt="Select Filter for OData Service (XML REST API)" width="883" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-odata-read-xml-data-source.png 883w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-odata-read-xml-data-source-300x248.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-odata-read-xml-data-source-768x635.png 768w" sizes="(max-width: 883px) 100vw, 883px" /></a><p id="caption-attachment-5669" class="wp-caption-text">Select Filter for OData Service (XML REST API)</p></div></li>
<li>Click <strong>Preview</strong> to make sure you can see the records.</li>
<li>Click OK to save the configuration and close the configuration window.</li>
</ol>
<p>In the next section, we will configure the target to load SAP data into SQL Server using the <a href="https://zappysys.com/products/ssis-powerpack/ssis-upsert-destination/" target="_blank" rel="noopener">ZappySys Upsert Destination</a> Data Flow component.</p>
<h3>Load SAP HANA data into SQL Server using Upsert Destination</h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2>Conclusion</h2>
<p>In this post, we saw how easy it is to read SAP S4 HANA data using XML Source SSIS connector that is part of <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>. <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">Download it</a>, try it out, and see it for yourself! It has many more connectors that were not mentioned in this post but could be also very helpful in your daily work.</p>
<p>The post <a href="https://zappysys.com/blog/read-sap-s4-hana-data-ssis-cloud-odata-rest-api/">Read SAP S4 / HANA data in SSIS (OData REST API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read Azure DevOps data in SSIS (VSTS / TFS Online) – Call REST API / Load to SQL Server</title>
		<link>https://zappysys.com/blog/read-vsts-data-ssis-call-rest-api-load-sql-server/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 18 Aug 2018 09:47:14 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[azure devops]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[TFS Online]]></category>
		<category><![CDATA[visual studio team service]]></category>
		<category><![CDATA[vsts]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4643</guid>

					<description><![CDATA[<p>Introduction In this blog, we will learn How to read data from Azure DevOps in SSIS and load into SQL Server Table. Azure DevOps was formally known as TFS Online / VSTS. In this article we will learn, how to read Issues (Work Items) using Azure DevOps API (i.e. VSTS API). In last few years Microsoft has [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-vsts-data-ssis-call-rest-api-load-sql-server/">Read Azure DevOps data in SSIS (VSTS / TFS Online) – Call REST API / Load to SQL Server</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/08/Visual-Studio-Team-Services-logo-150x150-1.png"><img loading="lazy" decoding="async" class="alignleft wp-image-4646 " src="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-logo-150x150-1-150x150.png" alt="Visual Studio Team Service Logo" width="91" height="91" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-logo-150x150-1-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-logo-150x150-1.png 300w" sizes="(max-width: 91px) 100vw, 91px" /></a></p>
<p>In this blog, we will learn <strong>How to read data from Azure DevOps in SSIS and load into SQL Server Table.</strong> Azure DevOps was formally known as TFS Online / VSTS.</p>
<p>In this article we will learn, how to read Issues (Work Items) using Azure DevOps API (i.e. VSTS API). In last few years Microsoft has changed marketing names few times for TFS Service. For example everything started with  Visual Source Safe (VSS) &gt; TFS &gt; TFS Online &gt; Visual Studio Online &gt; VSTS (Visual Studio Team Services)) and finally now its called <strong>Azure DevOps</strong>. In this article we might use terms like VSTS or TFS  Online or <strong>Azure DevOps</strong> but not to get confused its all about <strong>Calling Azure Dev Ops API.</strong></p>
<p>In this article we will try to cover few topics such as.</p>
<ul>
<li>Register an OAuth App to call REST API for <strong>Azure DevOps API (i.e. VSTS / TFS Online)</strong></li>
<li>Read all Issues (Work Items) data from VSTS with SSIS and finally</li>
<li>Create new Issue/Bug in Visual Studio Team Service Project WorkItems.</li>
<li>Authenticate and Call Azure DevOps <strong>using PAT</strong> (Personal Access Tokens) rather than OAuth 2.0</li>
</ul>
<p>We will go through the steps to read Issues data from Visual Studio Team Service and Load into SQL Server using  <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source.</a></p>
<p>In nutshell, this post will focus on how to call VSTS API using SSIS.</p>
<p>So let&#8217;s get started.</p>
<h2><span id="Requirements">Prerequisite<br />
</span></h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack</a></li>
</ol>
<h2><span id="Conclusion">Call Azure DevOps API Using PAT (Personal Access Token)</span></h2>
<p>There are two ways to call Azure DevOps API. You can use <a href="https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth">OAuth 2.0</a> or use <a href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate" target="_blank" rel="noopener">PAT (i.e. Personal Access Token)</a> In the next section we will see how to use OAuth 2.0 if you like more secure way to authenticate (OAuth 2.0 requires more steps).</p>
<p>Microsoft offers Static API Token (referred as PAT &#8211; Personal Access Token) which you can use like a password (it remains valid for 1 year before you have regenerate).</p>
<p>So let&#8217;s get started.</p>
<h3>Create PAT (Personal Access Token)</h3>
<ol>
<li>Visit to <pre class="crayon-plain-tag">https://dev.azure.com/YOUR_COMPANY_NAME/_usersSettings/tokens</pre> . Create Personal Access Token (i.e. PAT ) by clicking User Settings icon &gt; Personal Access Token (see below)  (<a href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&amp;tabs=preview-page" target="_blank" rel="noopener">detailed steps listed here</a> )
<div id="attachment_9224" style="width: 801px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9224" class="size-full wp-image-9224" src="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token.png" alt="Call Azure DevOps API (formally known as VSTS / TFS Online) - Create Personal Access Token (i.e. PAT)" width="791" height="559" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token.png 791w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token-300x212.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token-768x543.png 768w" sizes="(max-width: 791px) 100vw, 791px" /></a><p id="caption-attachment-9224" class="wp-caption-text">Call Azure DevOps API (formally known as VSTS / TFS Online) &#8211; Create Personal Access Token (i.e. PAT)</p></div></li>
<li>On Token Configuration Screen change Expiration to maximum (i.e. one year from today)</li>
<li>Now select permission &#8211; We will call Analytics API below (but you can also check Work Items section if you need to call some other API for read / write purpose)
<div id="attachment_9225" style="width: 1201px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9225" class="wp-image-9225 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission.png" alt="Change Permission / Expiration Date for Azure DevOps PAT (Personal Access Token) - Read / Write Work Items, Call Analytics API Example" width="1191" height="837" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission.png 1191w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission-300x211.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission-768x540.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission-1024x720.png 1024w" sizes="(max-width: 1191px) 100vw, 1191px" /></a><p id="caption-attachment-9225" class="wp-caption-text">Change Permission / Expiration Date for Azure DevOps PAT (Personal Access Token) &#8211; Read / Write Work Items, Call Analytics API Example</p></div></li>
</ol>
<h3>Call Azure DevOps OData API in SSIS &#8211; Read WorkItems  Example (Analytics API Service)</h3>
<p>Now lets configure JSON Source to read WorkItems by calling  Azure DevOps Analytics API (in Previous few sections we call different set of APIs). <a href="https://docs.microsoft.com/en-us/azure/devops/report/extend-analytics/wit-analytics?view=azure-devops">Check this link</a> for more information on AzureDevOps Analytics API (its OData format).</p>
<p>For demo purpose we are calling WorkItems entity but you can read from many other entities like (Read Areas, Iterations, Projects, Teams, Tags etc). <a href="https://docs.microsoft.com/en-us/azure/devops/report/extend-analytics/data-model-analytics-service?view=azure-devops">Check this link</a> to see which Entity (i.e. Table) you can query for specific OData API version.</p>
<p>So let&#8217;s get started</p>
<ol>
<li>Go to SSIS designer and drag Data Flow Task on the Designer Surface<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>Then double click Data Flow and from toolbox drag ZS JSON Source<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 to configure like below
<ol>
<li>First change Data Format to <strong>OData</strong> (Analytics API we will call in this section is OData format)</li>
<li>Enter URL to Query data like below. Change <strong>YOUR_COMPANY_NAME</strong> with your own name. Below API URL will call Analytics will<br />
<pre class="crayon-plain-tag">https://analytics.dev.azure.com/YOUR_COMPANY_NAME/Odbc/_odata/v3.0/WorkItems?$select=WorkItemId,Title,WorkItemType,State,CreatedDate&amp;$orderby=CreatedDate desc&amp;$top=11</pre>
</li>
<li>Check Use Credentials and Select new <strong>ZS-HTTP</strong> connection (instead of OAUTH)</li>
</ol>
</li>
<li>On HTTP Connection UI Configure below
<ol>
<li>Enter Some URL &#8211; This will be ignored anyways (e.g. https://dev.azure.com )</li>
<li>Change Credentials Type to Basic (User ID / Password)</li>
<li>Enter some random word in User ID -i.e. fakeusername (this is ignored anyways but needs some non-empty value for older version of SSIS PowerPack else validation fails)</li>
<li>Enter PAT (i.e. Personal Access Token) obtained in the previous section</li>
</ol>
</li>
<li>Click OK to Save Connection UI and go back to JSON Source</li>
<li>On JSON Source, Enter or Select <strong>Array Filter</strong> as <pre class="crayon-plain-tag">$.value[*]</pre></li>
<li>Click Preview data see its working using HTTP connection method</li>
</ol>
<div id="attachment_9226" style="width: 1071px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9226" class="size-full wp-image-9226" src="https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api.png" alt="Configure JSON Source - Call Azure DevOps Api using PAT (Personal Access Token)" width="1061" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api.png 1061w, https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api-300x207.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api-768x531.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api-1024x707.png 1024w" sizes="(max-width: 1061px) 100vw, 1061px" /></a><p id="caption-attachment-9226" class="wp-caption-text">Configure JSON Source &#8211; Call Azure DevOps Api using PAT (Personal Access Token)</p></div>
<p>&nbsp;</p>
<h2>Calling Azure DevOps API in SSIS using OAuth 2.0</h2>
<p>Now in this section we will see how to use more secure but little harder approach to authenticate. We will use OAuth 2.0 this time rather than static token (PAT) which we used in previous section.</p>
<p>In order to start, we will show several examples. ZappySys includes an <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> that will help you to call VSTS API, read various data from VSTS with SSIS, create a new issue on VSTS with SSIS and do many more actions using REST API. To learn more about VSTS API <a href="https://docs.microsoft.com/en-us/rest/api/vsts" rel="noopener">check this help file</a>.</p>
<h3>Create VSTS App (for OAuth 2.0 API Call)</h3>
<p>To access VSTS data using REST API call you need to create a VSTS app. Follow the mentioned steps below to register VSTS OAuth App:</p>
<ol>
<li>you can directly login to the <a href="https://app.vssps.visualstudio.com/profile/view">Visual Studio Team Service &#8211; TFS Online site</a> with your credentials, and redirect to the <a href="https://app.vsaex.visualstudio.com/app/register">Visual Studio Team Service App Registration</a> for creating an app.</li>
<li>you can open <a href="https://app.vssps.visualstudio.com/profile/view">MyApps Page</a>.
<div id="attachment_10065" style="width: 1233px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10065" class="wp-image-10065 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps.png" alt="Visual-Studio-Team-Services-Create-new-OAuth-Apps" width="1223" height="759" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps.png 1223w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps-300x186.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps-768x477.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps-1024x635.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps-436x272.png 436w" sizes="(max-width: 1223px) 100vw, 1223px" /></a><p id="caption-attachment-10065" class="wp-caption-text">Visual Studio Team Service: My Apps</p></div>
<p>Visual Studio Team Service: My Apps[/caption]</li>
<li>Click on Create new application link, and you will be redirected to the <a href="https://app.vsaex.visualstudio.com/app/register">Visual Studio Team Service App Registration</a> Page.</li>
<li>Make sure you enter Authorization call base URL. We suggest to below call back URL if you are unsure. We will use exact same URL on OAuth connection UI (Advanced Tab)</p><pre class="crayon-plain-tag">https://zappysys.com/oauth</pre><p>
</li>
<li>
<div id="attachment_4649" style="width: 962px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4649" class="wp-image-4649 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration.png" alt="Visual Studio Team Service: New OAuth App Registration" width="952" height="760" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration.png 952w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-300x239.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-768x613.png 768w" sizes="(max-width: 952px) 100vw, 952px" /></a><p id="caption-attachment-4649" class="wp-caption-text">Visual Studio Team Service: New OAuth App Registration</p></div></li>
<li>Select the Authorization scopes as per your requirements, and click on Create Application button.<br />
For example to read Work Items or Create new Issues programmatically you can check following scope (i.e. OAuth permission).<strong>Check &#8211; Work items (full)  </strong>(i.e. vso.work_full scope)<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Note: The scopes selected on your registered application (below screenshot) must match the scopes entered in the ZappySys OAuth connection scopes field (see below). If they do not match exactly, an InvalidScope error can be produced.</div></div>
<strong><br />
</strong></p>
<div id="attachment_4651" style="width: 1130px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4651" class="wp-image-4651 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes.png" alt="Visual Studio Team Service: Select Authorization Scopes" width="1120" height="761" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes.png 1120w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes-768x522.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes-1024x696.png 1024w" sizes="(max-width: 1120px) 100vw, 1120px" /></a><p id="caption-attachment-4651" class="wp-caption-text">Visual Studio Team Service: Select Authorization Scopes</p></div></li>
<li>Once you are done with the Creation of an App certainly, you can edit the Application If you want to change Redirect URL or something.</li>
<li>furthermore, Go to MyApps Page and you have your App&#8217;s Lists there with App&#8217;s App ID as Client ID and App Secret as Client Secret.
<div id="attachment_10067" style="width: 1177px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10067" class="wp-image-10067 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1.png" alt="VSTS-OAuth-App-Credentials" width="1167" height="495" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1.png 1167w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1-300x127.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1-768x326.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1-1024x434.png 1024w" sizes="(max-width: 1167px) 100vw, 1167px" /></a><p id="caption-attachment-10067" class="wp-caption-text">Visual Studio Team Service: Your Apps with App’s Credentials</p></div></li>
</ol>
<p>finally, we are ready with an App. Let´s start with an example. In this example, we will show how to retrieve all Issues data from Visual Studio Team Service &#8211; TFS Online and create a new Issue in Visual Studio Team Service &#8211; TFS Online Work Items List under your Project with SSIS.</p>
<h3>Load VSTS data to SQL Server using SSIS JSON Source</h3>
<p>Now once you registered OAuth app in the Visual Studio Team Service &#8211; TFS Online website we can move to SSIS Part.</p>
<h4>Configure OAuth Connection Manager</h4>
<ol>
<li>Right click on Connection Managers Panel to Create New OAuth Connection, and Context Menu will appear, Select New Connection from the Context Menu.
<div id="attachment_4723" style="width: 687px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-select-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4723" class="size-full wp-image-4723" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-select-connection.png" alt="Connection Manager Panel: Select Connection" width="677" height="348" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-select-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-select-connection-300x154.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-4723" class="wp-caption-text">Connection Manager Panel: Select Connection</p></div></li>
<li>Select ZS-OAUTH Connection Manager from the Connection Managers list.
<div id="attachment_4724" style="width: 681px" class="wp-caption aligncenter"><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="wp-image-4724 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png" alt="SSIS Connection Mangers 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 Mangers List: Select O-AUTH Connection Manager</p></div></li>
<li>Configure the new OAuth Connection for <strong>VSTS(Visual Studio Team Service &#8211; TFS Online)</strong> as below.</li>
<li>First lets enter Call back URL (Same URL you entered when you created App earlier)<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab.png"><img loading="lazy" decoding="async" class="size-full wp-image-4696" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab.png" alt="SSIS OAuth Connection Manager: Advanced Tab Configurations" width="771" height="697" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab.png 771w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab-300x271.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab-768x694.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></a>SSIS OAuth Connection Manager: Advanced Tab Configurations</li>
<li>For VSTS API you need to set the Refresh Token File Path as below because VSTS API Token&#8217;s Refresh Token keeps changing.<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab.png"><img loading="lazy" decoding="async" class="size-full wp-image-4697" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab.png" alt="SSIS OAuth Connection Manager: OAuth2 Grant Options Tab Configurations" width="771" height="697" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab.png 771w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab-300x271.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab-768x694.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></a></li>
<li>Then configure the App on the General tab like below (i.e. OAuth Provider, Client ID, Client Secret, Scopes, etc.)<br />
Scope must be valid one <a href="https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?toc=%2Fazure%2Fdevops%2Forganizations%2Ftoc.json&amp;bc=%2Fazure%2Fdevops%2Forganizations%2Fbreadcrumb%2Ftoc.json&amp;view=azure-devops#scopes" target="_blank" rel="noopener">from this list</a> (only those scope allowed which are checked during app creation). For example during app creation you check Work items (full) then you can enter <strong>vso.work_full</strong> in scope.<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Note: The scopes selected on your registered application must match the scopes entered in the scopes field (below screenshot). If they do not match exactly, an InvalidScope error can be produced.</div></div><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab.png"><img loading="lazy" decoding="async" class="size-full wp-image-4695" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab.png" alt="SSIS OAuth Connection Manager: General Tab Configurations" width="771" height="697" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab.png 771w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab-300x271.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab-768x694.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></a></p>
<div class="mceTemp"></div>
</li>
<li>finally, you are done with the OAuth Configurations. Click on Generate Token button to Generate token and then click on Test Connection button and click on OK to save the connection manager configurations settings.</li>
</ol>
<h4>How to get ProjectID?</h4>
<p>If you don&#8217;t know the ProjectID, then you can also enter ProjectName in place of ProjectID in Request URL. you can also call GET Request for getting Lists of Projects. the Request URL for getting the list of Projects is:</p><pre class="crayon-plain-tag">https://{accountName}.visualstudio.com/_apis/projects?api-version=4.1</pre><p>
For this, we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a></p>
<ol>
<li>First of All, Goto Control Flow Section, Drag and Drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a> from the SSIS Toolbox.
<div id="attachment_3777" class="wp-caption aligncenter">
<div id="attachment_3777" style="width: 577px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png?ssl=1"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3777" class="wp-image-3777 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png" alt="Drag and Drop REST API Task" width="567" height="297" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png 567w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin-300x157.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></a><p id="caption-attachment-3777" class="wp-caption-text">Drag and Drop REST API Task</p></div>
</div>
</li>
<li>furthermore, Double click on that Component to Edit the Configurations and Configure the task like the below-attached screesnshot.<br />
Some basic configurations need to be done in SSIS REST API Task.<br />
<strong># Request Tab: </strong></p>
<blockquote><p><strong>* </strong>Select Request URL Access Mode to Url from Connection.<br />
<strong>* </strong>Select Url Connection to your configured ZS-OAuth Connection Manager.<strong><br />
* </strong>Enter <strong>Request URL:</strong> https://zappysys.visualstudio.com/_apis/projects?api-version=4.1<br />
<strong>* </strong>Select <strong>HTTP Request Method:</strong> GET</p></blockquote>
<div id="attachment_4725" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4725" class="size-full wp-image-4725" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings.png" alt="SSIS REST API Task: Request Tab Configurations" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings.png 800w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings-300x245.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings-768x628.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-4725" class="wp-caption-text">SSIS REST API Tsk: Request Tab Configurations</p></div>
<p>Create New Variable from Variable Menu</p>
<div id="attachment_4692" style="width: 1559px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4692" class="size-full wp-image-4692" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables.png" alt="SSIS User Variables: Create a new Variable and set Value" width="1549" height="249" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables.png 1549w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables-300x48.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables-768x123.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables-1024x165.png 1024w" sizes="(max-width: 1549px) 100vw, 1549px" /></a><p id="caption-attachment-4692" class="wp-caption-text">SSIS User Variables: Create a new Variable and set Value</p></div>
<p><strong># Response Tab: </strong></p>
<blockquote><p>* Select <strong>Response Content Type:</strong> Json<br />
* Set <strong>Response Content Filter Expression:</strong> $.value[1].id<br />
* check the checkbox of <strong>Save Response Content<br />
</strong><strong>* </strong>Set <strong>Save Mode </strong>to Save to Variable<br />
* <strong>Select your Variable:</strong> {{User::ProjectID}}</p></blockquote>
<div id="attachment_4726" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4726" class="size-full wp-image-4726" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings.png" alt="SSIS REST API Task: Response Tab Configurations" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings.png 800w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings-300x245.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings-768x628.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-4726" class="wp-caption-text">SSIS REST API Task: Response Tab Configurations</p></div></li>
<li> finally, you are done with the configurations and do Test Request/Response and your ProjectID will be saved in {{User:: ProjectID}}</li>
</ol>
<h4>Configure JSON Source Component</h4>
<ol>
<li>First of all, Create a new SSIS Project or Open Existing Project in Visual Studio  (File &gt; New &gt; Project &gt; Business Intelligence &gt; Integration Services)</li>
<li>Once SSIS Package is open, Goto Data Flow Section, Drag and Drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">ZS JSON Source Component</a> from the SSIS Toolbox.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>furthermore, Double click on that Component to Edit the Configurations. Select File path or web URL from the Access Mode drop-down.<br />
Enter Web URL like this:<br />
<pre class="crayon-plain-tag">https://{accountName}.almsearch.visualstudio.com/{project}/_apis/search/workitemsearchresults?api-version=4.1-preview.1</pre>
here, We have used 2 Parameters<strong>.</strong></p>
<p><strong>* {accountName} </strong>is the name of the Visual Studio Team Services &#8211; TFS Online account<strong>.<br />
</strong><strong>* {project} </strong>is Project ID or project name (For more See this <a href="https://docs.microsoft.com/en-us/rest/api/vsts/search/work%20item%20search%20results/fetch%20work%20item%20search%20results?view=vsts-rest-4.1">Visual Studio Team Service API Documentation for getting filtered Issues data Request API</a>)<br />
We have used Search Work Items for Fetching Paginated Work Items(Issues, Bugs)</p>
<p>You can use Variable too in your Request URL, to <strong>make URL Dynamic</strong>, See the below-attached Screenshot.<br />
To make URL dynamic first create an SSIS variable like below screenshot and then change URL to use <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm" target="_blank" rel="noopener">Variable Placeholder</a> like this</p><pre class="crayon-plain-tag">https://zappysys.almsearch.visualstudio.com/{{User::ProjectID}}/_apis/search/workitemsearchresults?api-version=4.1-preview.1</pre><p>
&nbsp;</li>
</ol>
<div id="attachment_4693" style="width: 892px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4693" class="size-full wp-image-4693" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url.png" alt="SSIS JSON Source Component: Enter the Request URL" width="882" height="752" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url.png 882w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url-300x256.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url-768x655.png 768w" sizes="(max-width: 882px) 100vw, 882px" /></a><p id="caption-attachment-4693" class="wp-caption-text">SSIS JSON Source Component: Enter the Request URL</p></div>
<h4>JSON Source Configuration for Pagination</h4>
<ol>
<li>now, we are going to set Pagination related configurations of Visual Studio Team Service &#8211; TFS Online for Getting all WorkItems with Search POST REST Request API. Here in our example,<br />
<strong><strong>Request Method: POST<br />
Body Content-Type: JSON (application/json)<br />
Request Body:<br />
</strong></strong><br />
<pre class="crayon-plain-tag">{
  "searchText": "a",
  "$skip": &lt;%page%&gt;,
  "$top": 100,
  "filters": {
    "System.TeamProject": [
      "ProductTesting"
    ]
  }
}</pre>
here, SearchText: The SearchText for filtering WorkItems based on the keywords match.<br />
<strong>$skip:</strong> Number of results to be skipped<br />
<strong>$top:</strong> Number of results to be returned.<br />
<div class="su-note"  style="border-color:#e5e54c;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:#FFFF66;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">you can take any number of the page size. for example, you can set 100 in both $skip and $top properties (I have set 10 for the Demo Purpose only)</div></div>
filters: Filters to be applied. Set it to null if there are no filters to be applied.<br />
System.TeamProject: ProjectName in which you want to do filtering of WorkItems.</p>
<div id="attachment_4698" style="width: 1174px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4698" class="size-full wp-image-4698" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab.png" alt="SSIS JSON Source Component: Configurations of Settings Tab" width="1164" height="728" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab.png 1164w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab-300x188.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab-768x480.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab-1024x640.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab-436x272.png 436w" sizes="(max-width: 1164px) 100vw, 1164px" /></a><p id="caption-attachment-4698" class="wp-caption-text">SSIS JSON Source Component: Configurations of Settings Tab</p></div></li>
<li> You can Configure the Pagination Tab something like this:
<div id="attachment_4699" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4699" class="size-full wp-image-4699" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab.png" alt="SSIS JSON Source Component: Pagination Tab Settings" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab.png 826w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab-768x682.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-4699" class="wp-caption-text">SSIS JSON Source Component: Pagination Tab Settings</p></div></li>
<li>furthermore, Select the Filter to set the Filter.
<div id="attachment_4700" style="width: 1093px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4700" class="size-full wp-image-4700" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request.png" alt="SSIS JSON Source Component Configurations: Select Filter" width="1083" height="729" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request.png 1083w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request-768x517.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request-1024x689.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request-272x182.png 272w" sizes="(max-width: 1083px) 100vw, 1083px" /></a><p id="caption-attachment-4700" class="wp-caption-text">SSIS JSON Source Component Configurations: Select Filter</p></div></li>
<li>It seems like you are all OK with the configurations, Click on the Preview button to see the response data.
<div id="attachment_4701" style="width: 1519px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4701" class="size-full wp-image-4701" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data.png" alt="SSIS JSON Source Component: See the Preview" width="1509" height="731" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data.png 1509w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data-300x145.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data-768x372.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data-1024x496.png 1024w" sizes="(max-width: 1509px) 100vw, 1509px" /></a><p id="caption-attachment-4701" class="wp-caption-text">SSIS JSON Source Component: See the Preview</p></div></li>
<li>finally, Click on OK button to save JSON Source settings.</li>
</ol>
<h4>Configure OLE DB Destination Component for dumping Contacts data into SQL</h4>
<ol>
<li>first of all, Drag any destination (i.e. OLEDB Destination) from your SSIS toolbox. For demo purpose, we will load Contacts data into SQL Server Table.
<div id="attachment_4335" style="width: 819px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4335" class="size-full wp-image-4335" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component.png" alt="Drag and Drop OLE DB Destination Component" width="809" height="497" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component.png 809w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component-300x184.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component-768x472.png 768w" sizes="(max-width: 809px) 100vw, 809px" /></a><p id="caption-attachment-4335" class="wp-caption-text">Drag and Drop OLE DB Destination Component</p></div></li>
<li>Configure OLEDB Destination (Select Connection and Target Table). You can Create a new Table for the destination by clicking a NEW button next to Table drop-down.
<div id="attachment_4703" style="width: 1176px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4703" class="size-full wp-image-4703" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql.png" alt="OLE DB Destination Component - Configure for dumping WorkItems of Project from VSTS data in SQL Table" width="1166" height="772" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql.png 1166w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql-300x199.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql-768x508.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql-1024x678.png 1024w" sizes="(max-width: 1166px) 100vw, 1166px" /></a><p id="caption-attachment-4703" class="wp-caption-text">OLE DB Destination Component &#8211; Configure for dumping WorkItems of Project from VSTS data in SQL Table</p></div></li>
<li>almost you are done with the configurations, just need to configure mappings, So for that Click on the Columns Tab to configure Mappings. also, Click on OK button to Save the configurations of OLE DB Destination Component.
<div id="attachment_4704" style="width: 834px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4704" class="size-full wp-image-4704" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings.png" alt="OLE DB Destination - Column Configurations" width="824" height="718" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings.png 824w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings-768x669.png 768w" sizes="(max-width: 824px) 100vw, 824px" /></a><p id="caption-attachment-4704" class="wp-caption-text">OLE DB Destination &#8211; Column Configurations</p></div></li>
<li>furthermore, You can see the requests in <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/">Fiddler</a> to see the Paginated requests flows.
<div id="attachment_4705" style="width: 1540px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4705" class="size-full wp-image-4705" src="https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests.png" alt="Fiddler - See All The Requests" width="1530" height="649" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests.png 1530w, https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests-300x127.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests-768x326.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests-1024x434.png 1024w" sizes="(max-width: 1530px) 100vw, 1530px" /></a><p id="caption-attachment-4705" class="wp-caption-text">Fiddler &#8211; See All The Requests</p></div></li>
<li>finally, Execute your package to Load Contacts data from Visual Studio Team Service &#8211; TFS Online to SQL Server.</li>
</ol>
<h2>Create a new WorkItem on Visual Studio Team Service &#8211; TFS Online (Use SSIS REST API Task)</h2>
<p>Now let&#8217;s look at one more example to call Visual Studio Team Service(VSTS) &#8211; TFS Online REST API. This time we will create a new WorkItem using REST API call in SSIS. For this, we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a></p>
<ol>
<li>First of All, Goto Control Flow Section, Drag and Drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a> from the SSIS Toolbox.
<div id="attachment_3777" style="width: 577px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3777" class="wp-image-3777 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png" alt="Drag and Drop REST API Task" width="567" height="297" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png 567w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin-300x157.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></a><p id="caption-attachment-3777" class="wp-caption-text">Drag and Drop REST API Task</p></div></li>
<li>furthermore, Double click on that Component to Edit the Configurations and Configure the task like the below-attached screesnshot.<br />
<pre class="crayon-plain-tag">::::: Request Settings :::::

* Select Request URL Access Mode to select Url from Connection.
* Select Url Connection: Select your created OAUTH Connection Manager.
* Enter Reqeust URL
      Request URL: POST https://{accountName}.visualstudio.com/{project}/_apis/wit/workitems/${type}?api-version=4.1
      here, 
      {accountName} - The name of the Visual Studio Team Services account.
      {project} - Project ID or project name
      {type} - WorkItems Type (Task, Bug, Issue, Requirement etc)
* Select HTTP Request Method as PATCH method
* Enter Request Body.
      Request Body:
      [
         {
             "op": "add",
             "path": "/fields/System.Title",
             "value": "Sample task"
         }
      ]
* Select Body Content Type: Text/Plain
*Enter Request Header:
        Content-Type: application/json-patch+json
(For more Information See this Visual Studio Team Service - TFS Online API Documentation for Creating a new WorkItem
https://docs.microsoft.com/en-us/rest/api/vsts/wit/work%20items/create?view=vsts-rest-4.1)</pre>
<div id="attachment_4707" style="width: 1068px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4707" class="size-full wp-image-4707" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API.png" alt="REST API Task: Configurations" width="1058" height="652" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API.png 1058w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-300x185.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-768x473.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-1024x631.png 1024w" sizes="(max-width: 1058px) 100vw, 1058px" /></a><p id="caption-attachment-4707" class="wp-caption-text">REST API Task: Configurations</p></div></li>
<li>So all good with the Configurations let&#8217;s do Test Request/Response by clicking on Test Request/Response button. See the below-attached request/response screen.
<div id="attachment_4708" style="width: 1274px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4708" class="size-full wp-image-4708" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response.png" alt="Create New WorkItem in VSTS Account: Do Test Request/Response" width="1264" height="671" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response.png 1264w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response-300x159.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response-768x408.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response-1024x544.png 1024w" sizes="(max-width: 1264px) 100vw, 1264px" /></a><p id="caption-attachment-4708" class="wp-caption-text">Create New WorkItem in VSTS Account: Do Test Request/Response</p></div></li>
<li>finally, you have created a WorkItem in VSTS successfully using VSTS REST API and REST API Task, See in VSTS Site.
<div id="attachment_4714" style="width: 1609px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4714" class="wp-image-4714 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API.png" alt="VSTS Site: See the Newly Created WorkItem" width="1599" height="389" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API.png 1599w, https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API-300x73.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API-768x187.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API-1024x249.png 1024w" sizes="(max-width: 1599px) 100vw, 1599px" /></a><p id="caption-attachment-4714" class="wp-caption-text">VSTS Site: See the Newly Created WorkItem</p></div></li>
<li>And that&#8217;s it. similarly, you can Update/Delete particular WorkItem in WorkItems List in VSTS.</li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>In this blog, we learned how to read Visual Studio Team Services &#8211; TFS(Team Foundation Server) Online data in SSIS, How to register an OAuth App for Visual Studio Team Service REST API, How to get all WorkItems data from Visual Studio Team Service  &#8211; TFS(Team Foundation Server) Online and create a new WorkItem on VSTS with SSIS using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">ZS JSON Source Component</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a> in a very simple way. You can achieve many more functionalities with the use of both of these tools. Check our blogs/articles on <strong>REST API Task </strong><a href="https://zappysys.com/blog/tag/ssis-rest-api-task/">https://zappysys.com/blog/tag/ssis-rest-api-task/</a> and <strong>JSON Source Component </strong><a href="https://zappysys.com/blog/tag/ssis-json-source/">https://zappysys.com/blog/tag/ssis-json-source/</a> to find out what <em>these tools</em> are capable of more.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of VSTS API with our tools:</p>
<ul>
<li><a href="https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1">Visual Studio Team Service Documentation for API</a></li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">REST API Task</a>, you can also find <a href="https://youtu.be/jPdcQlWOBZA">Tutorial Video</a> here.</li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">JSON Source Component</a>, you can also find <a href="https://youtu.be/t4fSghbSZLo">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-rest-api-web-service-task.htm">SSIS REST API Task</a> and <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=json-source.htm">JSON Source Component</a>.</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-vsts-data-ssis-call-rest-api-load-sql-server/">Read Azure DevOps data in SSIS (VSTS / TFS Online) – Call REST API / Load to SQL Server</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read OData in SSIS &#8211; REST API Example</title>
		<link>https://zappysys.com/blog/odata-paging-rest-api-paging-using-ssis-json-source/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 10 Sep 2015 14:07:04 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[paging]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=39</guid>

					<description><![CDATA[<p>Introduction In this article, we will learn how to utilize the SSIS JSON Source Component to retrieve JSON data from an OData service and perform OData pagination on significant results. According to the OData specification, data can be presented in either JSON or XML format. For the XML format, refer to this article. This article primarily [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/odata-paging-rest-api-paging-using-ssis-json-source/">How to read OData in SSIS &#8211; REST API Example</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, we will learn how to utilize the SSIS JSON Source Component to retrieve JSON data from an OData service and perform OData pagination on significant results. <span style="box-sizing: border-box; margin: 0px; padding: 0px;">According to the OData specification, data can be presented in either JSON or XML format. For the XML format, refer to <a href="https://zappysys.com/blog/read-sap-s4-hana-data-ssis-cloud-odata-rest-api/" target="_blank" rel="noopener">this article</a>.</span> This article primarily covers the OData JSON API example.</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>REST API Pagination concept</h2>
<p>Most of the REST API Services limit the size of the dataset returned in a single request. When more data is found, it simply includes a pointer to the following result set. If you wish to fetch all data (e.g., loop through), you must check the following result set indicator. If it is not null, you can continue fetching until all data is retrieved. <span style="box-sizing: border-box; margin: 0px; padding: 0px;">This article covers several pagination methods</span>.</p>
<h2>Reading OData API in SSIS using JSON Source</h2>
<p>Let&#8217;s discuss how to read the OData API and Paginate Automatically. Below is a typical OData service Response (JSON Format). Notice how it includes the nextLink attribute, which points to the following URL to fetch more data. When you set <strong>Data </strong><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><strong>Format to OData</strong> in the JSON Source, it will handle</span> pagination for you.</p>
<p><strong>Request URL: </strong></p><pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Order_Details?$format=json</pre><p>
<b>Response:</b></p><pre class="crayon-plain-tag">{
  &quot;odata.metadata&quot;: &quot;https://services.odata.org/V3/Northwind/Northwind.svc/$metadata#Order_Details&quot;,
  &quot;value&quot;: [
    {
      &quot;OrderID&quot;: 10248,
      &quot;ProductID&quot;: 11,
      &quot;Discount&quot;: 0
    },
 ........
 ........
  ],
  &quot;odata.nextLink&quot;: &quot;Order_Details?$skiptoken=10436,75&quot;
}</pre><p>
<h3>Step-By-Step</h3>
<p>In this section, you will learn how to use the JSON Source Adapter to extract data from the OData API.</p>
<ol>
<li><span style="box-sizing: border-box; margin: 0px; padding: 0px;">Firstly, you need to <strong>download and install</strong> SSIS <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">ZappySys PowerPack.</a></span></li>
<li>Once you have finished the first step, Open Visual Studio and create a New SSIS Package Project.</li>
<li>Now, Drag and Drop the SSIS <strong>Data Flow Task</strong> from the SSIS Toolbox.
<div id="attachment_11529" style="width: 472px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/drag-and-drop-data-flow-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11529" class="size-full wp-image-11529" src="https://zappysys.com/blog/wp-content/uploads/2015/09/drag-and-drop-data-flow-task.png" alt="" width="462" height="157" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/drag-and-drop-data-flow-task.png 462w, https://zappysys.com/blog/wp-content/uploads/2015/09/drag-and-drop-data-flow-task-300x102.png 300w" sizes="(max-width: 462px) 100vw, 462px" /></a><p id="caption-attachment-11529" class="wp-caption-text">SSIS Data Flow Task &#8211; Drag and Drop</p></div></li>
<li>Double-click on the Data Flow task to see the Data Flow designer surface.</li>
<li>From the SSIS toolbox, drag and drop the JSON Source onto the Data Flow Designer surface.
<div id="attachment_11533" style="width: 553px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11533" class="size-full wp-image-11533" src="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png" alt="" width="543" height="146" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png 543w, https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag-300x81.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></a><p id="caption-attachment-11533" class="wp-caption-text">SSIS JSON Source &#8211; Drag and Drop</p></div></li>
<li>Double-click JSON Source and enter URL for OData API (You may use the below example URL for demo)<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Order_Details?$format=json</pre>
&nbsp;</li>
<li>Now configure Array Filter as below (you may see <strong>$.value[*]</strong> or some other node if URL is different)
<div id="attachment_11531" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11531" class="size-full wp-image-11531" src="https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source.png" alt="" width="828" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source.png 828w, https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source-300x270.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source-768x691.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11531" class="wp-caption-text">OData Paging using SSIS JSON Source</p></div></li>
<li>Click Preview data and OK to save
<div id="attachment_11532" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11532" class="size-full wp-image-11532" src="https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS.png" alt="" width="828" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS.png 828w, https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS-300x270.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS-768x691.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11532" class="wp-caption-text">Read JSON File data from Web URL Example in SSIS</p></div></li>
<li>Now click OK to save.</li>
<li>Connect Your Source with a target like ZS Trash destination and execute the package. You will notice in the log that it paginates to return all rows
<div id="attachment_11530" style="width: 932px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11530" class="size-full wp-image-11530" src="https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example.png" alt="" width="922" height="148" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example.png 922w, https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example-300x48.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example-768x123.png 768w" sizes="(max-width: 922px) 100vw, 922px" /></a><p id="caption-attachment-11530" class="wp-caption-text">Fetch OData in SSIS (REST API Example)</p></div></li>
</ol>
<h2>Loading OData API into SQL Server / Other Target using SSIS</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>Twitter(Now X) REST API Paging Example using SSIS JSON Source</h2>
<p>The Twitter (Now X) REST API is not an OData format, but you can see a similar concept there as well. On Twitter, you don&#8217;t have a partial URL like OData for the following link, but it provides a unique identifier for some sort of record. <a href="https://developer.x.com/en/docs/x-api/v1/pagination" target="_blank" rel="noopener">Read here</a> for more information on the Twitter REST API Paging technique.</p>
<p>In our case, <a target="_blank" rel="noopener">SSIS JSON Source</a> Supports Paging very well, so we are covered. To loop through multiple result sets of Twitter data, simply configure the following four properties. See the screenshot below.</p>
<div class="mceTemp"></div>
<div id="attachment_11536" style="width: 869px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11536" class="size-full wp-image-11536" src="https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor.png" alt="" width="859" height="578" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor.png 859w, https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor-768x517.png 768w, https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor-272x182.png 272w" sizes="(max-width: 859px) 100vw, 859px" /></a><p id="caption-attachment-11536" class="wp-caption-text">Twitter(X) REST API &#8211; Paging Example -Loop through resultset using cursor</p></div>
<h2>Conclusion</h2>
<p><span style="box-sizing: border-box; margin: 0px; padding: 0px;">Based on the above examples, you can see that handling Raging in REST API calls is not straightforward, but using Components like <a target="_blank" rel="noopener">SSIS JSON Source</a> can take some work off your plate.</span></p>
<p>The post <a href="https://zappysys.com/blog/odata-paging-rest-api-paging-using-ssis-json-source/">How to read OData in SSIS &#8211; REST API Example</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Call REST API in SSIS &#8211; Read JSON / XML / CSV</title>
		<link>https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 03 Aug 2015 04:41:10 +0000</pubDate>
				<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[client certificate]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[http post]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[json source]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[paging]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[rest api task]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=22</guid>

					<description><![CDATA[<p>Introduction The REST API is becoming increasingly popular in the Data Integration landscape. If you are an SSIS Developer (not a coder) and stumbled upon a question What is REST API and how to consume API inside an SSIS package?&#8221; then you are at the right place :). We encourage you to read this article carefully and [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/">How to Call REST API in SSIS &#8211; Read JSON / XML / CSV</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="122" height="130" /></a>The REST API is becoming increasingly popular in the Data Integration landscape. <span style="box-sizing: border-box; margin: 0px; padding: 0px;">If you are an SSIS Developer (not a coder) and stumbled upon a question What is REST API and <em>how to consume API inside an SSIS package?</em>&#8221; then you are at the right place :).</span> We encourage you to read this article carefully and follow the various links we provided.</p>
<p>In this article, you will learn about many REST API Tips / Tools on the topic <em>of how to call a REST API using </em><a target="_blank" rel="noopener"><em>the SSIS REST API Task</em></a><em>, </em><a target="_blank" rel="noopener"><em>JSON Source,</em></a><em> or </em><a target="_blank" rel="noopener"><em>XML Source</em></a>. You will also learn how to perform <em>HTTP GET </em>and <em>HTTP POST Requests</em> without needing to know any programming languages (e.g., C#, Java, Python) &#8211; simply do a drag-and-drop operation in SSIS.</p>
<h2></h2>
<h2>What is REST API / RESTful Web Service</h2>
<p>Let&#8217;s first understand <strong>what a REST API</strong> is, also sometimes referred to as a <strong>RESTful Web Service</strong>. This is a new buzzword that you will likely hear frequently. More and more services are available in the Cloud, which makes it obvious to come up with some way for you to access data in a more firewall-friendly manner. What can be a better option than accessing it using a several-decade-old HTTP protocol, so no additional configuration is required for anybody accessing Cloud Services?</p>
<p>So, in short highlights for <em>REST Web Service</em></p>
<ul>
<li><em>REST Web Service</em> is a stateless client-server service model</li>
<li>By passing an <strong>HTTP verb,</strong> you can perform server-side action over the standard HTTP protocol (e.g., GET, POST, LIST, DELETE, HEAD)</li>
<li>You can pass <strong>parameters via URL</strong> query string and via <strong>HTTP Headers</strong></li>
<li>If you are doing HTTP POST, then you can <strong>pass additional data in the Request Body</strong> along with the other two methods described above</li>
<li><i>REST API</i> works by sending an HTTP Request and getting an <strong>HTTP Response</strong></li>
<li>The HTTP Response of a web service can contain Headers and Response Data, which can be in binary, text, JSON, XML, or other formats.</li>
<li>You can secure your data by simply sending it over the <strong>HTTPS (Secure HTTP) protocol</strong> or encrypting values passed along with your request.</li>
</ul>
<h2>Tasks/Components in SSIS for Consuming RESTful API / WebService</h2>
<div class="su-table su-table-alternate">
<table>
<colgroup>
<col style="vertical-align: top" width="100" />
<col style="vertical-align: top" /></colgroup>
<tbody>
<tr>
<td><img decoding="async" style="width: 72px;height: 72px" src="//zappysys.com/images/ssis-powerpack/SSIS-Json-Source-Adapter.png" alt="Custom SSIS Components - Json Source" /></td>
<td style="vertical-align: top"><a target="_blank" rel="noopener">JSON Source</a> (Read from REST API, JSON file or OData Service): Use this dataflow component when you have to <strong>fetch data from a REST API web service like a table</strong>. This component enables you to extract JSON data from web services and de-normalize nested structures, allowing you to save the data to a Relational database, such as SQL Server, or any other target (Oracle, FlatFile, Excel, MySQL). This component also supports reading local JSON files or direct JavaScript strings (Wildcard pattern support, e.g., c:\data\file*.json).</td>
</tr>
<tr>
<td><img decoding="async" style="width: 72px;height: 72px" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination.png" alt="SSIS Custom Target Adapter - Web API Destination" /></td>
<td style="vertical-align: top"><a href="//zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/">Web API Destination</a> (POST data to API URL): Use this data flow component when you need to load data into a target system via API calls (<a href="https://zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/" target="_blank" rel="noopener">POST to URL</a>). E.g., Loading Contacts into a Marketing System like <a href="//zappysys.com/blog/get-data-from-mailchimp-in-ssis-using-rest-api-call/" target="_blank" rel="noopener">MailChimp</a> for email campaigns. Loading documents into CRM or document storage systems, e.g,. Couchbase or <a href="//zappysys.com/blog/call-elasticsearch-api-using-ssis/" target="_blank" rel="noopener">ElasticSearch</a>.</td>
</tr>
<tr>
<td><img decoding="async" style="width: 72px;height: 72px" src="//zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png" alt="Custom SSIS Tasks - SSIS Rest Api Web Service Task" /></td>
<td style="vertical-align: top"><a target="_blank" rel="noopener">REST API Tak</a>: Use this task when you don’t want to pull REST API data in tabular format but want to call the REST API for POST data to the server, DELETE data from the server, or things like download an HTML page, extract Authentication tokens, etc, where you are not necessarily dealing with data in tabular format. This task also allows you many other options, such as saving the RAW response into a variable or a file.</td>
</tr>
<tr>
<td><img decoding="async" style="width: 72px;height: 72px" src="//zappysys.com/images/ssis-powerpack/ssis-xml-source.png" alt="Custom SSIS Components - XML Source (Read File/SOAP/REST Web Service)" /></td>
<td style="vertical-align: top"><a target="_blank" rel="noopener">XML Source</a> (SOAP, File, REST): Use this dataflow component when you have to fetch data from an XML or SOAP web service and consume data like a table. This component allows you to extract data from a web service and save it to SQL Server or any other target (Oracle, FlatFile, Excel, MySQL). This component also supports reading local XML files or a direct XML string.</td>
</tr>
<tr>
<td><img loading="lazy" decoding="async" class="alignnone" style="width: 72px;height: 72px" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/csv-source/ssis-csv-file-source.png" alt="Custom SSIS Components - CSV Source (Read File/REST API)" width="128" height="128" /></td>
<td style="vertical-align: top"><a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-file-source-flat-file-web-api/">CSV Source</a> (File, REST): Use this dataflow component when you have to fetch data from File or REST API which returns data in CSV format . This component allows you to extract data from a web service and save it to SQL Server or any other target (Oracle, FlatFile, Excel, MySQL). This component also supports reading local CSV files or direct CSV string.</td>
</tr>
</tbody>
</table>
</div>
<h2>Using SSIS JSON Source to read from REST API and load into SQL Server</h2>
<div>
<p>If you need to consume a REST API Service and store the result into SQL Server or any other RDBMS/FLAT File, then you can check this <a target="_blank" rel="noopener">SSIS JSON Source</a>. The JSON Source can deserialize your nested JSON (it also supports JSONPath filter expressions).</p>
<table>
<tbody>
<tr>
<td><a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FaO8cVRyCBWw%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></td>
</tr>
</tbody>
</table>
</div>
<h2>REST API Task &#8211; Ad-hoc web requests &#8211; Call REST API (POST, DELETE)</h2>
<table>
<tbody>
<tr>
<td><a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FjPdcQlWOBZA%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></td>
</tr>
</tbody>
</table>
<h2>HTTP GET Request using SSIS Web Service Task or JSON/XML Source</h2>
<div>Calling the REST API from the <strong>SQL Server BI Stack</strong> usually requires programming skills. <span style="box-sizing: border-box; margin: 0px; padding: 0px;">However, in this section, we will learn how easy it is to call <strong>a RESTful Web Service</strong> using the SSIS Web Service Task, JSON Source, or XML Source (all of which are drag-and-drop components</span>).</div>
<p>In this example, we will retrieve JSON data from an OData web service.</p>
<ul>
<li><a title="Download - SSIS REST API Web Service Task" href="//zappysys.com/products/ssis-powerpack/download/">Download and Install SSIS PowerPack</a></li>
<li>Create a new sample SSIS package in BIDS/SSDT</li>
<li>From the SSIS Toolbox, look for items starting with &#8220;ZS&#8221;. Drag and Drop [ZS Rest API Web Service Task] to Designer Surface</li>
<li>Configure HTTP Request properties as below</li>
<li>Configure HTTP Response properties as below</li>
<li>Run SSIS Package</li>
</ul>
<h3>Pass values in HTTP Headers</h3>
<div>
<p>You can pass a value in HTTP Headers using a direct approach or a dynamic approach. If you wish to pass a value from an SSIS variable, then use a variable placeholder, e.g., {{User::varSomeVariable}}. You can also use a variable format specifier, e.g.</p>
<ul>
<li><strong>Format Date:</strong> {{User::varSomeVariable,yyyy-MM-dd}}</li>
<li><strong>Encode into BASE64:</strong> {{User::varSomeVariable,BASE64ENC}}</li>
<li><strong>Decode into plain text from BASE64:</strong> {{User::varSomeVariable,BASE64DEC}}</li>
</ul>
</div>
<div>
<div id="attachment_11523" style="width: 848px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-POST-SSIS-Call-Web-Service.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11523" class="size-full wp-image-11523" src="https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-POST-SSIS-Call-Web-Service.png" alt="" width="838" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-POST-SSIS-Call-Web-Service.png 838w, https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-POST-SSIS-Call-Web-Service-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-POST-SSIS-Call-Web-Service-768x674.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-11523" class="wp-caption-text">Calling REST API in SSIS using REST API Task, Pass headers, Body, Url Parameters</p></div>
<div class="mceTemp"></div>
</div>
<div>
<div id="attachment_11522" style="width: 848px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-GET-Test-SSIS-Web-Service-Call-Pass-Custom-Header.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11522" class="size-full wp-image-11522" src="https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-GET-Test-SSIS-Web-Service-Call-Pass-Custom-Header.png" alt="" width="838" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-GET-Test-SSIS-Web-Service-Call-Pass-Custom-Header.png 838w, https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-GET-Test-SSIS-Web-Service-Call-Pass-Custom-Header-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-HTTP-GET-Test-SSIS-Web-Service-Call-Pass-Custom-Header-768x674.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-11522" class="wp-caption-text">SSIS REST Api Task &#8211; HTTP GET, Test SSIS Web Service Call, Pass Custom Header</p></div>
</div>
<div>
<div class="mceTemp"></div>
<div id="attachment_11524" style="width: 848px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-Validate-Status-Code-Content-and-Header.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11524" class="size-full wp-image-11524" src="https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-Validate-Status-Code-Content-and-Header.png" alt="" width="838" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-Validate-Status-Code-Content-and-Header.png 838w, https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-Validate-Status-Code-Content-and-Header-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/08/SSIS-REST-Api-Task-Validate-Status-Code-Content-and-Header-768x674.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-11524" class="wp-caption-text">REST API response validation ( By status code, content, header)</p></div>
</div>
<div></div>
<h3>Pass values in the Query String dynamically</h3>
<div>Most web services usually accept parameters via the query string. You can also use variable placeholders to make your URL with Querystring dynamic (e.g., https://mysite.com/orderservice/?startrow={{User::varStart}}&amp;endrow={{User::varEnd}}</div>
<h2>HTTP POST Request using SSIS Web Service Task or JSON/XML Source</h2>
<div>
<p>When you select the HTTP POST <span style="box-sizing: border-box; margin: 0px; padding: 0px;">method, the content-type is set to <em>application/x-www-form-urlencoded by default</em></span>. With the POST method, you can send POST data. When the POST method is selected, the data textbox becomes editable. You can also use variable place holders in POST data to make it dynamic.</p>
<p>POST data is usually in key/value format (e.g., user=abcd&amp;pass=mypass123), but sometimes the service requires data in JSON format or XML format. In that case, you can submit that way. Depending on the service requirements, you must set additional headers to indicate the content type (please refer to your service documentation).</p>
<h3>Uploading files using HTTP Multipart/form-data POST Request</h3>
<p>Many API support uploading files along with your POST request. Refer to <a href="//zappysys.com/blog/rest-api-file-upload-using-ssis-multi-part-post/" target="_blank" rel="noopener">this article</a> to learn more about how to upload files using REST API calls.</p>
</div>
<h2>Passing Credentials to your Web Service</h2>
<div>
<p>If your service requires authentication, ensure that you pass the credentials needed in the correct format. Below is a list of some of the most common authentication techniques.</p>
<p>There are mainly three connections:</p>
<ol>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-http-connection-manager.htm" target="_blank" rel="noopener">HTTP Connection Manager</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a></li>
<li>Salesforce Connection</li>
</ol>
<h3><strong>Using HTTP Connection</strong></h3>
<p>HTTP Connection supports multiple methods for authenticating to your API. Here are some popular modes.</p>
<ul>
<li><a href="//zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">Basic Authentication</a> (UserID and Password Approach)</li>
<li><a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic Token approach</a> (Two-step process &#8211; First get Token and then Call API (Pass the token extracted in the first step)</li>
<li>Static Token</li>
<li><a href="https://zappysys.com/blog/using-hmac-authentication-api-ssis-odbc-drivers/" target="_blank" rel="noopener">HMAC / Hash Signature Authentication</a></li>
<li><a href="https://zappysys.com/blog/get-data-from-workday-in-ssis-using-soap-or-rest-api/" target="_blank" rel="noopener">SOAP WSS Security</a></li>
<li>Windows Authentication (NTLM)</li>
<li>Client Certificate</li>
</ul>
<h3>OAuth Connection</h3>
<p>Many modern APIs now support OAuth Standard (i.e. v2.0, v1.0, v1.0a). ZappySys offers out-of-the-box support for this standard using <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a></p>
<ul>
<li><a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">OAuth authorization</a>
<ul>
<li>Authorize Code Grant (3-legged &#8211; using Login Popup)</li>
<li>Client Credentials Grant (Simple key/secret &#8211; No login Popup)</li>
<li>Password Grant (Use of userid /password rather than only key/secret)</li>
</ul>
</li>
</ul>
</div>
<h3>Basic Authentication &#8211; Set Authorization Header (Base64 Encoding)</h3>
<div>The HTTP Standard supports BASIC Authorization mode, in which you can pass the username and password as a base64-encoded string. Check this article for more <span style="box-sizing: border-box; margin: 0px; padding: 0px;">information <a target="_blank" rel="noopener">on how</a></span><a href="//zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/"> to pass a BASE64 Encoded Authorization Header</a></div>
<h3>Token-based approach &#8211; such as OAuth</h3>
<div>This is becoming the most common approach, utilizing protocols such as OAuth, where the user first authenticates to the service using an AccountKey and SecretKey. Once authenticated, you receive a token that can be valid for a certain duration (or an infinite duration). After you receive the token, you can call services (each service call will include this token). Parsing a token from the initial response can be achieved through the REST API Response Filter Expression (e.g., $.token) or using the <a href="//zappysys.com/products/ssis-powerpack/ssis-json-parser-task-free/">JSON Parser Task</a>.</div>
<div>
<h3>OAuth Authorization</h3>
<div>All REST API Tasks/Components in Zappysys SSIS PowerPack support <strong>OAuth</strong> Authorization. OAuth is gaining popularity, and many larger companies have already adopted this standard (e.g., Facebook, Twitter, Google, Salesforce). With this method, you can connect to the REST API Service without storing your User ID/Password. Only the first time, you need to log in using your credentials to obtain an initial Token, and after that, the service will continue to use the Access Token rather than your username and password. Once the Token expires, it can automatically renew.  <a href="//zappysys.com/blog/tag/oauth/">Check this for more information about using OAuth</a>.</div>
</div>
<h3>Windows Authentication (NTLM)</h3>
<p>By default, ZappySys REST API Tasks/Components use your default credentials. You can also use the HTTP Connection Manager with the &#8220;Use Credentials&#8221;&gt; &#8220;Use Windows Authentication&#8221; option. <a href="//zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">See this article</a></p>
<h3>Pass Client Certificate</h3>
<p>Sometimes you may have to pass a client certificate along with your web request. The server checks the certificate passed along with your request and, if it matches, proceeds with your request. Here is the real-world use case <a href="https://azure.microsoft.com/en-us/documentation/articles/cloud-services-certs-create/" target="_blank" rel="noopener">How Azure Management Api uses Client Certificate</a>.</p>
<p><span style="box-sizing: border-box; margin: 0px; padding: 0px;">ZappySys <a target="_blank" rel="noopener">HTTP Connection Manager</a> and <a target="_blank" rel="noopener">OAuth Connection Manager</a> both support passing a Client certificate.</span></p>
<h2>Saving HTTP Web Service Response to a File or Variable</h2>
<div class="d-editor-preview">
<p>Let’s break down how to save the response from a ZappySys REST API Task into either an SSIS variable or a file within your SSIS package.</p>
<p><strong>Scenario:</strong> Imagine you’re using the ZappySys REST API Task to retrieve JSON data from a URL. You want to store this data for further processing within your SSIS package.</p>
<h3>1. Saving the REST API Response to an SSIS Variable</h3>
<p>This is ideal when you need to manipulate the data within your SSIS package.</p>
<ol>
<li><strong>Add a ZappySys REST API Task to your Control Flow:</strong><br />
Drag and drop the task onto your SSIS package’s Control Flow.</li>
<li><strong>Configure the REST API Task:</strong>
<ul>
<li>Set the <code>Connection</code> Property to your REST API Connection Manager. (Optional)</li>
<li>Specify the <code>URL</code> of the API endpoint.</li>
<li>Configure any necessary headers, query parameters, or request body.</li>
<li>Go to the &#8220;Response Settings&#8221; tab.</li>
</ul>
</li>
<li><strong>Configure the Output Variable:</strong>
<ul>
<li>Check-mark Save Response content</li>
<li>Select Save Mode as &#8220;Save to Variable&#8221;</li>
<li>Select or create an SSIS variable of type <code>String</code>. This variable, named <code>User::WeatherResponse</code> will store the REST API response.</li>
</ul>
<div class="mceTemp"></div>
<div id="attachment_11521" style="width: 848px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-an-SSIS-Variable.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11521" class="size-full wp-image-11521" src="https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-an-SSIS-Variable.png" alt="" width="838" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-an-SSIS-Variable.png 838w, https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-an-SSIS-Variable-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-an-SSIS-Variable-768x674.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-11521" class="wp-caption-text">Saving the REST API Response to an SSIS Variable</p></div></li>
</ol>
<h3>2. Saving the REST API Response to a File</h3>
<p>This is useful for archiving the response or when you need to process the data outside of SSIS.</p>
<ol>
<li><strong>Add a ZappySys REST API Task to your Control Flow:</strong><br />
Drag and drop the task onto your SSIS package’s Control Flow.</li>
<li><strong>Configure the REST API Task:</strong>
<ul>
<li>Set the <code>Connection</code> Property to your REST API Connection Manager. (Optional)</li>
<li>Specify the <code>URL</code> of the API endpoint.</li>
<li>Configure any necessary headers, query parameters, or request body.</li>
<li>Go to the &#8220;Response Settings&#8221; tab.</li>
</ul>
</li>
<li><strong>Configure the Output File:</strong>
<ul>
<li>Check-mark Save Response content</li>
<li>Select Save Mode as &#8220;Save to File&#8221;</li>
<li>In the “Enter File Path” property, specify the path and filename where you want to save the REST API response. For example, if you are fetching JSON data from a product API, you can save it to the following file: <code>C:\Data\Products.json</code>.
<div class="mceTemp"></div>
</li>
</ul>
</li>
</ol>
<div id="attachment_11520" style="width: 848px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-a-File.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11520" class="size-full wp-image-11520" src="https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-a-File.png" alt="" width="838" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-a-File.png 838w, https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-a-File-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/08/Saving-the-REST-API-Response-to-a-File-768x674.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-11520" class="wp-caption-text">Saving the REST API Response to a File</p></div>
<p>REST APIs enable array filtering to extract specific data from JSON or XML responses. This is achieved through techniques such as query parameters, JSONPath (for JSON), and XPath (for XML), allowing for the precise selection of elements. Additionally, regular expressions can be employed for string-based filtering and data validation.</p>
<div id="attachment_11519" style="width: 848px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/08/REST-APIs-enable-array-filtering-to-extract-specific-data-from-JSON-or-XML-responses.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11519" class="size-full wp-image-11519" src="https://zappysys.com/blog/wp-content/uploads/2015/08/REST-APIs-enable-array-filtering-to-extract-specific-data-from-JSON-or-XML-responses.png" alt="" width="838" height="275" srcset="https://zappysys.com/blog/wp-content/uploads/2015/08/REST-APIs-enable-array-filtering-to-extract-specific-data-from-JSON-or-XML-responses.png 838w, https://zappysys.com/blog/wp-content/uploads/2015/08/REST-APIs-enable-array-filtering-to-extract-specific-data-from-JSON-or-XML-responses-300x98.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/08/REST-APIs-enable-array-filtering-to-extract-specific-data-from-JSON-or-XML-responses-768x252.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-11519" class="wp-caption-text">REST APIs enable array filtering to extract specific data from JSON or XML responses.</p></div>
<h4>Key Setting: “Treat response as binary”</h4>
<p>As highlighted in the steps, the <strong>“Treat response as binary”</strong> option in the “Response” tab is the most important setting for correctly saving binary files. If you don’t check this, the task might try to interpret the binary data as text.</p>
<p><strong>Example Scenario:</strong></p>
<p>Let’s say you want to download a ZIP file from a REST API or a Public URL:</p>
<ul>
<li><strong>API URL:</strong> <code>https://example.com/api/download/archive.zip</code></li>
<li><strong>File Path:</strong> <code>C:\Downloads\archive.zip</code></li>
<li>In the ZS Rest API Task’s “Response” tab, you would:
<ul>
<li>Check-mark Save Response content</li>
<li>Select Save Mode as &#8220;Save to File&#8221;</li>
<li><strong>Check “Treat response as binary”.</strong></li>
<li>In the “Enter File Path” property, specify the path and filename where you want to save the REST API response. <code>C:\Downloads\archive.zip</code>.</li>
</ul>
<div class="mceTemp"></div>
<div id="attachment_11518" style="width: 848px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/08/REST-API-Task-Download-File.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11518" class="size-full wp-image-11518" src="https://zappysys.com/blog/wp-content/uploads/2015/08/REST-API-Task-Download-File.png" alt="" width="838" height="280" srcset="https://zappysys.com/blog/wp-content/uploads/2015/08/REST-API-Task-Download-File.png 838w, https://zappysys.com/blog/wp-content/uploads/2015/08/REST-API-Task-Download-File-300x100.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/08/REST-API-Task-Download-File-768x257.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-11518" class="wp-caption-text">REST API Task &#8211; Download File</p></div></li>
</ul>
<p>By following these steps, you can effectively use the ZappySys Rest API Task to download and save binary content from REST APIs to files within your SSIS workflows.</p>
</div>
<h2>Save HTTP Web Response Headers / StatusCode</h2>
<div>If you wish to save the response to a file, then go to the response tab of the REST API Task and check the &#8220;Save Response&#8221; option, and you can select Save to File option from the dropdown</div>
<h2>HTTP Web Response Validation</h2>
<p><a target="_blank" rel="noopener">REST API Task</a> supports validating your response for a specific header, status code, or content value. See the Validation tab for more information. Using this feature, you can throw an error if a certain header is missing from the response or reject the response if the StatusCode is other than 200.</p>
<div>
<h2>REST API Pagination (Loop through multiple requests)</h2>
<p>Another popular concept in REST API is paging. If your response is significant, the server often returns a partial response. You must then ensure that you consume the remaining data by requesting all subsequent URLs until the last page is returned.</p>
<p><a href="//zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">Read this article to learn more about rest api paging</a></p>
<h2>HTTP Web Response Error Handling</h2>
<p><a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">REST API Task</a> supports rich error handling. You can ignore specific errors and save the error flag into a variable based on any of the following criteria.</p>
<ul>
<li>Continue on any error</li>
<li>Continue on error with specific Response Code (e.g. 404)</li>
<li>Continue on error with a specific string in the message</li>
</ul>
<h2>Read/Write and Parse Cookies for HTTP Web Request/Response</h2>
<p>Many times, you need to supply an authentication token via cookies, or any other information must be passed via cookies. In such cases, the REST API Task provides complete support for reading, writing, or parsing individual values from a cookie string. Look at the Cookies tab for more information. The Cookie Mapping grid can help you to map a cookie value to an SSIS variable (Write Cookie value to a variable).</p>
<p><a href="//zappysys.com/blog/ssis-rest-api-task-pass-cookies-to-web-request/" target="_blank" rel="noopener">Read this article to learn more about passing cookies with your web request</a></p>
<h2>Changing Headers/URL or POST data Dynamically</h2>
<p>Most of the fields on the REST API Task, JSON Source, and XML Source support placeholders.</p>
<p>Use a placeholder anywhere in the following fields using {{User::yourVariable}} format. If you edit the value, you may see the Insert PlaceHolder option.</p>
<ul>
<li>Url</li>
<li>Body</li>
<li>Headers</li>
</ul>
<p>You may format datetime using special syntax like this {{User::myDate,yyyy-MM-dd HHmmss.fff}}</p>
</div>
<h2>Extract a single value from JSON/XML Web Response (e.g., Token)</h2>
<div>If your web response is in JSON or XML format, then you can filter it using Expression (e.g., <a target="_blank" rel="noopener">JSONPath </a>or <a href="https://en.wikipedia.org/wiki/XPath" target="_blank" rel="noopener">XPath</a>). Go to the Response Tab and select Content Type Format from the dropdown. Enter an expression to select a nested sub-document or a value from your response. If you want to save individual properties from the response into multiple variables, then use <a href="//zappysys.com/products/ssis-powerpack/ssis-json-parser-task-free/">JSON Parser Task</a></div>
<p>The most common use case is if you are getting a token from your JSON REST API service. Assume that Service sends you a response in the following format, but you only care about the access_token property from the response below. In that case you can use JSON Path expression like this <strong>$.data.access_token</strong></p><pre class="crayon-plain-tag">{
&nbsp;&nbsp;&nbsp; data: {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; access_token: 111223344444,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expires_in: 3600
&nbsp;&nbsp;&nbsp; }
}</pre><p>
<h2>REST API Testing / Debugging Tools (3rd party)</h2>
<p>Now, let&#8217;s look at a few popular tools that you will need to test/debug REST API calls during your development cycle.</p>
<h3>Testing Rest API</h3>
<p>There are a  few ways to test REST APIs, and each tool has its pros and cons, but the most popular tool to test REST API is Postman, so we will start from there</p>
<ol>
<li><a href="https://www.postman.com/downloads/" target="_blank" rel="noopener">Postman</a> &#8211; GUI<br />
Postman offers an excellent User interface to test the API. You can edit URLs, methods, and parameters, and add authentication with ease. See our article on how to <a href="https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/" target="_blank" rel="noopener">migrate Postman settings to zappysys UI</a>. Many API Providers offer easy-to-use Postman settings files for Testing API in Postman. If your API offers such a file, simply import it into Postman and start testing before using the ZappySys UI.</li>
<li><a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a> &#8211; GUI<br />
SoapUI is another tool to test SOAP or REST APIs. They are primarily known for SOAP API Testing, but in recent versions, they have enhanced REST API Testing capability.</li>
<li><a href="https://curl.haxx.se/" target="_blank" rel="noopener">cURL</a> &#8211; Command line<br />
If you want to call/test the API via the command line, then this is the most popular tool. Many API vendors use cURL syntax in their API documentation. Here is how to <a href="https://zappysys.com/blog/using-ssis-curl-syntax-to-ssis-api-task/">migrate cURL syntax to ZappySys UI</a>.</li>
<li>Fiddler- GUI<br />
Fiddler has limited capability to test API call &#8211; <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/#How_to_Test_API_using_Fiddler_Call_REST_API_for_without_Postman" target="_blank" rel="noopener">See Replay in Composer option</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZappySys REST API Task</a><br />
You can use the ZappySys REST API Task to <a href="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2019/04/ssis-call-freshdesk-rest-api.png?ssl=1" target="_blank" rel="noopener">test the API inside Visual Studio</a>. Edit URL / Headers / Body, etc, and click the <strong>Test Request Response</strong> option</li>
</ol>
<h3>Debugging REST API &#8211; Proxy</h3>
<p>So far, we have seen client tools to test Request/Response for the URL you entered in the UI, but what if you want to Sniff Requests sent by some applications for which you have no way to know what Request Data / URL, or Body is sent behind the scenes? What response is it getting back and so on? Well, not to worry&#8230; Telerik Fiddler is the most popular tool at your fingertips and it&#8217;s FREE.</p>
<ol>
<li><a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> &#8211; HTTP /  HTTPS Proxy / Debugger</li>
<li><a href="https://www.wireshark.org/">Wireshark</a> &#8211; Low-level Network Packet Sniffer</li>
</ol>
<h2>Conclusion</h2>
<p>The REST API is becoming increasingly popular every day. With that, Data integration from RESTful services is going to be a challenge. <span style="box-sizing: border-box; margin: 0px; padding: 0px;"><a target="_blank" rel="noopener">The SSIS REST API Task </a>and <a target="_blank" rel="noopener">SSIS JSON Source</a> can help resolve some of the issues you may encounter</span> with SSIS. Use JSON Source if you need to store data into a SQL Table. Use REST API Task if you need to make an ad-hoc HTTP/REST request (such as get token, Delete Record, etc). ZappySys REST API Components gives you total control over your REST API Integration challenges without learning a programming language (e.g., Python, Ruby, C#, Java).</p>
<p>The post <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/">How to Call REST API in SSIS &#8211; Read JSON / XML / CSV</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
