The Rest API Tooklit is a functional wrapper library for doing actions with the ThoughtSpot REST API, including flows involving TML.
The /examples directory includes examples of many common workflows accomplished with the REST API and/or TML manipulation.
You can use the thoughtspot-rest-api-v1 module directly to do all the REST API actions.
The ThoughtSpot class simply wraps the calls to thoughtspot-rest-api-v1 to present methods organized by object type with more obvious and consistent method names.
In order to use this toolkit, both thoughtspot-rest-api-v1 and thoughtspot-tml modules are requirements for this package, and are assumed in the examples.
To install the latest versions of the other modules:
pip install thoughtspot-rest-api-v1 --upgrade
pip install thoughtspot-tml --upgrade
All code and examples are intended only as a starting point to be customized to your purposes. Nothing is wrapped up and documented for "production" out of the box. Further details can be found in the project /examples folder. * Basic API workflow * Export Liveboard to PDF * Retrieve sharing permissions on objects * Import tables via REST API * Manipulate TML to work with SDLC * Download TML as YAML * YAML to TML converter * Change object references * Create TML worksheets * Replicate ThoughtSpot objects from one instance to another * Create a release from a saved development instance * Transfer object ownership * Store TML in directory with named structure for devops integration * Merge GUIDs between TML
This toolkit is developed and tested only against ThoughtSpot Cloud using the available tspublic/v1 endpoints.
The V2 ThoughtSpot REST API is currently in preview. All requests in V2 will be in JSON format, with a complete Playground environment, and there will be SDKs automatically provided in various languages to issue the endpoint commands.
It should also work with Software versions 7.1.1 and later, but the library is not versioned, so please check your documentation for available endpoints within the release you use if on a Software release.
For a library of tools which includes support for older Software versions of ThoughtSpot and built out command-line utilities, please see CS Tools . thoughtspot.py provides a class for doing actions to the ThoughtSpot Server, organized with a series of sub-objects which represent the various object types in ThoughtSpot endpointmethodclasses.py is implements the individual classes which are objects under the ThoughtSpot class