Getting started with Insights
The GraphQL Insights API is currently in Early Availability status for customers on the AWS-US cluster. For more information, see GraphQL API policy.
To use Insights, you must first create a product on an AppDirect marketplace and register it with AppDirect.
You can then create an API client to communicate with the marketplace, and use GraphQL APIs to create and populate your dataset, define your metrics, and retrieve data so you can render it in visualizations.
Prerequisites
As prerequisites, you must register your product and create an API client:
-
Register your product with Insights.
You only need to register a given product once.
-
Create an API client for the product.
To do so, you must first generate client credentials for the product. You can then use those credentials to obtain an access token to be included in all your API calls.
Metrics use a variant of SQL, so you should also be familiar with writing SQL queries in order to create them. Once a metric has been created, however, users who do not know SQL can still modify the query indirectly by applying the filters that are available for that metric.
Using the Insights APIs
Once your product is registered and your API client is set up, you can define your data structure, add data to it, and retrieve data using the metrics you have defined:
-
Create at least one dataset to store the data for your product. See Create a dataset.
-
Create one or more metrics you can use to query the dataset. See Create a metric.
-
Push rows of data from your product host to your dataset. See Push data to a dataset.
-
Use your defined metrics to retrieve data from the dataset for presentation in your own front-end application. See Retrieve data for a metric.
Each time you have new product data, you can push it to the dataset so it will appear the next time you retrieve data.
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!