Insights APIs
Leverage Tellius Insights APIs to generate, retrieve, and embed AI-driven insights—automate analytics workflows with RESTful endpoints.
The following actions can be performed by using the relevant APIs. These actions do not require postMessage communication. So the steps outlined in this section to connect with Tellius are not applicable here. The following APIs can be hit directly to achieve the required tasks.
GET Insights
Request URL: https://dev.app.tellius.com/insight?includingShared=true&withSharings=true&limit=4&offset=0
Request Method: GET
includingShared - returns the Viz object which is shared with the user
limit - number of Insights to be returned
offset - positions of the Insights to be returned. Say, for example, if there are 12 Insights in total, the limit=4 and offset=0, then the list of Insights starting from the very first Insight will be returned. For the same number of insights, if offset=4, then the list of Insights starting from the fourth Insight will be returned. Offset value starts from 0.
onlyShared - If set to true, then only the Insights that are shared with (not created by) the user will be returned.
CURL:
DELETE Insight
Request URL: https://dev.app.tellius.com/insight/insightID
Request Method: DELETE
CURL:
Other RESTful API
GET the list of notifications
We can get the list of user notifications using the following API endpoint:
https://dev.app.tellius.com/api/jobs/list?createdBy=superUser&limit=10&type=Insight&includeConsumed=true&offset=0&sortBy=createdAt
type - type of notification can be Insight, data, or ML
createdBy - filters the notifications based on the creator
limit - the notifications count
includeConsumed - If set to true, then the notifications read will also be included.
offset - the starting limit for pagination
Mark notifications as read
The following code can be used to mark the Insight notifications as read:
WebSocket notifications
If APIs are used directly to perform the required tasks on Insights, then one has to wait for the WebSocket notifications. These WebSocket notifications indicate whether a task is a success or a failure.
Notification on successful creation of an Insight
If an Insight is created successfully, the following response will be sent from WebSocket.
The code consists of both request and response information. The result section has components such as insightID and driverID. These two can be utilised to form the URL https://domain/discover/insight/insightID/driverID -- which can be used to get redirected to the required Insight.
Notification on failure of an Insight creation
If an Insight creation has failed, the following response will be sent from the WebSocket with the below Object.
The code consists of both request and response information. The result section has components such as insightID and driverID. These two can be utilised to form the URL https://domain/discover/insight/insightID/driverID -- which can be used to get redirected to the required Insight.
Last updated
Was this helpful?