Introduction
In our previous article we see How to call REST API in SSIS . Now in this article, we will see example of how to Make Twilio API Call in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call Twilio API Call can be useful for any developer regardless of which programming language or tool set you use. we will also see how to configure HTTP basic connection.
We will go through the steps to make Accounts REST API call which Returns a list of all Accounts resources and we load it into MS SQL Server.
In nutshell, this post will focus on how to Make Twilio REST API Call in SSIS.
Prerequisites
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
- SSIS designer installed. Sometimes it is referred to as BIDS or SSDT (download it from Microsoft site).
- Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.
- Make sure ZappySys SSIS PowerPack is installed (download it).
- Credentials of Twilio API.
What is Twilio?
Twilio is a cloud communications platform as a service company based in San Francisco, California. It’s allows software developers programmatically to make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs.
- Twilio API Documentation : Click here to read Twilio Rest API Documentation.
Make Call of Twilio REST API using SSIS
Let’s start with an example. We use SSIS JSON Source component to make the call to Twilio API, we will read list of all available temporary lists and load into SQL Server. First of All, Open Visual Studio and Create New SSIS Package Project.
- First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
- From the SSIS toolbox drag and drop JSON Source on the data flow designer surface.
- Double click JSON Source and enter the following URL as below to get multiple Account resources and create the HTTP Connection use the same url in the http connection also.
1https://api.twilio.com/2010-04-01/Accounts.json - Now click on Select Filter button and select the desire filter from the window.
- Go to Pagination Tab and select mode as Response attribute Mode – Read next page information from response and set up the next page filter.
- You can refer to this article for more details on pagination here Understanding REST API Pagination in SSIS / ODBC Drivers
- Now select the desire options to get the data and click on preview, as here i want parent and missing child also i checked both options and clicked on Preview. if you don’t want to get parent details you can uncheck it.
- That’s it we are ready to load all Twilio accounts resources in SQL Server.
Load Twilio REST API data into SQL Server
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 Upsert Destination component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.
Step 1: Add Upsert Destination to Data Flow
- Drag and drop the Upsert Destination component from the SSIS Toolbox.
- Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.
Step 2: Configure Target Connection
- Double-click the Upsert Destination component to open the configuration window.
- Under Connection, select an existing target connection or click NEW to create a new connection.
- Example: SQL Server, or PostgreSQL, or Amazon Redshift.
Step 3: Select or Create Target Table
- In the Target Table dropdown, select the table where you want to load data.
- Optionally, click NEW to create a new table based on the source columns.
Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS
Step 4: Map Columns
- Go to the Mappings tab.
- Click Auto Map to map source columns to target columns by name.
- Ensure you check the Primary key column(s) that will determine whether a record is inserted or updated.
- You can manually adjust the mappings if necessary.
Step 5: Save Settings
- Click OK to save the Upsert Destination configuration.
Step 6: Optional: Add Logging or Analysis
- You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.
Step 7: Execute the Package
- Run your SSIS package and verify that the data is correctly inserted and updated in the target table.
Conclusion
After all, we saw you how to extract information from REST API such as Twilio using HTTP Connection and load into SQL Server. We also learned techniques like How to create HTTP Connection and configure the pagination. To explore many other scenarios not discussed in this article download SSIS PowerPack from here (includes 70+ Components).
References
Finally, you can use the following links for more information:
-
- Help File: JSON Source(REST API or File)
- Twilio Rest API












