openapi: 3.0.0
info:
title: ThoughtSpot Public REST 10.1.0.cl Connections API
version: '2.0'
servers:
- url: '{base-url}'
variables:
base-url:
default: https://localhost:443
security:
- bearerAuth: []
tags:
- name: Connections
paths:
/api/rest/2.0/connection/create:
post:
operationId: createConnection
description: "\n Version: 9.2.0.cl or later\n\nCreates a connection to a data warehouse for live query services.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n#### Create a connection without tables\n\nTo create a connection without tables:\n\n1. Pass these parameters in your API request.\n * Name of the connection.\n * Type of the data warehouse to connect to.\n * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"databases\": [\"DB1\", \"DB2\"],\n \"externalDatabases\":[\n\n ]\n }\n ```\n2. Set `validate` to `false`.\n\n**NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\n#### Create a connection with tables\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required.\n\nTo create a connection with tables:\n\n1. Pass these parameters in your API request.\n* Name of the connection.\n* Type of the data warehouse to connect to.\n* A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"databases\": [\"DB1\", \"DB2\", \"AllDatatypes\"],\n \"externalDatabases\":[\n {\n \"name\":\"AllDatatypes\",\n \"isAutoCreated\":false,\n \"schemas\":[\n {\n \"name\":\"alldatatypes\",\n \"tables\":[\n {\n \"name\":\"allDatatypes\",\n \"type\":\"TABLE\",\n \"description\":\"\",\n \"selected\":true,\n \"linked\":true,\n \"columns\":[\n {\n \"name\":\"CNUMBER\",\n \"type\":\"INT64\",\n \"canImport\":true,\n \"selected\":true,\n \"isLinkedActive\":true,\n \"isImported\":false,\n \"tableName\":\"allDatatypes\",\n \"schemaName\":\"alldatatypes\",\n \"dbName\":\"AllDatatypes\"\n },\n {\n \"name\":\"CDECIMAL\",\n \"type\":\"INT64\",\n \"canImport\":true,\n \"selected\":true,\n \"isLinkedActive\":true,\n \"isImported\":false,\n \"tableName\":\"allDatatypes\",\n \"schemaName\":\"alldatatypes\",\n \"dbName\":\"AllDatatypes\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ```\n2. Set `validate` to `true`.\n\n**NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\nThe optional `databases` property in `data_warehouse_config` accepts a list of database names. When specified, ThoughtSpot persists this list on the connection and uses it to scope metadata fetching to only the specified databases in subsequent table add and remove operations. If omitted, all databases in the data warehouse are accessible for metadata operations.\n\nThe `databases` and `externalDatabases` serve different purposes. `databases` is a flat list of database names that controls which databases are scanned during metadata operations. `externalDatabases` defines the full table hierarchy and determines which tables are linked into ThoughtSpot.\n\n\n\n\n#### Endpoint URL\n"
tags:
- Connections
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateConnectionRequest'
required: true
parameters: []
responses:
'200':
description: Connection to the datasource successfully created.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateConnectionResponse'
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connection/delete:
post:
operationId: deleteConnection
description: "\n Version: 9.2.0.cl or later\n\n\n**Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the\n[Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. \n\n#### Usage guidelines\n\nDeletes a connection object.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n**Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation.\n\n\n\n#### Endpoint URL\n"
deprecated: true
tags:
- Connections
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteConnectionRequest'
required: true
parameters: []
responses:
'204':
description: Connection successfully deleted.
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connections/{connection_identifier}/delete:
post:
operationId: deleteConnectionV2
description: "\n Version: 10.4.0.cl or later\n\nDeletes a connection object.\n\n**Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n\n\n\n#### Endpoint URL\n"
tags:
- Connections
parameters:
- in: path
name: connection_identifier
required: true
schema:
type: string
description: Unique ID or name of the connection.
responses:
'204':
description: Connection successfully deleted.
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}:
post:
operationId: downloadConnectionMetadataChanges
description: "\n Version: 9.9.0.cl or later\n\nExports the difference in connection metadata between CDW and ThoughtSpot\n\nRequires `DATAMANAGEMENT` (**Can manage data**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: \n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\nTo download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request.\n\n\n\n\n#### Endpoint URL\n"
tags:
- Connections
parameters:
- in: path
name: connection_identifier
required: true
schema:
type: string
description: GUID of the connection
responses:
'200':
description: Export metadata changes.
content:
application/octet-stream: {}
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}:
post:
operationId: fetchConnectionDiffStatus
description: "\n Version: 9.9.0.cl or later\n\nValidates the difference in connection metadata between CDW and ThoughtSpot.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required:\n\n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\nReturns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW.\n\nTo get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request.\n\n\n\n\n#### Endpoint URL\n"
tags:
- Connections
parameters:
- in: path
name: connection_identifier
required: true
schema:
type: string
description: GUID of the connection
responses:
'200':
description: true/false
content:
application/json:
schema:
$ref: '#/components/schemas/FetchConnectionDiffStatusResponse'
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens:
post:
operationId: revokeRefreshTokens
description: "\n Version: 26.2.0.cl or later\n\nRevokes OAuth refresh tokens for users who no longer require access to a data warehouse connection.\nWhen a token is revoked, the affected user's session for that connection is terminated, and they must re-authenticate to regain access.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users.\n\n#### Usage guidelines\n\nYou can specify different combinations of identifiers to control which refresh tokens are revoked.\n\n- **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author.\n- **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked.\n- **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author.\n- **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations.\n- **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections.\n- **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections.\n\n**NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request.\n\n\n\n\n#### Endpoint URL\n"
tags:
- Connections
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RevokeRefreshTokensRequest'
required: true
parameters:
- in: path
name: connection_identifier
required: true
schema:
type: string
description: Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author.
responses:
'200':
description: Token(s) successfully revoked.
content:
application/json:
schema:
$ref: '#/components/schemas/RevokeRefreshTokensResponse'
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Object not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connection/search:
post:
operationId: searchConnection
description: "\n Version: 9.2.0.cl or later\n\nGets connection objects.\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n- To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body.\n- To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`.\n- To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match.\n- To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`.\n- To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request.\n Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`).\n\n```\n{\n \"connections\": [\n {\n \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\",\n \"data_warehouse_objects\": [\n {\n \"database\": \"NEBULADEV\",\n \"schema\": \"INFORMATION_SCHEMA\",\n \"table\": \"APPLICABLE_ROLES\",\n \"column\": \"ROLE_NAME\"\n }\n ]\n }\n ],\n \"data_warehouse_object_type\": \"COLUMN\"\n}\n```\n\n- To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`.\n- To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are:\n - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data.\n - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type.\n - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only.\n - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth).\n - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only.\n - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only.\n - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only.\n - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only.\n - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only.\n - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only.\n - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only.\n- To include more details about connection objects in the API response, set `include_details` to `true`.\n- You can also sort the output by field names and filter connections by tags.\n\n**NOTE**: In addition to the connection GUID and name, the `identifier` field on each entry in `connections` accepts a Custom object ID if one is configured for the connection. The response also includes the `obj_id` field for each connection that has one set.\n\n**NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results.\n\n\n\n\n#### Endpoint URL\n"
tags:
- Connections
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SearchConnectionRequest'
required: true
parameters: []
responses:
'200':
description: List of connections to the datasource.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SearchConnectionResponse'
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connections/{connection_identifier}/resync-metadata:
post:
operationId: syncMetadata
description: "\n Version: 26.5.0.cl or later\n\nSynchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot.\n\nRequires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required.\n\n#### Usage guidelines\n\nTo synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`.\n\n##### Hierarchical schema\n\n* Connection: The connection object for the sync operation.\n* Tables: Tables for the sync operation. When no table is specified, all tables are synchronized.\n* Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation.\n\nTo set the scope for the sync operation:\n\n* Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body.\n* Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array.\n* Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array.\n\n```\n{\n \"tables\": [\n {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]},\n \"table-guid-2\"\n ],\n \"sync_attributes\": [\"DESCRIPTION\"]\n}\n```\n\n##### API response\n\nIf the sync operation is successful, the API returns the following information:\n\n* Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`.\n* Number of tables and columns that were updated.\n* Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`.\n* Message text indicating the sync results.\n\n\n\n\n#### Endpoint URL\n"
tags:
- Connections
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SyncMetadataRequest'
required: true
parameters:
- in: path
name: connection_identifier
required: true
schema:
type: string
description: Unique ID or name of the connection.
responses:
'200':
description: Metadata synced successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/SyncMetadataResponse'
'400':
description: Invalid request parameters or hierarchy.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Connection, table, or column not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connection/update:
post:
operationId: updateConnection
description: "\n Version: 9.2.0.cl or later\n\n**Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the\n[Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects.\n\n#### Usage guidelines\n\nUpdates a connection object. \n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\nTo update a connection object, pass these parameters in your API request:\n\n1. GUID of the connection object.\n2. If you are updating tables or database schema of a connection object:\n a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`.\n b. Set `validate` to `true`.\n3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`.\n\n\n\n\n#### Endpoint URL\n"
deprecated: true
tags:
- Connections
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateConnectionRequest'
required: true
parameters: []
responses:
'204':
description: Connection successfully updated.
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connections/{connection_identifier}/status:
post:
operationId: updateConnectionStatus
description: "\n Version: 26.6.0.cl or later\n\nActivates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation.\n\n#### Usage guidelines\n\nTo update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body.\n\n- **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection.\n- **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\".\n\n\n\n\n\n#### Endpoint URL\n"
tags:
- Connections
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateConnectionStatusRequest'
required: true
parameters:
- in: path
name: connection_identifier
required: true
schema:
type: string
description: Unique ID or name of the connection.
responses:
'204':
description: Connection status updated successfully.
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Object not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/rest/2.0/connections/{connection_identifier}/update:
post:
operationId: updateConnectionV2
description: "\n Version: 10.4.0.cl or later\n\nUpdates a connection object.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\nTo update a connection object, pass these parameters in your API request:\n\n1. GUID of the connection object.\n2. If you are updating tables or database schema of a connection object:\n a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`.\n b. Set `validate` to `true`.\n \n **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\n * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example:\n * This is an example of updating a single table in a empty connection:\n \n ```\n {\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"databases\": [\"DB2\", \"DB3\", \"DEVELOPMENT\"],\n \"externalDatabases\": [\n {\n \"name\": \"DEVELOPMENT\",\n \"isAutoCreated\": false,\n \"schemas\": [\n {\n \"name\": \"TS_dataset\",\n \"tables\": [\n {\n \"name\": \"DEMORENAME\",\n \"type\": \"TABLE\",\n \"description\": \"\",\n \"selected\": true,\n \"linked\": true,\n \"gid\": 0,\n \"datasetId\": \"-1\",\n \"subType\": \"\",\n \"reportId\": \"\",\n \"viewId\": \"\",\n \"columns\": [\n {\n \"name\": \"Col1\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"Col2\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"Col3\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"Col312\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"Col4\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n }\n ],\n \"relationships\": []\n }\n ]\n }\n ]\n }\n ],\n \"configuration\": {\n \"password\": \"\",\n \"database\": \"DEVELOPMENT\",\n \"role\": \"DEV\",\n \"accountName\": \"thoughtspot_partner\",\n \"warehouse\": \"DEMO_WH\",\n \"user\": \"DEV_USER\"\n }\n }\n ```\n \n* This is an example of updating a single table in an existing connection with tables:\n \n ```\n {\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"databases\": [\"DB2\", \"DB3\", \"DEVELOPMENT\"],\n \"externalDatabases\": [\n {\n \"name\": \"DEVELOPMENT\",\n \"isAutoCreated\": false,\n \"schemas\": [\n {\n \"name\": \"TS_dataset\",\n \"tables\": [\n {\n \"name\": \"CUSTOMER\",\n \"type\": \"TABLE\",\n \"description\": \"\",\n \"selected\": true,\n \"linked\": true,\n \"gid\": 0,\n \"datasetId\": \"-1\",\n \"subType\": \"\",\n \"reportId\": \"\",\n \"viewId\": \"\",\n \"columns\": [],\n \"relationships\": []\n },\n {\n \"name\": \"tpch5k_falcon_default_schema_users\",\n \"type\": \"TABLE\",\n \"description\": \"\",\n \"selected\": true,\n \"linked\": true,\n \"gid\": 0,\n \"datasetId\": \"-1\",\n \"subType\": \"\",\n \"reportId\": \"\",\n \"viewId\": \"\",\n \"columns\": [\n {\n \"name\": \"user_id\",\n \"type\": \"INT64\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"product_id\",\n \"type\": \"INT64\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"user_cost\",\n \"type\": \"INT64\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n }\n ],\n \"relationships\": []\n }\n ]\n }\n ]\n }\n ],\n \"configuration\": {\n \"password\": \"\",\n \"database\": \"DEVELOPMENT\",\n \"role\": \"DEV\",\n \"accountName\": \"thoughtspot_partner\",\n \"warehouse\": \"DEMO_WH\",\n \"user\": \"DEV_USER\"\n }\n }\n ```\n\n3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`.\n\n **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\n * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"databases\":[\"DB1\", \"DB2\"],\n \"externalDatabases\":[\n\n ]\n }\n ```\n\nThe optional `databases` property in `data_warehouse_config` accepts a list of database names. When specified, ThoughtSpot persists this list on the connection and uses it to scope metadata fetching to only the specified databases in subsequent table add and remove operations. If omitted, all databases in the data warehouse are accessible for metadata operations.\n\nThe `databases` and `externalDatabases` serve different purposes. `databases` is a flat list of database names that controls which databases are scanned during metadata operations. `externalDatabases` defines the full table hierarchy and determines which tables are linked into ThoughtSpot.\n\n\n\n\n\n#### Endpoint URL\n"
tags:
- Connections
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateConnectionV2Request'
required: true
parameters:
- in: path
name: connection_identifier
required: true
schema:
type: string
description: Unique ID or name of the connection.
responses:
'204':
description: Connection successfully updated.
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden access.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
SortOptionInput:
type: object
properties:
field_name:
type: string
enum:
- NAME
- DISPLAY_NAME
- AUTHOR
- CREATED
- MODIFIED
- LAST_ACCESSED
- SYNCED
- VIEWS
- USER_STATE
- ROW_COUNT
description: Name of the field to apply the sort on.
nullable: true
order:
type: string
enum:
- ASC
- DESC
description: 'Sort order : ASC(Ascending) or DESC(Descending).'
nullable: true
ConnectionInput:
type: object
properties:
identifier:
type: string
description: Unique ID or name of the connection.
nullable: true
name_pattern:
type: string
description: A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match.
nullable: true
data_warehouse_objects:
type: array
items:
$ref: '#/components/schemas/DataWarehouseObjectInput'
description: Filter options for databases, schemas, tables and columns.
nullable: true
CreateConnectionResponse:
type: object
required:
- id
- name
- data_warehouse_type
properties:
id:
type: string
description: ID of the connection created.
name:
type: string
description: Name of the connection.
data_warehouse_type:
type: string
enum:
- SNOWFLAKE
- AMAZON_REDSHIFT
- GOOGLE_BIGQUERY
- AZURE_SYNAPSE
- TERADATA
- SAP_HANA
- STARBURST
- ORACLE_ADW
- DATABRICKS
- DENODO
- DREMIO
- TRINO
- PRESTO
- POSTGRES
- SQLSERVER
- MYSQL
- GENERIC_JDBC
- AMAZON_RDS_POSTGRESQL
- AMAZON_AURORA_POSTGRESQL
- AMAZON_RDS_MYSQL
- AMAZON_AURORA_MYSQL
- LOOKER
- AMAZON_ATHENA
- SINGLESTORE
- GCP_SQLSERVER
- GCP_ALLOYDB_POSTGRESQL
- GCP_POSTGRESQL
- GCP_MYSQL
- MODE
- GOOGLE_SHEETS
- FALCON
- FALCON_ONPREM
- CLICKHOUSE
- IOMETE
description: Type of data warehouse.
details:
type: object
description: Details of the connection.
nullable: true
ErrorResponse:
type: object
properties:
error:
type: object
nullable: true
SyncMetadataResponse:
type: object
properties:
status:
type: string
enum:
- SUCCESS
- PARTIAL_SUCCESS
- NO_UPDATE
description: Overall status of the sync operation.
nullable: true
tables_updated:
type: integer
format: int32
description: Number of tables with metadata updates.
nullable: true
columns_updated:
type: integer
format: int32
description: Number of columns with metadata updates.
nullable: true
tables_failed:
type: integer
format: int32
description: Number of tables that failed to sync (for PARTIAL_SUCCESS).
nullable: true
columns_failed:
type: integer
format: int32
description: Number of columns that failed to sync (for PARTIAL_SUCCESS).
nullable: true
message:
type: string
description: Message describing the result.
nullable: true
description: Response from sync metadata operation.
RevokeRefreshTokensResponse:
type: object
required:
- data
properties:
data:
type: string
description: Result message describing the outcome of the refresh token revocation operation.
Database:
type: object
required:
- name
properties:
name:
type: string
description: Name of the database.
schemas:
type: array
items:
$ref: '#/components/schemas/SchemaObject'
description: Schemas of the database.
nullable: true
auto_created:
type: boolean
description: Determines if the object is auto created.
nullable: true
RevokeRefreshTokensRequest:
type: object
properties:
configuration_identifiers:
description: Unique ID or name of the configuration. When provided, the refresh tokens of the users associated with the connection configuration will be revoked.
type: array
items:
type: string
user_identifiers:
description: Unique ID or name of the users. When provided, the refresh tokens of the specified users will be revoked. If the request includes the user ID or name of the connection author, their token will also be revoked.
type: array
items:
type: string
org_identifiers:
description: Unique ID or name of the Org. When provided, the refresh tokens of all users associated with the published connection in the Org will be revoked. This parameter is valid only for published connections. Using it with unpublished connections will result in an error.
type: array
items:
type: string
UpdateConnectionRequest:
type: object
properties:
connection_identifier:
description: Unique ID or name of the connection.
type: string
name:
description: Updated name of the connection.
type: string
description:
description: Updated description of the connection.
type: string
data_warehouse_config:
description: Configuration of the data warehouse in JSON.
type: object
validate:
description: Indicates whether to validate the connection details.
default: true
type: boolean
nullable: true
required:
- connection_identifier
DataWarehouseObjectInput:
type: object
properties:
database:
type: string
description: Name of the database.
nullable: true
schema:
type: string
description: Name of the schema within the database.
nullable: true
table:
type: string
description: Name of the table within the schema.
nullable: true
column:
type: string
description: Name of the column within the table.
nullable: true
FetchConnectionDiffStatusResponse:
type: object
properties:
status:
type: boolean
description: Status of the connection diff.
nullable: true
SchemaObject:
type: object
required:
- name
properties:
name:
type: string
description: Name of the schema.
tables:
type: array
items:
$ref: '#/components/schemas/Table'
description: Tables in the schema.
nullable: true
SearchConnectionResponse:
type: object
required:
- id
- name
- data_warehouse_type
properties:
id:
type: string
description: Unique ID of the connection.
name:
type: string
description: Name of the connection.
obj_id:
type: string
description: 'Custom object ID (obj_id) of the connection, if one is set.
Version: 26.9.0.cl or later'
nullable: true
description:
type: string
description: Description of the connection.
nullable: true
data_warehouse_type:
type: string
enum:
- SNOWFLAKE
- AMAZON_REDSHIFT
- GOOGLE_BIGQUERY
- AZURE_SYNAPSE
- TERADATA
- SAP_HANA
- STARBURST
- ORACLE_ADW
- DATABRICKS
- DENODO
- DREMIO
- TRINO
- PRESTO
- POSTGRES
- SQLSERVER
- MYSQL
- GENERIC_JDBC
- AMAZON_RDS_POSTGRESQL
- AMAZON_AURORA_POSTGRESQL
- AMAZON_RDS_MYSQL
- AMAZON_AURORA_MYSQL
- LOOKER
- AMAZON_ATHENA
- SINGLESTORE
- GCP_SQLSERVER
- GCP_ALLOYDB_POSTGRESQL
- GCP_POSTGRESQL
- GCP_MYSQL
- MODE
- GOOGLE_SHEETS
- FALCON
- FALCON_ONPREM
- CLICKHOUSE
- IOMETE
description: Type of data warehouse.
data_warehouse_objects:
$ref: '#/components/schemas/DataWarehouseObjects'
description: List of Data warehouse objects
nullable: true
details:
type: object
description: Details of the connection.
nullable: true
UpdateConnectionV2Request:
type: object
properties:
name:
description: Updated name of the connection.
type: string
description:
description: Updated description of the connection.
type: string
data_warehouse_config:
description: Configuration of the data warehouse in JSON.
type: object
validate:
description: Indicates whether to validate the connection details.
default: true
type: boolean
nullable: true
UpdateConnectionStatusRequest:
type: object
properties:
status:
description: Status to set for the connection. Use ACTIVATED to enable the connection or DEACTIVATED to disable it.
default: ACTIVATED
type: string
enum:
- ACTIVATED
- DEACTIVATED
Column:
type: object
required:
- name
- data_type
properties:
name:
type: string
description: Name of the column
data_type:
type: string
description: Data type of the column
is_aggregate:
type: string
description: Determines if the column schema is an aggregate
nullable: true
can_import:
type: boolean
description: Determines if the column schema can be imported
nullable: true
selected:
type: boolean
description: Determines if the table is selected
nullable: true
is_linked_active:
type: boolean
description: Determines if the table is linked
nullable: true
DataWarehouseObjects:
type: object
required:
- databases
properties:
databases:
type: array
items:
$ref: '#/components/schemas/Database'
description: Databases of the connection.
CreateConnectionRequest:
type: object
properties:
name:
description: Unique name for the connection.
type: string
description:
description: Description of the connection.
type: string
data_warehouse_type:
description: Type of the data warehouse.
type: string
enum:
- SNOWFLAKE
- AMAZON_REDSHIFT
- GOOGLE_BIGQUERY
- AZURE_SYNAPSE
- TERADATA
- SAP_HANA
- STARBURST
- ORACLE_ADW
- DATABRICKS
- DENODO
- DREMIO
- TRINO
- PRESTO
- POSTGRES
- SQLSERVER
- MYSQL
- GENERIC_JDBC
- AMAZON_RDS_POSTGRESQL
- AMAZON_AURORA_POSTGRESQL
- AMAZON_RDS_MYSQL
- AMAZON_AURORA_MYSQL
- LOOKER
- AMAZON_ATHENA
- SINGLESTORE
- GCP_SQLSERVER
- GCP_ALLOYDB_POSTGRESQL
- GCP_POSTGRESQL
- GCP_MYSQL
- MODE
- GOOGLE_SHEETS
- FALCON
- FALCON_ONPREM
- CLICKHOUSE
- IOMETE
data_warehouse_config:
description: Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON.
type: object
validate:
description: Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`.
default: true
type: boolean
nullable: true
required:
- name
- data_warehouse_type
- data_warehouse_config
SearchConnectionRequest:
type: object
properties:
connections:
description: List of connections and name pattern
type: array
items:
$ref: '#/components/schemas/ConnectionInput'
data_warehouse_types:
description: Array of types of data warehouse defined for the connection.
type: array
items:
type: string
enum:
- SNOWFLAKE
- AMAZON_REDSHIFT
- GOOGLE_BIGQUERY
- AZURE_SYNAPSE
- TERADATA
- SAP_HANA
- STARBURST
- ORACLE_ADW
- DATABRICKS
- DENODO
- DREMIO
- TRINO
- PRESTO
- POSTGRES
- SQLSERVER
- MYSQL
- GENERIC_JDBC
- AMAZON_RDS_POSTGRESQL
- AMAZON_AURORA_POSTGRESQL
- AMAZON_RDS_MYSQL
- AMAZON_AURORA_MYSQL
- LOOKER
- AMAZON_ATHENA
- SINGLESTORE
- GCP_SQLSERVER
- GCP_ALLOYDB_POSTGRESQL
- GCP_POSTGRESQL
- GCP_MYSQL
- MODE
- GOOGLE_SHEETS
- FALCON
- FALCON_ONPREM
- CLICKHOUSE
- IOMETE
record_offset:
description: The starting record number from where the records should be included.
default: 0
type: integer
format: int32
record_size:
description: The number of records that should be included.
default: 10
type: integer
format: int32
tag_identifiers:
description: Unique ID or name of tags.
type: array
items:
type: string
data_warehouse_object_type:
description: Data warehouse object type.
type: string
enum:
- DATABASE
- SCHEMA
- TABLE
- COLUMN
sort_options:
description: Sort options.
allOf:
- $ref: '#/components/schemas/SortOptionInput'
include_details:
description: Indicates whether to include complete details of the connection objects.
type: boolean
nullable: true
configuration:
description: 'Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {"warehouse":"SMALL_WH","database":"DEVELOPMENT"}. This is only applicable when data_warehouse_object_type is selected.'
type: object
authentication_type:
description: List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected.
default: SERVICE_ACCOUNT
type: string
enum:
- SERVICE_ACCOUNT
- OAUTH
- IAM
- EXTOAUTH
- OAUTH_WITH_SERVICE_PRINCIPAL
- PERSONAL_ACCESS_TOKEN
- KEY_PAIR
- OAUTH_WITH_PKCE
- EXTOAUTH_WITH_PKCE
- OAUTH_WITH_PEZ
- OAUTH_CLIENT_CREDENTIALS
- OAUTH_CLIENT_CREDENTIALS_WITH_X509
show_resolved_parameters:
description: '