curl -X POST \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/semantic-integrations/create' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"connection_identifier": "<snowflake-connection-guid-or-name>",
"name": "Sales Semantic View",
"database_name": "SALES_DB",
"schema_name": "PUBLIC",
"semantic_view_name": "SALES_SEMANTIC_VIEW",
"type": "RDBMS_SNOWFLAKE",
"description": "Semantic integration for the Sales Snowflake Semantic View"
}'
Snowflake Semantic View integration APIs
ThoughtSpot provides the Semantic View integrations REST API v2.0 endpoints to create, search, import, and delete semantic integration configurations programmatically.
Overview🔗
Snowflake Semantic Views provide a governed semantic layer for data in Snowflake, including named measures, dimensions, and business-logic formulas. When you create a semantic integration in ThoughtSpot, the platform reads the semantic view definition from Snowflake and generates a corresponding ThoughtSpot data model (Worksheet). The model inherits the column names, descriptions, and formula definitions from the Snowflake Semantic View.
You can use the semantic integration APIs to automate the following tasks:
-
Create a semantic integration that links a Snowflake Semantic View to a ThoughtSpot data model.
-
Search and list existing semantic integrations.
-
Re-import a semantic integration to refresh the ThoughtSpot model after the source Snowflake Semantic View has changed.
-
Delete a semantic integration and its generated ThoughtSpot model.
|
Note
|
The semantic integration APIs are available on ThoughtSpot Cloud instances from 26.9.0.cl.
Snowflake is the only supported CDW connector type ( |
Prerequisites🔗
To use these APIs, the authenticated user must have one of the following privileges:
-
ADMINISTRATION(Can administer ThoughtSpot) -
DATAMANAGEMENT(Can manage data)
If Role-Based Access Control (RBAC) is enabled on your instance, the user requires CAN_CREATE_OR_EDIT_CONNECTIONS (Can create/edit Connections) privilege.
API endpoints🔗
| Method | Endpoint | Description |
|---|---|---|
|
| Creates a new semantic integration by reading a Snowflake Semantic View and generating a ThoughtSpot data model. |
|
| Returns a list of semantic integrations matching the specified filter criteria. |
|
| Re-imports semantic updates from the CDW source and refreshes the associated ThoughtSpot data model. |
|
| Deletes a semantic integration and its generated ThoughtSpot data model. |
Create a semantic integration🔗
To create a new semantic integration by reading the specified Snowflake Semantic View and generating a corresponding ThoughtSpot data model, use the /api/rest/2.0/semantic-integrations/create API endpoint. On success, the response includes the integration GUID, the generated model GUID, and a per-formula import report.
Request parameters🔗
| Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | GUID or name of the Snowflake connection in ThoughtSpot. |
| String | Yes | Display name for the semantic integration. Must be unique. |
| String | Yes | Database name in the Snowflake CDW that contains the semantic view. |
| String | Yes | Schema name in the Snowflake CDW that contains the semantic view. |
| String | Yes | Name of the Snowflake Semantic View to integrate. |
| String | Yes | CDW connector type. Only accepted value: |
| String | No | Optional description for the semantic integration. |
| Array<String> | No | Tag GUIDs or names to associate with the integration. |
Response fields🔗
| Field | Type | Description |
|---|---|---|
| String | GUID of the newly created semantic integration. |
| String | Display name of the semantic integration. |
| String | GUID of the ThoughtSpot data model generated for this integration. |
| String | Display name of the generated ThoughtSpot data model. |
| Object | Per-formula import report. See undefined. |
Semantic report fields🔗
The semantic_report object contains a summary and a list of per-formula import results.
summary fields:
| Field | Type | Description |
|---|---|---|
| Integer | Total number of formulas in the Snowflake Semantic View. |
| Integer | Number of formulas successfully imported. |
| Integer | Number of formulas that failed to import. |
| Integer | Number of formulas that were skipped. |
formulas array — each entry contains:
| Field | Type | Description |
|---|---|---|
| String | Formula GUID in the generated ThoughtSpot model. |
| String | Formula name. |
| String | Formula description. |
| String | Original CDW expression. |
| String | Equivalent ThoughtSpot formula expression. |
| String | One of |
| String | One of |
Example request🔗
Example response🔗
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Sales Semantic View",
"model_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"model_name": "Sales Semantic View",
"semantic_report": {
"summary": {
"total": 5,
"imported": 4,
"failed": 0,
"skipped": 1
},
"formulas": [
{
"id": "formula-guid-001",
"name": "Total Revenue",
"description": "Sum of all revenue",
"source_expression": "SUM(revenue)",
"translated_formula": "sum(revenue)",
"import_status": "IMPORTED",
"change_status": null
}
]
}
}
Search semantic integrations🔗
To fetch a paginated list of semantic integrations matching the specified criteria, use the /api/rest/2.0/semantic-integrations/search API endpoint. Returns all integrations if no filters are specified.
Request parameters🔗
| Parameter | Type | Required | Description |
|---|---|---|---|
| String | No | Substring filter to narrow search results by integration name. |
| Array<String> | No | Filter by the GUID or username of the user who created the integration. |
| Array<String> | No | Filter by the GUID or name of the Snowflake connection associated with the integration. |
| Object | No | Sort configuration. See undefined. |
| Integer | No | Number of records to skip for pagination. Minimum: 0. Default: 0. |
| Integer | No | Maximum number of records to return. Use |
Sort options🔗
| Field | Type | Description |
|---|---|---|
| String | Sort field. One of: |
| String | Sort direction. |
Response fields🔗
Returns an array of objects, each with the following fields:
| Field | Type | Description |
|---|---|---|
| String | GUID of the semantic integration. |
| String | Display name of the semantic integration. |
| String | Description of the semantic integration. Null if not set. |
| String | GUID of the associated ThoughtSpot data model. |
| String | Display name of the associated ThoughtSpot data model. |
| String | How the semantic definition was sourced. |
| String | CDW connector type. Currently always |
| String | GUID of the Snowflake connection. |
| String | Display name of the Snowflake connection. |
| String | GUID of the user who created the integration. |
| String | Username of the user who created the integration. |
| Float | Creation time in Unix epoch milliseconds. |
| Float | Last modification time in Unix epoch milliseconds. |
| Array | Tags associated with the integration, each with |
Example request🔗
curl -X POST \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/semantic-integrations/search' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"connection_identifiers": ["<snowflake-connection-guid-or-name>"],
"sort_options": {
"field_name": "MODIFIED_TIME",
"order": "DESC"
},
"record_size": 20,
"record_offset": 0
}'
Import a semantic integration🔗
To re-import semantic updates from the Snowflake CDW source for an existing integration, and rebuild the corresponding ThoughtSpot data model, send a POST request to the /api/rest/2.0/semantic-integrations/{semantic_integration_identifier}/import API endpoint. Send this API request, after the source Snowflake Semantic View has been updated (formulas added, removed, or modified) to bring the ThoughtSpot model back in line with the CDW definition.
|
Note
|
Importing updates is not supported for integrations created using the file upload option in the ThoughtSpot UI. To refresh a file-upload-based integration, use the ThoughtSpot UI. |
The import operation:
-
Preserves the integration GUID, name, and
model_id. Only the formula set is refreshed. -
Returns the same
semantic_reportresponse as create, with an additionalchange_statusper formula indicating whether each formula isNEW,UPDATED, orUNCHANGEDsince the previous import.
Path parameters🔗
| Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | GUID or name of the semantic integration to re-import. |
Response fields🔗
Same as create, with the addition of the change_status field in each formula entry:
change_status value | Description |
|---|---|
| Formula is new since the previous import. |
| Formula definition changed since the previous import. |
| Formula is unchanged since the previous import. |
Example request🔗
curl -X POST \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/semantic-integrations/Sales%20Semantic%20View/import' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{}'
Example response🔗
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Sales Semantic View",
"model_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"model_name": "Sales Semantic View",
"semantic_report": {
"summary": {
"total": 6,
"imported": 5,
"failed": 0,
"skipped": 1
},
"formulas": [
{
"id": "formula-guid-001",
"name": "Total Revenue",
"description": "Sum of all revenue",
"source_expression": "SUM(revenue)",
"translated_formula": "sum(revenue)",
"import_status": "IMPORTED",
"change_status": "UNCHANGED"
},
{
"id": "formula-guid-002",
"name": "Net Profit",
"description": "Revenue minus costs",
"source_expression": "SUM(revenue) - SUM(costs)",
"translated_formula": "sum(revenue) - sum(costs)",
"import_status": "IMPORTED",
"change_status": "NEW"
}
]
}
}
Delete a semantic integration🔗
To permanently delete the specified semantic integration and its generated ThoughtSpot data model from the system, use the /api/rest/2.0/semantic-integrations/{semantic_integration_identifier}/delete API endpoint.
|
Warning
|
Deletion is permanent and cannot be undone. If you need to restore the integration, use the |
Path parameters🔗
| Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | GUID or name of the semantic integration to delete. |
Example request🔗
curl -X POST \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/semantic-integrations/Sales%20Semantic%20View/delete' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{}'
A successful delete returns HTTP 200 with an empty response body.
Error responses🔗
| Code | Description |
|---|---|
400 | Bad Request — required parameter missing or invalid value (for example, unsupported |
401 | Unauthorized — authentication token missing, expired, or invalid. |
403 | Forbidden — the caller lacks the required privilege. |
404 | Not Found — no semantic integration exists with the given identifier. |