The following actions can be performed by using the relevant APIs. These actions do not require postMessage communication. So the steps outlined in to connect with Tellius are not applicable here. The following APIs can be hit directly to achieve the required tasks.
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.
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.
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.