Connecting to REST APIs using the Composer user interface
- Last Updated: July 11, 2024
- 7 minute read
- DataDirect Connectors
- ODBC
- Autonomous Rest Connector 8.0
- Documentation
The Autonomous REST Connector uses sampling to normalize the JSON responses from REST APIs and make them available as relational tables. It empowers you to use the full capabilities of SQL, including joining data from different endpoints.
To get you started with the Autonomous REST Connector, in this tutorial, we will walk you through the process of connecting to a REST service from Tableau. This tutorial will give you an overview of how flexible Autonomous REST Connector is and how it works.
We will also use the Composer interface for the Autonomous REST Connector—which allows us to easily expose response data from multiple REST endpoints as tables that can be queried via standard SQL. The Composer interface is available as part of the Autonomous REST Connector for Windows platforms.
For the purposes of demonstration, we will use the REST API for SpaceX project as our data source for this tutorial. The SpaceX project is an open-source service that is free to use and does not require authentication credentials—which allows us to begin accessing data immediately.
This tutorial covers the following:
- Download and install the Autonomous REST Connector for Windows
- Create an ODBC Data Source
- Connect from Tableau
- Connect to multiple endpoints
Download and install the Autonomous REST Connector for Windows
- Navigate to the Autonomous REST Connector for ODBC page and select a Windows 32-bit or 64-bit connector to download. We recommend using the 64-bit driver if supported in your environment; however, Tableau supports either bitness.
- When prompted, provide your details, such as name and email address; then, click DOWNLOAD.
- Download the connector zip file and extract its contents into a temporary directory;
then, double-click the installer program:
- For 32-bit connectors:
PROGRESS_DATADIRECT_ODBC_8.0_WIN_32_INSTALL.exe - For 64-bit connectors:
PROGRESS_DATADIRECT_ODBC_8.0_WIN_64_INSTALL.exe
- For 32-bit connectors:
- Follow the prompts to complete the installation.
Create an ODBC Data Source
- Start the ODBC Administrator by selecting its icon from the Progress DataDirect for ODBC program group.
- On the ODBC Administrator, select the User DSN tab, and then click Add to display a list of installed drivers. Select DataDirect 8.0 Autonomous REST Connector and click Finish.
- The Configuration Manager appears in your default browser. On the
Connection tab, specify values for the following fields:
- Data Source Name: Specify a name for the data source you are creating. For
example,
SpaceX. - REST Sample Path: Specify the endpoint you want to connect to. For example,
if you want to connect to the
launchesendpoint, specify:https://api.spacexdata.com/v5/launches - Table: Launches

- Data Source Name: Specify a name for the data source you are creating. For
example,
- Click Test Connect to connect to the SpaceX API. The Test
Connect window opens. Optionally, execute queries in the Test Query
field. For example:
SELECT * FROM LAUNCHES - Click Save.
Connect from Tableau
- Navigate to the \tools\Tableau subdirectory of the Progress
DataDirect installation directory; then, locate the following Tableau data source
file:
DataDirect Autonomous REST Connector.tdc - Copy the Tableau data source file into the following
directory:
C:\Users\user_name\Documents\My Tableau Repository\Datasources - Open Tableau. If the Connect menu does not open by default, select Data > New Data Source or the Add New Data Source button to open the menu.
- From the Connect menu, select Other Databases (ODBC).
- In the DSN field, select the data source you created in the Configuration Manager. Click Connect; then, Sign In. Your Tableau Book window opens.
- In the Schema field, select AUTOREST. The tables stored in this schema are now available for selection in the Table field. For example, from the Table field, try dragging the LAUNCHES table into the canvas to view data restored in the JSON response from the REST API as relational data.
Result: You have successfully accessed your data and are now ready to create reports with Tableau. For more information, refer to the Tableau product documentation at: http://www.tableau.com/support/help.
Connect to multiple endpoints
To connect to multiple endpoints using Autonomous REST Connector:
- Open the Autonomous REST Composer by using one of the following methods:
- Select the Autonomous REST Composer (ODBC) icon from your desktop or the Windows Start menu.
- From a command line, navigate to the directory containing the
autorest.jar file and execute the following command:
java -jar autorest.jar --odbcdesignBy default, the autorest.jar file is stored in the following directory: install_dir\Progress\DataDirect\ODBC\java\lib\.

