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🔗
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 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": "UserA@example.com", "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
|