<?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>opanapi Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/opanapi/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/opanapi/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Fri, 19 Apr 2024 17:33:56 +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>opanapi Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/opanapi/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Call ChatGPT REST API in SSIS</title>
		<link>https://zappysys.com/blog/accessing-chatgpt-via-rest-api/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 20 Oct 2023 12:07:27 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chatgpt]]></category>
		<category><![CDATA[opanapi]]></category>
		<category><![CDATA[restpai]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10234</guid>

					<description><![CDATA[<p>Introduction OpenAI, the creators of ChatGPT, provide both a web interface and an API for seamless integration of their tools into applications. This article provides a comprehensive guide on how to establish a connection with the OpenAI API in SSIS using ZappySys JSON Source, enabling seamless data integration and retrieval. Prerequisites Before we perform steps [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/accessing-chatgpt-via-rest-api/">Call ChatGPT REST API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><strong>Introduction</strong></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo.png"><img decoding="async" class="wp-image-11035 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo.png" alt="" width="137" height="137" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo.png 384w, https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo-150x150.png 150w" sizes="(max-width: 137px) 100vw, 137px" /></a>OpenAI, the creators of <a href="https://chat.openai.com/">ChatGPT</a>, provide both a web interface and an API for seamless integration of their tools into applications. This article provides a comprehensive guide on how to establish a connection with the OpenAI API in SSIS using ZappySys <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a>, enabling seamless data integration and retrieval.</p>
<h2><strong>Prerequisites</strong></h2>
<p>Before we perform steps listed in this article, you will need to make sure following prerequisites are met:</p>
<ol>
<li>SSIS designer installed. Sometimes it is referred as BIDS or SSDT (<a href="https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver16" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
<li>Optional (If you want to Deploy and Schedule ) &#8211; <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Deploy and Schedule SSIS Packages</a></li>
</ol>
<h2>Step-by-step guide to making a ChatGPT Rest API call</h2>
<h3>How to get an OpenAI API Key for ChatGPT</h3>
<p>First, obtain your API key from OpenAI. This key is required for authenticating your requests.</p>
<p>To access the services, you will be required to set up an account with OpenAI. <a href="https://platform.openai.com/signup" target="_blank" rel="noopener">Click here to create your account</a>. Once your account has been successfully created, proceed to log in to your OpenAI account.</p>
<p>You can find the API key by following these steps:</p>
<ol>
<li>Navigate to the top right corner of the screen.</li>
<li>Click on your account name.</li>
<li>From the drop-down menu, select &#8220;API Keys.&#8221;</li>
<li>Alternatively, you can directly access the API Keys section by <a href="https://platform.openai.com/account/api-keys" target="_blank" rel="noopener">clicking here</a>.</li>
</ol>
<p>To generate a new secret key, please follow these steps:</p>
<ol>
<li>Go to the API Keys page.</li>
<li>Look for the &#8220;Create new secret key&#8221; button.</li>
<li>Click the button to generate a new secret key.</li>
</ol>
<div id="attachment_10236" style="width: 998px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-10236" class=" wp-image-10236" src="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2.png" alt="" width="988" height="505" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2.png 1429w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2-300x153.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2-768x392.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2-1024x523.png 1024w" sizes="(max-width: 988px) 100vw, 988px" /></a><p id="caption-attachment-10236" class="wp-caption-text">Generate a new key</p></div>
<p>Upon generation, your API key will be visible on the screen. It&#8217;s crucial to copy the key and store it in a secure location immediately, <strong>as it will not be displayed again for security purposes.</strong></p>
<div id="attachment_10237" style="width: 1000px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10237" class=" wp-image-10237" src="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1.png" alt="" width="990" height="486" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1.png 1413w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1-300x147.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1-768x377.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1-1024x503.png 1024w" sizes="(max-width: 990px) 100vw, 990px" /></a><p id="caption-attachment-10237" class="wp-caption-text">The new key</p></div>
<p>Now that you have your API key, you can begin utilizing it to make calls with your components. A preliminary example involves retrieving a list of all available models in OpenAI. For detailed instructions, please refer to the <a href="https://platform.openai.com/docs/api-reference/introduction" target="_blank" rel="noopener">API documentation available here</a>.</p>
<h3>ChatGPT Rest API call using JSON Source</h3>
<p>1. Drag and Drop the SSIS <b>Data Flow Task</b> from the SSIS Toolbox.</p>
<div style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" width="460" height="155" /><p class="wp-caption-text">Drag and drop Data flow task</p></div>
<p>2. Double-click on the DataFlow task to see the DataFlow designer surface.</p>
<p>3. From the SSIS toolbox drag and drop ZS JSON Source on the dataflow designer surface.</p>
<div style="width: 551px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" width="541" height="144" /><p class="wp-caption-text">Drag and drop a JSON source</p></div>
<p>4. We will use this on the URL path:</p><pre class="crayon-plain-tag">https://api.openai.com/v1/models</pre><p>
5. In the HTTP headers grid add the following values by clicking Raw Edit button :</p>
<p><code class="language-bash"><span class=""><span class="hljs-string">Authorization: Bearer </span><span class="hljs-string hljs-variable">YOUR_OPENAI_API_KEY<br />
</span></span></code><span style="background-color: #f0f0f0; color: #1e1e1e; font-family: Menlo, Consolas, monaco, monospace; font-size: 14px;">OpenAI-Organization: org-YQ9qpxxxxxxxxxxxxgoPi</span></p>
<p>6. Select your preferred Array Filter, simply click the &#8220;Select Filter&#8221; button. for this API call we need to select the <pre class="crayon-plain-tag">$.data[*]</pre>  array filter</p>
<p>7. Final step: Click &#8216;Preview&#8217; to initiate the ChatGTP Rest API call. You will also find a demonstration within our component, along with the resulting output from the call, below.</p>
<div id="attachment_10238" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10238" class="size-full wp-image-10238" src="https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1.png" alt="" width="828" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1.png 828w, https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1-768x682.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-10238" class="wp-caption-text">ChatGPT call</p></div>
<p>That&#8217;s it the configuration for the ChatGPT Rest API call has been completed successfully.</p>
<h2>Load ChatGPT data in SQL Server using Upsert Destination (Insert or Update)</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>Conclusion</h2>
<p>In this article, we explored the seamless process of establishing a connection with <strong>ChatGPT</strong> <strong>in SSIS</strong> and integrating data effortlessly, all without the need for coding. Interested in trying it out yourself? Feel free to <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">Download ZappySys SSIS PowerPack</a> by clicking here and experience the simplicity firsthand. Should you have any lingering queries, please don&#8217;t hesitate to ask by <a href="https://zappysys.com/support/" target="_blank" rel="noopener">clicking here</a> or initiating a conversation with our experts via the live chat icon at the bottom-right corner of this page.</p>
<p>The post <a href="https://zappysys.com/blog/accessing-chatgpt-via-rest-api/">Call ChatGPT REST API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