- Select Create Model. The Create a Model
window appears.
Figure 1. The Create Model Window 
Complete the following fields to create a new project; then, click OK:- Model Name: The name of your Model file to be created. For example:
Space X. - Model Description: An optional description of your Model. Note that this description will be stored in clear text in the Model file.
- Base URL: The host name portion of your REST endpoints. For example:
https://api.spacexdata.comNote: The Base URL field is optional. You can also specify the base URL in the Host Name field on the Connection tab. Specifying a value in either location pre-populates the base URL in the Endpoints field(s) of the Configure Endpoints tab. Alternatively, you can also enter the entire URL for your endpoint into the Endpoints field.
The Composer opens to the Connection tab.
Figure 2. The Connection tab 
Note: Typically, the Connection tab is used to configure your authentication settings; however, for the data source used in this tutorial, no authentication settings are required. - Model Name: The name of your Model file to be created. For example:
- Select the Configure Endpoints tab on the side
menu.
Figure 3. The Configure Endpoints tab 
Provide the minimum required information for an endpoint to which you want to issue requests:
- From the Endpoint drop-down menu, select the type of request to issue against your endpoint. For example: GET.
- In the Endpoint field, type your endpoint. Note that the
value must be URL-encoded using valid syntax. For example, spaces in an endpoint
are replaced with
%20.Note: If you provided a base URL using the Base URL field or Host Name option, specify only the path portion of your endpoint. - In the Table Name field, type the name of the relational
table to which you want the endpoint to map. For example:
LAUNCHES. - Optionally, in the JSON Root fields, type or edit the path to an embedded object
that contains the results you want mapped to a dedicated relational table. You can
use this option to expose only data starting at a nested field within a JSON
response.Note: During sampling, the driver specifies a default value for this field when it detects an embedded object that meets the criteria for a JSON root. Depending on the structure of your data model, you might want to add, edit, or remove values for this field.
For example, for the following JSON response, if you want to expose only the
resultsArraydata in a table namedRESULTS, specify a JSON Root value of/resultsArrayand a Table Name ofRESULTS.
Results: The data is displayed in a tabular format in the SQL View. The Raw View tab displays the JSON response body that was received from making the REST API call to the endpoint.{ "rootLevelField1": "exampleValue1", "rootLevelField2": "exampleValue2", "rootLevelField3": "exampleValue3", "resultsArray": [ { "id": 1, "data": "exampleResults1" }, { "id": 2, "data": "exampleResults2" } ] }Note: Multiple tables might be mapped from a single endpoint. As a result of normalizing JSON data into a relational view, the driver exposes embedded array data as child tables. Conversely, parent tables are comprised of fields defined at the root level of the JSON response. A foreign key relationship to the parent table is provided by exposing the primary key of the parent in the child. You can useSQL JOINsyntax to rejoin the data of the parent and child tables into a single result set.
- Click Send. The driver sends the REST request and generates a
relational view of the data based on the response. To add additional endpoints, click in
the + button the request list on the left.For testing purposes, add the following endpoints:
Table 1. SpaceX Endpoints Table Name Endpoint CAPSULEShttps://api.spacexdata.com/v4/capsules COMPANYhttps://api.spacexdata.com/v4/company COREShttps://api.spacexdata.com/v4/cores CREWhttps://api.spacexdata.com/v4/crew DRAGONShttps://api.spacexdata.com/v4/dragons HISTORYhttps://api.spacexdata.com/v4/history LANDPADShttps://api.spacexdata.com/v4/landpads LAUNCHEShttps://api.spacexdata.com/v5/launches LAUNCHPADShttps://api.spacexdata.com/v4/launchpads PAYLOADShttps://api.spacexdata.com/v4/payloads ROADSTERhttps://api.spacexdata.com/v4/roadster ROCKETShttps://api.spacexdata.com/v4/rockets SHIPShttps://api.spacexdata.com/v4/ships STARLINKhttps://api.spacexdata.com/v4/starlink - Click Download to generate and download your Model file. After downloading, move your Model file from the downloads folder to a directory that you have access to on your machine.
- Open the ODBC Administrator and then double-click the data source you have created. The Configuration Manager appears.
- On the Connection tab of the Configuration Manager:
- Clear the REST Sample Path field’s value.
- In the REST Config File field, specify the fully qualified path and file name for the Model file you downloaded.
- Click Update.
- Open Tableau and reconnect to the data source.
Result: An updated list of tables is available based on the JSON responses from the endpoints defined in the Model file.