Catalog and audit ThoughtSpot content
The ThoughtSpot REST API can easily retrieve information about the objects stored on the ThoughtSpot server. The REST API can also retrieve every object in the ThoughtSpot Modeling language (TML), which can be parsed as YAML or JSON for additional details.
Map user and group GUIDs to names๐
Some API responses only include the GUIDs for other objects, without the string names. If you need the human-readable names of users and groups, use the get user details and the get group details endpoints.
These calls include the names along with the GUIDs, allowing you to map the string name values to any GUID returned within another call.
List metadata objects๐
To get a list of all objects on a ThoughtSpot instance, use the /metadata/listobjectheaders REST API call.
The type
parameter reflects the various object types within ThoughtSpot. The API endpoint responds for one type
at a time, so you must decide which object types to bring back and catalog.
The /metadata/listobjectheaders
API is paginated by default. You can return the entire set in one response by setting the batchsize
parameter to -1
. Alternatively, set batchsize
to your preferred size, then use the offset
parameter to move through the pages. offset
is based on individual records, so to paginate, set offset
in multiples of the batchsize
value until you reach a response that is smaller than the batchsize value or is empty.
Full object details๐
The REST API provides a metadata/details endpoint that returns very complex objects with all the metadata available. For purposes of cataloging, it may be easier to use a combination of the metadata list methods and the TML APIs to build a picture of what is available.
For example, to know the columns and data types of a table, you can get the tableโs GUID from the metadata/listobjectheaders
endpoint, then request the TML for the table using the TML APIs. If you need more complex data of how ThoughtSpot stores the columns internally, then use the metadata/details
endpoint.