Embed a Liveboard using REST API
You can use the REST API to get an object from ThoughtSpot and embed it in a web page, portal, or application. ThoughtSpot provides an embed link for objects, such as Liveboards and Liveboard visualizations, using which you construct the URL required to make an API call.
To get the embed link for a Liveboard:
Log in to ThoughtSpot from a browser.
Navigate to the Liveboard from which you want to get data.
Find the ID number of the object you want to get the data from.
To embed a Liveboard, click the ellipses (…) icon, and select Copy embed link.
To get the embed link for a visualization:
Navigate to the table or chart
Click the ellipses (…) icon in the upper right corner of the table or chart.
Click Copy embed link icon.
Copy the ID number from the link. Paste it somewhere so that you can use it later to construct the URL for the REST API call.
If the object is a Liveboard, copy the identifier that appears after
For visualizations (table or chart), copy the IDs that appear after
Construct the URL.
For a Liveboard, the URL is as follows:
For a visualization, the URL is as follows:
To apply filters to the data, use runtime filters.
For example, to sort values equal to
Colorcolumn for a visualization in a Liveboard, you can pass the runtime filter in the URL query parameters as shown here:
http://<base-uri>/callosum/v1/tspublic/v1/pinboarddata ?id=<Liveboard_id>&vizid=%5B<visualization_id>%5D &col1=color&op1=EQ&val1=red
After you construct the URL, send a POST request to get data from ThoughtSpot.
The Data REST API returns the data formatted as JSON.
Retrieve the data from the JSON and embed it in your Web page, Web portal, or application.