Feature | REST API v1 | REST API v2.0 |
---|---|---|
API Playground | Go to Develop > REST API > REST API v1 Playground. REST API v1 endpoints can be accessed via Swagger API explorer. | Go to Develop > REST API > REST API v2.0 Playground. |
Playground access | Requires admin or developer privilege | Requires admin or developer privilege |
Downloadable code samples | – | ✓ |
API documentation | ||
Authentication support | ✓ Basic authentication ✓ Trusted authentication | ✓ Basic authentication ✓ Bearer token authentication ✓ Trusted authentication |
Request and Response structure | Not fully standardized | Standardized |
API services | ||
Resource URL | Base URI | Base URI |
REST API v1 and v2.0 comparison
Both v1 and v2 REST API frameworks allow you to access, retrieve, create, and manage ThoughtSpot objects and resources. REST API v2.0 is a new framework that expands the core API functionality with additional features and improved user experience.
Feature comparison🔗
Supported API operations🔗
API service | REST API v1 | REST API v2.0 |
---|---|---|
Admin services | ✓ Available | ✓ Available Available under system |
Authentication | ✓ Available The login, authentication, token generation, and logout services are available under session. | ✓ Available |
Data APIs | ✓ Available | ✓ Available |
Connection and live query services API endpoints for CRUD operations of data connection objects | ✓ Available | ✓ |
Database services Applicable to ThoughtSpot Software deployments only | ✓ Available | – |
Dependency services | ✓ Available | ✓ Available Available as part of metadata API operations. |
Groups | ✓ Available | ✓ Available |
Liveboard export | ✓ Available | ✓ Available This API service is available under report. |
Logs | ✓ Available | ✓ Available |
Materialization services Applicable to ThoughtSpot Software deployments only | ✓ Available | – |
Metadata services API for querying metadata objects, assigning tags, setting favorites, and importing and exporting TML objects | ✓ Available The metadata API service does not support fetching SQL query information from Answer and Liveboard objects | ✓ Available Supports fetching SQL query information from Answer and Liveboard objects |
Orgs | ✓ Available | ✓ Available |
Reports | ✓ Available The Answer download API service is not available | ✓ Available |
Session | ✓ Available | ✓ Available The login, authentication, token generation, and logout services are available as session resource and are listed under the Authentication category in the Playground. |
Security | ✓ Available | ✓ Available |
System | ✓ Available The system administration API operations are available as Admin services | ✓ Available |
TML | ✓ Available | ✓ Available The import and export metadata API service is available under *metadata*. |
User | ✓ Available | ✓ Available |
Version control | – Not Available | ✓ Available |
Schedules | – Not Available | ✓ Available |
Request methods🔗
REST API v1 | REST API v2.0 |
---|---|
Some |
|
Object types and naming convention🔗
The following table lists the metadata object types and sub-types supported in REST API v1 and REST API v2.0:
REST API v1 | REST API v2.0 |
---|---|
Metadata object types in REST API v1:
| Metadata object types in REST API v2.0:
Querying metadata objects by sub-types is not supported in the current release. |
Request and response structure🔗
In REST API v2.0, the API endpoints let you pass several request parameters in a single API call. User and group administration and metadata query APIs support several distinct operations.
The following example shows the REST API v1 and v2 endpoints available for user administration and provisioning:
Although the REST API v2.0 has fewer endpoints, it supports all user administration and CRUD operations that were available with REST API v1.
Request body🔗
The following example shows the API v1 and v2 request body for user creation operation:
- REST API v1
-
POST /tspublic/v1/user/
curl -X POST \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept: application/json' \ -d 'name=UserA&password=GuestTest123!&displayname=User A&properties={ "userContent": {"userPreferences": {"showWalkMe": true}}}&groups=["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]&usertype=LOCAL_USER&visibility=DEFAULT&triggeredbyadmin=true' \ 'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/user/'
- REST API v2.0
-
POST /api/rest/2.0/users/create
curl -X POST \ --url 'https://{ThoughtSpot-Host}/api/rest/2.0/users/create' \ -H 'Authorization: Bearer {OAUTH_TOKEN}'\ -H 'Accept: application/json'\ -H 'Content-Type: application/json' \ --data-raw '{ "name": "UserB", "display_name": "User B", "password": "123Cloud!", "email": "[email protected]", "account_type": "LOCAL_USER", "account_status": "ACTIVE", "group_identifiers": [ "ADMINISTRATOR" ], "visibility": "SHARABLE", "show_onboarding_experience": true, "notify_on_share": true, "home_liveboard_identifier": "eee701ad-10d2-4bd5-b268-e07c123569c8", "favorite_metadata": [ { "identifier": "59a8ae34-3609-4385-9f6b-871b74c901a3", "type": "LIVEBOARD" }, { "identifier": "beb2344c-215b-46a0-b518-3e933365bfc2", "type": "ANSWER" } ] }'
Response structure🔗
REST API v1 | REST API v2.0 |
---|---|
API response for
| API response for
|