| 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 ✓ JWT for ABAC |
Request and Response structure | Not fully standardized | Standardized |
API services | ||
Resource URL | Base URI | Base URI |
REST API v1 and v2.0 comparison
|
Important
|
The REST API v1 framework has been deprecated and replaced by REST API v2 endpoints. The REST API v1 Playground link has also been removed from the Develop page in the ThoughtSpot UI in 26.6.0.cl and later versions. Existing integrations that use REST API v1 endpoints will continue to function without disruption. However, ThoughtSpot strongly recommends updating your integrations to use REST API v2 endpoints and workflows. For more information about REST API v2 endpoints, see REST API v2 Reference. |
Both REST API v1 and REST API v2.0 let you access, retrieve, create, and manage ThoughtSpot objects and resources programmatically. However, the REST API v2.0 framework offers standardized request and response structures, bearer token authentication, and richer capabilities. This document lists the differences between the two versions.
Feature comparison🔗
Request methods🔗
| REST API v1 | REST API v2.0 |
|---|---|
Some |
|
Object types and naming convention🔗
The following table lists the metadata object types and subtypes 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 subtypes 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.0 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 REST API v1 and v2.0 request body for the 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/createcurl -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
|
