Getting Started with Autonomous REST Connector UI

Introduction

Progress DataDirect Autonomous REST Connector delivers seamless, real-time connectivity between REST data and your ODBC/JDBC tools and applications. Autonomous REST Connector rapidly decreases the amount of time required for applications to understand and consume APIs through its codeless configuration and intelligent sampling.

With intelligent sampling, Autonomous REST Connector can point to an API and automatically create a configuration file that allows you to start working with the data immediately — no code, no hassle. The configuration file can also be customized to determine how to navigate the various APIs you need to leverage.

In addition, Autonomous REST Connector supports a wide variety of authentication methods and normalizes the API’s response schema to a SQL-friendly format.  It’s always been easy to create a connector using Autonomous REST Connector, but we have simplified this even further with the Autonomous REST Connector UI.  The new UI helps you create connectors faster. You don’t need to manually create or edit configurations or worry about the correctness of syntax to configure your API. Just add your configurations in the UI and the UI will take care of the rest. Simply download the configuration file.

Launch Autonomous REST Connector UI

ARC1

In this article, we will walk you through a basic example of how you can use Autonomous REST Connector UI by creating a new connector for SpaceX API.

  1. Go to the install location of the Autonomous REST Connector driver and locate autorest.jar. On Windows, it usually is C:\Program Files\Progress\DataDirect\JDBC_60\lib
  2. Launch the UI by double clicking the jar file or use terminal and run

    java -jar autorest.jar

  3. You will now see the UI launching in your default browser as shown below.

ARC2

Create Connector Project

  1. When you launch the UI, you will see a popup asking you to create new project. On the popup,
    1. Fill in your connector name as Project name. For this tutorial we are going to name it as SpaceX
    2. Provide a description (optional)
    3. Provide the base URL for the API you want to build the connector. In this case as we are building a connector for SpaceX, the SpaceX API has a base URL https://api.spacexdata.comFill the URL in the field
  2. Click on Save. Now we are ready to sample the resources in the SpaceX API.

ARC3

Sample REST APIs

  1. To get started let’s sample the Capsules resource which is accessible at /v3/capsules
  2. Copy the resource path and append to the base URL in the endpoint section. Provide a table name for accessing this resource. We provided a name Capsules as shown belowARC4
  3. Click on Send to sample the endpoint and normalize the response to table.

    Note: As SpaceX doesn’t use any authentication to access the resources, we are using Authentication Method as None. But if your API needs authentication, please configure it before you click on Send.

  4. You will now see the response from the resource /v3/capsules is normalized to rectangular format and you can see the data. On the left side, you will now see the resource you just sampled, and you will see two tables that got generated after sampling the resource as shown below.ARC5
  5. It’s as simple as that to sample resources in an API. If you want to sample a new resource click on the + button on the left side. Sample the resource /v3/cores and name the table as Cores. Click on Send to Sample.ARC6
  6. If you want to compare how the JSON response from the REST API got normalized to tables, toggle the view to JSON View and see for yourself.ARC7

Editing Metadata

  1. You may want to customize metadata like table name or column names if you think they are not easily identifiable with autogenerated names. Or you might want to edit the metadata like Datatypes, Size, or Scale if you think Autonomous REST Connector has incorrectly assigned it. The UI will let you change the metadata based on your requirements.
  2. For example, to change table name you can find the table on the left side and click on the menu icon next to table. Let’s change the name for MISSIONS_1 to COREMISSIONS that was normalized after sampling /v3/cores as it is hard to identify since /v3/capsules has another Missions table.ARC8
    ARC9
  3. Similarly, for columns in a table, you can change the metadata like column name, data type, size, scale etc., For example, we want to change the column name for the column Name to MISSIONNAME in the COREMISSIONS table, you can click the menu next to the columnand choose Modify Column Attributes as shown below.ARC10ARC11

Configure Parameterized Paths

  1. Some REST endpoints use Path Parameters to push down values to retrieve a certain value instead of getting all the data. You can configure these to improve performance when you want to query certain value. Once you configure Path Parameter, Autonomous REST Connector will use the parameterized path wherever applicable instead of fetching all the data from the REST API and then filtering the data in the embedded SQL Engine.
  2. For SpaceX resource /v3/capsules, it supports a path parameter /v3/capsules/{capsule_serial}. To configure this, click on the /v3/capsules on the left side and go to Parameterized path on the right side to add this entry.
  3. Under Parameterized Paths, click on + and add /v3/capsules/{capsule_serial} as shown below. Click on Refresh once you have added it.
  4. ARC12
  5. Repeat this for all the path parameters that a particular resource supports.

Configure Pagination

  1. Most of the REST API’s support pagination to access the data from the resources that are exposed. In Autonomous REST Connector UI, you can configure them easily using the Pagination section.
  2. For example, if we want to configure pagination for the resource /v3/capsules, click on the resource on the left side and go to pagination section on the right.
  3. SpaceX uses Row Offset Pagination, choose the template, and set the below values as shown below and, once you have entered all the values, click on Refresh.
    1. MaximumPageSize – 3
    2. PageSizeParameter – Limit
    3. FirstRowNumber – 0
    4. RowOffsetParameter – offsetARC13
  4. Repeat this for all the resources you have sampled.

View ER Diagram

  1. If you want to understand the relationships between different tables, you can switch to ER Diagram as shown below.
ARC14

Download the REST Configuration and Get the Connection String

  1. Once you are done with all the configurations, you can download the REST Configuration using the download button.
  2. Now that you have the REST Configuration file, it is time to get the connection string you want to use in your application to connect.
  3. Go to Second tab and fill in the REST Config File path to the downloaded file you just generated as shown belowARC15
  4. Copy the connection string and start using the connector you created with your application.

We hope this article helped you to get started with Autonomous REST Connector UI to quicky create connectors, generate a connection string, and start using the connector with your application. If you have any questions, please feel free to contact us.

 

JDBC, ODBC TUTORIAL
Getting Started with Autonomous REST Connector UI

View all Tutorials for:

Connect any application to any data source anywhere

Explore all DataDirect Connectors

Need additional help with your product?

Get Customer Support