Use this procedure to construct the URL you will use to call the REST API:
- Log in to ThoughtSpot from a browser.
- Navigate to the pinboard from which you want to get data. If it doesn’t exist yet, create it now.
- Find the ID number of the object you want to get the data from. If the object is:
A pinboard, click Actions and select Copy Link.
A visualization, click the Copy Link icon in the upper right corner of the table or chart.
Copy the ID number from the link shown. Paste it somewhere so that you can use it later to construct the URL to use when calling the REST API.
If the object is:
A pinboard, copy the identifier that appears after “viz/”. Omit the trailing “/”.
A visualization (table or chart), copy the identifier that appears after “viz/”. This is the pinboard ID.
Then skip the “/” and copy what follows it. This is the visualization ID.
Construct the URL as follows: For a pinboard, the URL takes the form:
For a visualization, the URL takes the form:
- If you want to apply any filters to the data that will be returned, apply Runtime Filters.
- Now your URL is complete, and you can use it to access the data directly via the HTTP POST method. The REST API returns the data formatted as JSON.
- Retrieve the data from the JSON and display it in your Web page, Web portal, or application.