Platform Features
...
Features for Insights
Rest API Integration To Fetch ...

Fetch Insights with API

7min

Fetching Insights with API Based Integration

Go to Advanced View
Go to Advanced View

Advanced View
Advanced View


Click on the API button (Indicated by a Settings Wheel) below the Visualization

Click on API button
Click on API button


How to use the API Settings?

Each Qualetics Insight will provide the following parameters to be used for integration

  • APP ID
  • APP Secret
  • Client ID
  • Insight URL

The parameters are displayed in the API Settings dialog window

API Settings
API Settings


Example Code

In order to render the insight in a web app, two Rest API calls need to be performed

  • Get Authentication Token
  • Perform a POST request to render the insight

The following is an example Rest API call using Javascript to perform the authentication and POST request respectively and load into an HTML Div container

First Define HTML Div Container

HTML


Add the following script reference to D3.JS to support visualizations

JS


Generate Token

JS


POST Request to fetch Insight

JS


The full example including the HTML is shown below. (Note: The example below uses jQuery as well)

HTML


The resulting view would load the insight as below:

Visualization rendered by API
Visualization rendered by API