Categories
Oracle Analytics

Oracle Analytics REST API Connection

There is a new REST API connection available with the September 2022 release of Oracle Analytics.

This is currently in preview so does need to be enabled in system settings.

Enable the REST API Preview

Once we’ve enabled this preview feature, the REST API connector is then made available in the list of connections.

Selecting it brings up the following dialog

The preview documentation is available here which guides us with some examples of formats of what to do. Essentially we need to create a .JSON file defining the connection details, which we then import using this dialog.

Let’s find an example API to use. Let’s use this from New York State which is “This data file provides a variety of information on subway station entrances and exits which includes but is not limited to: Division, Line, Station Name, Longitude and Latitude coordinates of entrances/exits.” So let’s look at the format we need from the OAC docs.

Using that template as a guide we can create a .JSON file that matches the required structure for the API that we wish to use. I have allocated a name and description, which when we import the file will be put into the Connection Name and Description. We then have the “BaseURL” and the “endpoints” (in our example here we have endpoint singular) which we got from the API defintion.

Note that as this dataset does not need an API key, we specify the authentication as ‘noauth’ to indicate that there is no authorization required. We then just need to zip the file and we’re ready to import it.

From the image above, we can see that importing the file completes all the required information. If we wanted, we could change the name from ‘Subways’ to a different name.

We can now use that connection to create a dataset which will pull the data from the API.

We just have one endpoint in our JSON file which we called ‘Subways’ so we will use that. We immediately see the data which is profiled for us by OAC so we get some instant insights.

As we have some latitude and longitude columns, let’s have a look at them in the metadata panel.

We can multiselect them and toggle them all to attributes.

Now set these columns to ‘Location Details’ so that OAC recognises them all as location columns.

Setting these columns as location validates them for us.

Now save the dataset so that we can use it.

Create a new workbook using this new dataset.

Select a station name and the entrance latitude and longitude columns and drag them across to the canvas.

This is a first step into using the new REST API as a connector. In later articles we will look at data that is refreshing in real-time and refresh the dataset to see the changing data.