REST API v2.0
The REST API v2.0 framework is built upon the existing core API functionality and data models but offers several new features and enhancements.
- Enhanced usability and developer experience
With REST API v2.0, ThoughtSpot offers a user-friendly, interactive Playground to explore the endpoints, try out API requests, and view responses. The Playground provides detailed information about how to get started, authenticate to ThoughtSpot, and interact with the endpoints.
For more information, see REST Playground v2.
- Token-based authentication and authorization
To provide secure access to ThoughtSpot resources, REST API v2.0 supports the Bearer token and Trusted authentication methods. You must obtain an access token before making an API call and pass the token in the
Authorizationheader in the subsequent API calls.
For more information, see REST API v2 authentication.
- Consistent request and response workflow
With REST API v2.0, the JSON data structure for request and response payloads is standardized.
The REST API v2.0 supports the standard Create, Read, Update, and Delete (CRUD) operations, and the following HTTP verbs in API requests.
GET to query information, such as getting system or session information
POST to create new objects, add, modify, or delete object properties
- Simplified resource collections and endpoint categories
The resource endpoints are grouped logically based on the objects they operate on. The endpoint URLs are easy to understand and predictable. For example, you can find all metadata resource endpoints, including TML operations, in the
Starting with 9.0.0.cl release, the REST API v2.0 Playground and API endpoints are generally available (GA) on all ThoughtSpot instances.
If you are not a ThoughtSpot user yet, you can preview the REST API v2.0 endpoints ThoughtSpot API Playground or sign up for a free trial to evaluate the API and Playground experience.
Authentication tokens generated via
POST requests to REST API v1 endpoints can be used for authorizing REST API v2.0 requests.
The REST API v2.0 introduces several breaking changes that may affect interoperability between REST API v1 and REST API v2.0, or REST API v2Beta and REST API v2.0 versions.
We recommend using REST API v2.0 API endpoints for development and testing purposes in the initial release. ThoughtSpot will provide migration instructions when REST API v2.0 framework is fully ready to replace the REST API v1 endpoints in a production setup.
The REST API v2.0
session/loginendpoint does not return session cookies. However, you can use obtain a bearer token from ThoughtSpot via
/api/rest/2.0/auth/token/fulland use it to authorize your subsequent API requests.
The following REST API v2.0 endpoints require administrator or data download privilege, and at least view access to the metadata object specified in the API request.
Object sharing via
/api/rest/2.0/security/metadata/sharerequires administrator privileges. If you have edit permissions or view access to the metadata object, but don’t have administrator privileges, use the REST API v1 endpoint (
/tspublic/v1/security/share) or the Share action in the UI to share an object.