Data connection APIs

Data connection APIs

ThoughtSpot supports connecting to external data warehouses and using these as data sources for analytics and visualizations. ThoughtSpot users can run a live query of the data directly from the following external data sources to generate the information they need:

  • Amazon Redshift

  • Azure Synapse

  • Databricks

  • Dremio

  • Denodo

  • Google BigQuery

  • Oracle ADW

  • Presto

  • SAP HANA

  • Snowflake

  • Starburst

  • Teradata

  • Trino

The connection API endpoints allow you to create, edit, delete, export, and query data connections on a ThoughtSpot cluster.

This article describes the procedures for setting and managing data connections through the REST APIs. For information about how to set up a data connection in the ThoughtSpot UI, see Data Connections in ThoughtSpot.

Supported operations🔗

API endpointAvailable from

POST /tspublic/v1/connection/create
Creates a data connection.

ThoughtSpot Cloud ts7.sep.cl
ThoughtSpot Software 7.2.1

POST /tspublic/v1/connection/update
Modifies a data connection.

ThoughtSpot Cloud ts7.sep.cl
ThoughtSpot Software 7.2.1

GET /tspublic/v1/connection/types
Gets a list of data connections that are currently operational on the ThoughtSpot cluster.

ThoughtSpot Cloud ts7.aug.cl
ThoughtSpot Software 7.1.1

GET /tspublic/v1/connection/list
Gets a list of data connections set up for a live query service on the ThoughtSpot cluster.

ThoughtSpot Cloud ts7.aug.cl
ThoughtSpot Software 7.1.1

POST /tspublic/v1/connection/fetchConnection
Gets metadata for a given connection ID.

ThoughtSpot Cloud 8.2.0.cl
ThoughtSpot Software 8.4.1-sw

POST /tspublic/v1/connection/fetchLiveColumns
Gets tables and column metadata a given connection ID.

ThoughtSpot Cloud 8.2.0.cl
ThoughtSpot Software 8.4.1-sw

GET /tspublic/v1/connection/export
Exports a data connection map.

ThoughtSpot Cloud ts7.sep.cl
ThoughtSpot Software 7.2.1

POST /tspublic/v1/connection/delete
Deletes the specified data connections.

ThoughtSpot Cloud ts7.sep.cl
ThoughtSpot Software 7.2.1

Required permissions🔗

You must have data management permissions to create, edit, delete or query data connection objects. Make sure your user account has the DATAMANAGEMENT privilege.

Connection metadata🔗

To create or modify data connections through REST APIs, you need to provide a map of JSON attributes as metadata. The metadata JSON includes configuration attributes and a map of the database schema with tables.

Example JSON for connection metadata
Connection metadata

Configuration attributes🔗

The configuration attributes include authentication and database information required to set up or update a data connection. For most data connections, you can use service account or OAuth credentials to connect to and fetch data from a Cloud Data Warehouse. The Teradata, Oracle, and Presto data connections do not support OAuth. The Snowflake connections also support external OAuth credentials with Microsoft Azure AD or Okta.

To set up connections with OAuth, make sure your connection metadata includes client ID, client secret key, auth URL, and access token URL.

Amazon Redshift connection
  • host

    String. The hostname of the database connection.

  • port

    Integer. Enter the port number associated with the database. The default port is 5439.

  • user

    String. Username of your Redshift account.

  • password

    String. Password of your Redshift account.

  • database

    String. Specify the name of the database that you want to use for live query..

Azure Synapse connection
  • host

    String. The hostname of the database connection.

  • port

    Integer. Enter the port number associated with the database.

  • user

    String. Username of your Azure Synapse account.

  • password

    String. Password of your Azure Synapse account.

  • database

    String. Specify the database associated with the account.

Databricks connection
  • host

    String. The hostname of the database connection. For example, dbs.example.cloud.databricks.com.

  • http_path

    String. The HTTP path of your Databricks connection host.

  • user

    String. Username of your Databricks account.

  • password

    String. Password of your Databricks account.

Dremio connection
  • host

    String. The hostname of Dremio server.

  • port

    String. Dremio server port.

  • user

    String. Username of the Dremio server account.

  • password

    String. Password of the Dremio server account.

  • database

    String. The database associated with the account.

Denodo connection NEW in 8.6.0.cl
  • host

    String. The hostname of Denodo server.

  • port

    String. Denodo server port.

  • user

    String. Username of the Denodo server account.

  • password

    String. Password of the Denodo server account.

  • database

    String. The database associated with the account.

The following example shows the connection metadata JSON for a Denodo connection:

{
  "configuration": {
    "host": "10.79.153.40",
    "port": "9999",
    "user": "admin",
    "password": "admin",
    "database": "thoughtspot_sales"
  },
  "externalDatabases": [
  ]
}
Google BigQuery connection
  • project_id

    String. ID of the project associated with your BigQuery account.

  • oauth_pvt_key

    String. The secret key obtained for your BigQuery service account. To obtain the secret key, you must create a custom role in BigQuery and set up your service account. For more information, see BigQuery prerequisites.

Oracle ADW connection
  • user

    String. Username of your Oracle ADW account.

  • password

    String. Password of your Oracle ADW account.

  • net_service_name

    String. The Net Service Name of your Oracle ADW account.

  • tns_admin

    String. The ID of the directory specified by the TNS_ADMIN environment variable.

  • schema

    String. The schema of the database.

Presto connection
  • host

    String. Hostname of the Presto database.

  • user

    String. Username of your Presto database user.

  • password

    String. Password of your Presto database user.

  • database

    String. The database to fetch tables from.

SAP HANA connection
  • host

    String. The hostname of the SAP HANA database connection. For example, if your host is 192.168.1.1, and your port is 8080, specify 192.168.1.1:8080.

  • user

    String. Username of your SAP HANA database account.

  • password

    String. Password of your SAP HANA database account.

  • database

    String. The database from which you want to fetch tables.

Starburst connection
  • host

    String. Hostname of the database connection.

  • user

    String. Username of your Starburst account.

  • password

    String. Password of your Starburst account.

  • database

    String. The database from which you want to fetch tables.

Snowflake connection
  • accountName

    String. The service account name associated with the Snowflake connection.

  • user

    String. The Snowflake account username.

  • password

    String. The password of your Snowflake account.

  • role

    String. The role assigned to your user account. For example, sysadmin.

    Make sure the role you specify for this attribute has privileges to access the database, schema, and tables that you want to use for the live query service.

  • warehouse

    String. Data warehouse from which you want to fetch data.

Teradata connection
  • host

    String. The hostname of the database connection.

  • user

    String. Username of the Teradata database user.

  • password

    String. Password of the Teradata database user.

  • database

    String. Database from which you want to fetch tables.

Trino connection
  • host

    String. Hostname of the Trino database.

  • user

    String. Username of the Trino database user.

  • password

    String. Password of the Trino database user.

  • database

    String. The Database from which you want to fetch tables.

Add a data connection for live query service🔗

ThoughtSpot supports connecting to external data warehouses and using these as data sources for analytics and visualizations. To create a connection to an external data source and set up a live query service, use the /tspublic/v1/connection/create API endpoint.

Resource URL🔗

POST /tspublic/v1/connection/create

Request parameters🔗

Form parameterDescription

name

String. Name of the connection.

description

String A short description of data connection.

type

String. Type of the data connection. For example, RDBMS_SNOWFLAKE, RDBMS_REDSHIFT.

Valid values for type map to the name property in the API response returned by the /tspublic/v1/connection/types API endpoint.

createEmpty

Boolean. Allows creating a connection without tables. If you want to store only the configuration attributes and import tables later, you can set this attribute to true. The default value is false.

metadata

String. A JSON map of the connection metadata. The metadata must include configuration attributes, database, schema, and table objects. However, you can create a connection without tables by setting the createEmpty attribute to true.

state

Integer. The GUID of the OAuth redirect URI. This attribute is automatically populated and cannot be set by users.

Example request🔗

cURL
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded'  \
--header 'Accept: application/json'  \
--header 'X-Requested-By: ThoughtSpot' \
-d 'name=Snowflake&description=Snowflake_connection&type=RDBMS_SNOWFLAKE&metadata=<metadata-JSON-map>' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/create'
Request URL
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/create

Example metadata JSON without tables🔗

The following example shows the metadata JSON map for creating a Snowflake data connection without tables.

{
   "configuration":{
      "accountName":"thoughtspot_partner",
      "user":"tsadmin",
      "password":"TestConn123",
      "role":"sysadmin",
      "warehouse":"MEDIUM_WH"
   },
   "externalDatabases":[

   ]
}

Example metadata JSON with tables🔗

The following example shows the metadata JSON map for creating a Snowflake data connection. Note that the example shows the configuration attributes required to authenticate to the data source, and the object metadata (database, schema, and tables) to add to the connection.

{
   "configuration":{
      "accountName":"thoughtspot_partner",
      "user":"tsadmin",
      "password":"TestConn123",
      "role":"sysadmin",
      "warehouse":"MEDIUM_WH"
   },
   "externalDatabases":[
      {
         "name":"AllDatatypes",
         "isAutoCreated":false,
         "schemas":[
            {
               "name":"alldatatypes",
               "tables":[
                  {
                     "name":"allDatatypes",
                     "type":"TABLE",
                     "description":"",
                     "selected":true,
                     "linked":true,
                     "columns":[
                        {
                           "name":"CNUMBER",
                           "type":"INT64",
                           "canImport":true,
                           "selected":true,
                           "isLinkedActive":true,
                           "isImported":false,
                           "tableName":"allDatatypes",
                           "schemaName":"alldatatypes",
                           "dbName":"AllDatatypes"
                        },
                        {
                           "name":"CDECIMAL",
                           "type":"INT64",
                           "canImport":true,
                           "selected":true,
                           "isLinkedActive":true,
                           "isImported":false,
                           "tableName":"allDatatypes",
                           "schemaName":"alldatatypes",
                           "dbName":"AllDatatypes"
                        }
                     ]
                  }
               ]
            }
         ]
      }
   ]
}

Example response🔗

If the connection creation is successful, the API returns a response body with the connection metadata header:

{
  "header": {
    "id": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
    "indexVersion": 0,
    "generationNum": 0,
    "name": "TEST_conn_1",
    "description": "TEST_conn_private_1",
    "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
    "created": 1632118531177,
    "modified": 1632118531177,
    "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
    "owner": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
    "tags": [],
    "isExternal": false,
    "isDeprecated": false
  },
  "type": "RDBMS_SNOWFLAKE",
  "authenticationType": "SERVICE_ACCOUNT",
  "logicalTableList": [
    {
      "columns": [
        {
          "physicalColumnGUID": "61d10324-ac22-43e2-8623-fa96f503bab5",
          "position": 0,
          "header": {
            "id": "fd718c83-5e9c-45ae-a4cd-1cb13b03db2f",
            "indexVersion": 381,
            "generationNum": 384,
            "name": "CNUMBER",
            "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
            "created": 1632118531988,
            "modified": 1632118532985,
            "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
            "owner": "b0248372-5e68-4815-8682-67715456efb2",
            "isDeleted": false,
            "isHidden": false,
            "schemaStripe": "AllDatatypes_alldatatypes_dMSAHvi",
            "databaseStripe": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
            "tags": [],
            "isExternal": false,
            "isDeprecated": false
          },
          "complete": true,
          "incompleteDetail": [],
          "isDerived": false,
          "dataType": "INT64",
          "type": "MEASURE",
          "defaultAggrType": "SUM",
          "physicalColumnName": "CNUMBER",
          "ownerName": "allDatatypes",
          "ownerType": "ONE_TO_ONE_LOGICAL",
          "entityCategory": "DEFAULT",
          "columnMappingInfo": {
            "columnName": "CNUMBER"
          },
          "spotiqPreference": "DEFAULT",
          "isAdditive": true,
          "indexType": "DONT_INDEX",
          "indexPriority": 1,
          "sources": [],
          "synonyms": [],
          "customActionTags": [],
          "injectedInlineValues": [],
          "precision": -1,
          "scale": 0,
          "schemaVersion": "4",
          "isPrimaryKey": false,
          "isAttributionDimension": true
        },
        {
          "physicalColumnGUID": "86c34243-9637-4737-993f-6ed30d3e682c",
          "position": 1,
          "header": {
            "id": "6eed0b58-d195-4236-a376-f135f9b24204",
            "indexVersion": 381,
            "generationNum": 384,
            "name": "CDECIMAL",
            "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
            "created": 1632118531988,
            "modified": 1632118532985,
            "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
            "owner": "b0248372-5e68-4815-8682-67715456efb2",
            "isDeleted": false,
            "isHidden": false,
            "schemaStripe": "AllDatatypes_alldatatypes_dMSAHvi",
            "databaseStripe": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
            "tags": [],
            "isExternal": false,
            "isDeprecated": false
          },
          "complete": true,
          "incompleteDetail": [],
          "isDerived": false,
          "dataType": "INT64",
          "type": "MEASURE",
          "defaultAggrType": "SUM",
          "physicalColumnName": "CDECIMAL",
          "ownerName": "allDatatypes",
          "ownerType": "ONE_TO_ONE_LOGICAL",
          "entityCategory": "DEFAULT",
          "columnMappingInfo": {
            "columnName": "CDECIMAL"
          },
          "spotiqPreference": "DEFAULT",
          "isAdditive": true,
          "indexType": "DONT_INDEX",
          "indexPriority": 1,
          "sources": [],
          "synonyms": [],
          "customActionTags": [],
          "injectedInlineValues": [],
          "precision": -1,
          "scale": 0,
          "schemaVersion": "4",
          "isPrimaryKey": false,
          "isAttributionDimension": true
        }
      ],
      "tableFilters": [],
      "physicalTableVersion": 0,
      "logicalTableContent": {
        "joinType": "INNER",
        "joinOverrides": {},
        "physicalTableName": "allDatatypes",
        "worksheetType": "VIEW",
        "isAggregatedWorksheet": false,
        "bypassRLS": false,
        "shardingInfo": {
          "primaryKeyColumns": [],
          "shardingKeyColumns": [],
          "numberOfShards": 0
        },
        "tableMappingInfo": {
          "databaseName": "AllDatatypes",
          "schemaName": "alldatatypes",
          "tableName": "allDatatypes",
          "tableType": "TABLE",
          "cachingInfo": {
            "isCached": false,
            "lastLoadTime": 0,
            "type": "UNKNOWN"
          }
        },
        "isOptimized": false,
        "schemaVersion": "4"
      },
      "type": "ONE_TO_ONE_LOGICAL",
      "generationType": "DEFAULT",
      "physicalTableGUID": "14b7589b-8a98-4786-a0c5-0396e05b91ba",
      "relationships": [],
      "dataSourceId": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
      "dataSourceTypeEnum": "DEFAULT",
      "header": {
        "id": "b0248372-5e68-4815-8682-67715456efb2",
        "indexVersion": 381,
        "generationNum": 382,
        "name": "allDatatypes",
        "description": "",
        "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
        "authorName": "su",
        "authorDisplayName": "Administrator Super-User",
        "created": 1632118531988,
        "modified": 1632118532985,
        "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
        "owner": "b0248372-5e68-4815-8682-67715456efb2",
        "isDeleted": false,
        "isHidden": false,
        "schemaStripe": "AllDatatypes_alldatatypes_dMSAHvi",
        "databaseStripe": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
        "tags": [],
        "type": "ONE_TO_ONE_LOGICAL",
        "isExternal": true,
        "isDeprecated": false
      },
      "complete": true,
      "incompleteDetail": [],
      "destinationRelationships": [],
      "relationshipsWithin": "",
      "isCached": false
    }
  ],
  "dataSourceContent": {
    "statistics": {},
    "dataLoadInfo": {
      "tableToTaskIdMap": {}
    },
    "schemaVersion": "4",
    "configuration": {
      "password": "",
      "role": "DEVELOPER",
      "warehouse": "MEDIUM_WH",
      "accountName": "thoughtspot_partner",
      "user": "tsadmin"
    }
  }
}

Response codes🔗

HTTP status codeDescription

200

Successful creation of the connection object

401

Unauthorized or wrong credentials

500

The connection could not be created

Edit an existing data connection🔗

To update or modify the connection attributes of a data connection, use the /tspublic/v1/connection/update API.

Resource URL🔗

POST /tspublic/v1/connection/update

Request parameters🔗

Form parameterDescription

name

String. Name of the connection.

description

String. The description of the data connection.

type

String. Type of the data connection. For example, RDBMS_SNOWFLAKE, RDBMS_REDSHIFT. Valid values for type map to the name attribute from the in the response to the /tspublic/v1/connection/types API endpoint.

createEmpty

Boolean. Allows updating a connection without importing tables. If you want to update only the configuration attributes, you can set this attribute to true. The default value is false.

metadata

String. A JSON map of the connection metadata. The metadata must include configuration attributes, database, schema, and table objects. However, if the createEmpty attribute to true, you can update the connection attributes without importing tables.

id

String. The GUID of the data connection that you want to modify.

metadata

String. A JSON map of the connection attributes.

state

Integer. The GUID of the OAuth redirect URI. This attribute is automatically populated and cannot be set by users.

Example request🔗

cURL
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
-d 'name=Snow_TEST&description=Test_connection&type=RDBMS_SNOWFLAKE&id=9114f105-fc9e-48c9-a8f1-57f2fda4f056&metadata=<metadata-JSON-map>' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/update'
Request URL
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/update

Example metadata JSON without tables🔗

The following example shows the metadata JSON map for modifying a Snowflake connection without importing tables.

{
   "configuration":{
      "accountName":"thoughtspot_partner",
      "user":"tsadmin",
      "password":"Embrace123",
      "role":"sysadmin",
      "warehouse":"MEDIUM_WH"
   },
   "externalDatabases":[

   ]
}

Example metadata JSON with tables🔗

The following example shows the metadata JSON for modifying a Snowflake data connection. Note that the example shows the configuration attributes to authenticate to the data source, tables, and column data for connection modification.

{
   "configuration":{
      "accountName":"thoughtspot_partner",
      "user":"tsadmin",
      "password":"Embrace123",
      "role":"sysadmin",
      "warehouse":"MEDIUM_WH"
   },
   "externalDatabases":[
      {
         "name":"AllDatatypes",
         "isAutoCreated":false,
         "schemas":[
            {
               "name":"alldatatypes",
               "tables":[
                  {
                     "name":"allDatatypes",
                     "type":"TABLE",
                     "description":"",
                     "selected":true,
                     "linked":true,
                     "columns":[
                        {
                           "name":"CDECIMAL",
                           "type":"INT64",
                           "canImport":false,
                           "selected":true,
                           "isLinkedActive":true,
                           "isImported":false,
                           "tableName":"allDatatypes",
                           "schemaName":"alldatatypes",
                           "dbName":"AllDatatypes"
                        },
                        {
                           "name":"CBIGINT",
                           "type":"INT64",
                           "canImport":false,
                           "selected":false,
                           "isLinkedActive":true,
                           "isImported":false,
                           "tableName":"allDatatypes",
                           "schemaName":"alldatatypes",
                           "dbName":"AllDatatypes"
                        }
                     ]
                  }
               ]
            }
         ]
      }
   ]
}

Example response🔗

If the connection modification is successful, the API returns a response body with the updated details:

{
  "dataSource": {
    "header": {
      "id": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
      "indexVersion": 385,
      "generationNum": 385,
      "name": "TEST_conn_1",
      "description": "TEST_conn_private_1",
      "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
      "authorName": "tsadmin",
      "authorDisplayName": "Administrator",
      "created": 1632118531177,
      "modified": 1632118751633,
      "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
      "owner": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
      "isDeleted": false,
      "isHidden": false,
      "isAutoCreated": false,
      "statistics": {
        "dataLoadStatistics": {
          "scheduled": false,
          "connectionType": "",
          "connectionDisplayName": "",
          "dataLoadStatusList": [],
          "header": {
            "id": "a2352b8c-e85e-4d58-8f6a-ac42c0252f2d",
            "indexVersion": 385,
            "generationNum": 385,
            "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
            "owner": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
            "isDeleted": false,
            "isHidden": false,
            "tags": [],
            "isExternal": false,
            "isDeprecated": false
          },
          "complete": true,
          "incompleteDetail": []
        }
      },
      "tags": [],
      "isExternal": false,
      "isDeprecated": false
    },
    "type": "RDBMS_SNOWFLAKE",
    "authenticationType": "SERVICE_ACCOUNT",
    "logicalTableList": [
      {
        "columns": [
          {
            "physicalColumnGUID": "86c34243-9637-4737-993f-6ed30d3e682c",
            "position": 1,
            "header": {
              "id": "6eed0b58-d195-4236-a376-f135f9b24204",
              "indexVersion": 382,
              "generationNum": 382,
              "name": "CDECIMAL",
              "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
              "created": 1632118531988,
              "modified": 1632118532985,
              "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
              "owner": "b0248372-5e68-4815-8682-67715456efb2",
              "isDeleted": false,
              "isHidden": false,
              "schemaStripe": "AllDatatypes_alldatatypes_dMSAHvi",
              "databaseStripe": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
              "tags": [],
              "isExternal": false,
              "isDeprecated": false
            },
            "complete": true,
            "incompleteDetail": [],
            "isDerived": false,
            "dataType": "INT64",
            "type": "MEASURE",
            "defaultAggrType": "SUM",
            "physicalColumnName": "CDECIMAL",
            "ownerName": "allDatatypes",
            "ownerType": "ONE_TO_ONE_LOGICAL",
            "entityCategory": "DEFAULT",
            "columnMappingInfo": {
              "columnName": "CDECIMAL"
            },
            "spotiqPreference": "DEFAULT",
            "isAdditive": true,
            "indexType": "DONT_INDEX",
            "indexPriority": 1,
            "sources": [],
            "synonyms": [],
            "customActionTags": [],
            "injectedInlineValues": [],
            "precision": -1,
            "scale": 0,
            "isPrimaryKey": false,
            "isAttributionDimension": true
          }
        ],
        "tableFilters": [],
        "physicalTableVersion": 0,
        "logicalTableContent": {
          "joinType": "INNER",
          "joinOverrides": {},
          "physicalTableName": "allDatatypes",
          "worksheetType": "VIEW",
          "isAggregatedWorksheet": false,
          "bypassRLS": false,
          "shardingInfo": {
            "primaryKeyColumns": [],
            "shardingKeyColumns": [],
            "numberOfShards": 0
          },
          "tableMappingInfo": {
            "databaseName": "AllDatatypes",
            "schemaName": "alldatatypes",
            "tableName": "allDatatypes",
            "tableType": "TABLE",
            "cachingInfo": {
              "isCached": false,
              "lastLoadTime": 0,
              "type": "UNKNOWN"
            }
          },
          "isOptimized": false
        },
        "type": "ONE_TO_ONE_LOGICAL",
        "generationType": "DEFAULT",
        "physicalTableGUID": "14b7589b-8a98-4786-a0c5-0396e05b91ba",
        "relationships": [],
        "dataSourceId": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
        "dataSourceTypeEnum": "RDBMS_SNOWFLAKE",
        "header": {
          "id": "b0248372-5e68-4815-8682-67715456efb2",
          "indexVersion": 384,
          "generationNum": 384,
          "name": "allDatatypes",
          "description": "",
          "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
          "authorName": "tsadmin",
          "authorDisplayName": "Administrator",
          "created": 1632118531988,
          "modified": 1632118532985,
          "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
          "owner": "b0248372-5e68-4815-8682-67715456efb2",
          "isDeleted": false,
          "isHidden": false,
          "schemaStripe": "AllDatatypes_alldatatypes_dMSAHvi",
          "databaseStripe": "d19bec78-4e10-446a-b531-2a0e69c5e62f",
          "tags": [],
          "type": "ONE_TO_ONE_LOGICAL",
          "isExternal": true,
          "isDeprecated": false
        },
        "complete": true,
        "incompleteDetail": [],
        "destinationRelationships": [],
        "relationshipsWithin": "",
        "isCached": false
      }
    ],
    "dataSourceContent": {
      "statistics": {},
      "dataLoadInfo": {
        "tableToTaskIdMap": {}
      },
      "configuration": {
        "password": "",
        "role": "DEVELOPER",
        "warehouse": "MEDIUM_WH",
        "accountName": "thoughtspot_partner",
        "user": "tsadmin"
      }
    }
  },
  "deletedObjects": {
    "deleteStatus": "SUCCESS",
    "deleteFailTables": [],
    "deleteFailColumns": {}
  }
}

Response codes🔗

HTTP status codeDescription

200

Successful update operation

401

Unauthorized or wrong credentials

500

Invalid parameters

Get a list of data connections🔗

To get a list of data connections and their associated attributes, send a GET request to the /tspublic/v1/connection/types API endpoint.

Resource URL🔗

GET /tspublic/v1/connection/types

Request parameters🔗

None

Example request🔗

cURL
curl -X GET \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/types'
Request URL
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/types

Example response🔗

[
  {
    "name": "RDBMS_SNOWFLAKE",
    "displayName": "Snowflake",
    "description": "",
    "mode": "PRODUCTION",
    "beta": false,
    "enabled": true
  },
  {
    "name": "RDBMS_REDSHIFT",
    "displayName": "Amazon Redshift",
    "description": "",
    "mode": "PRODUCTION",
    "beta": false,
    "enabled": true
  },
  {
    "name": "RDBMS_GCP_BIGQUERY",
    "displayName": "Google BigQuery",
    "description": "",
    "mode": "PRODUCTION",
    "beta": false,
    "enabled": true
  },
  {
    "name": "RDBMS_AZURE_SQL_DATAWAREHOUSE",
    "displayName": "Azure Synapse",
    "description": "",
    "mode": "PRODUCTION",
    "beta": false,
    "enabled": true
  },
  {
    "name": "RDBMS_PRESTO",
    "displayName": "Starburst",
    "description": "",
    "mode": "PRODUCTION",
    "beta": false,
    "enabled": true
  },
  {
    "name": "RDBMS_ORACLE_ADW",
    "displayName": "Oracle ADW",
    "description": "",
    "mode": "PRODUCTION",
    "beta": false,
    "enabled": true
  },
  {
    "name": "RDBMS_DATABRICKS",
    "displayName": "Databricks",
    "description": "",
    "mode": "PRODUCTION",
    "beta": false,
    "enabled": true
  }
]

Response codes🔗

HTTP status codeDescription

200

Successful retrieval of connection types

401

Unauthorized or wrong credentials

500

No data connections set up on the cluster

Get a list of live query connections🔗

To get a list of data connections that are set up as data sources for live query, send a GET request to the GET /tspublic/v1/connection/list API endpoint.

Resource URL🔗

GET /tspublic/v1/connection/list

Request parameters🔗

Query parameterDescription

category Optional

String. Type of the live query object. Valid values are:

  • All

    Gets all live query objects set up on the cluster

  • MY

    Gets a list of live query objects that are set up on your cluster.

sort Optional

String. Sort order for the headers. Valid values are:

  • DEFAULT to use the default sort order in the response.

  • NAME to sort headers by the connection name.

  • DISPLAY_NAME to sort headers by the display name of the connections.

  • AUTHOR to sort the headers by the author who set up the live query connection.

  • CREATED to sort headers by the timestamp at which live query connections were set up.

  • MODIFIED to sort headers by the timestamp at which the live query connections were modified.

sortascending

Boolean. A flag to specify the sort order. A null value defines the default order.

  • To set an ascending order, specify true.

  • To set a descending order, specify false.

offset Optional

Integer. Batch offset to value to fetch page headers. The default value is -1, which implies first page.

batchsize Optional

Integer. Number of batches in which you want to fetch page headers in a single query. The default value is -1, which implies no pagination.

tagname Optional

Array of strings. A JSON array of tag names to filter response headers by tags. A tag is a label applied to a ThoughtSpot object.

pattern Optional

String. A pattern to match the name of the object. This parameter supports matching case-insensitive strings. For a wildcard match, use %.

Example request🔗

cURL
curl -X GET \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/list'
Request URL
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/list

Example response🔗

{
  "headers": [
    {
      "id": "c1f17251-b2b1-4230-b10b-c81254d5189f",
      "indexVersion": 149,
      "generationNum": 149,
      "name": "test",
      "description": "",
      "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
      "authorName": "tsadmin",
      "authorDisplayName": "Administrator",
      "created": 1625126133409,
      "modified": 1625126133410,
      "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
      "owner": "c1f17251-b2b1-4230-b10b-c81254d5189f",
      "isDeleted": false,
      "isHidden": false,
      "statistics": {
        "dataLoadStatistics": {
          "scheduled": false,
          "connectionType": "",
          "connectionDisplayName": "",
          "dataLoadStatusList": [],
          "header": {
            "id": "c4831f2f-c0a2-498b-9ac5-98b8bd222058",
            "indexVersion": 149,
            "generationNum": 149,
            "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
            "owner": "c1f17251-b2b1-4230-b10b-c81254d5189f",
            "isDeleted": false,
            "isHidden": false,
            "tags": [],
            "isExternal": false,
            "isDeprecated": false
          },
          "complete": true,
          "incompleteDetail": []
        }
      },
      "tags": [],
      "type": "RDBMS_SNOWFLAKE",
      "isExternal": false,
      "isDeprecated": false
    },
    {
      "id": "55bf4728-bea1-4e89-ae29-822413660daf",
      "indexVersion": 328,
      "generationNum": 328,
      "name": "testsnow",
      "description": "",
      "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
      "authorName": "tsadmin",
      "authorDisplayName": "Administrator",
      "created": 1625139996582,
      "modified": 1625139996583,
      "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
      "owner": "55bf4728-bea1-4e89-ae29-822413660daf",
      "isDeleted": false,
      "isHidden": false,
      "statistics": {
        "dataLoadStatistics": {
          "scheduled": false,
          "connectionType": "",
          "connectionDisplayName": "",
          "dataLoadStatusList": [],
          "header": {
            "id": "179697ab-5212-4da8-9508-e0550b7b2327",
            "indexVersion": 328,
            "generationNum": 328,
            "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
            "owner": "55bf4728-bea1-4e89-ae29-822413660daf",
            "isDeleted": false,
            "isHidden": false,
            "tags": [],
            "isExternal": false,
            "isDeprecated": false
          },
          "complete": true,
          "incompleteDetail": []
        }
      },
      "tags": [],
      "type": "RDBMS_SNOWFLAKE",
      "isExternal": false,
      "isDeprecated": false
    }
  ],
  "isLastBatch": true,
  "debugInfo": {}
}

Response codes🔗

HTTP status codeDescription

200

Successful retrieval of live query connections list

401

Unauthorized or wrong credentials

500

No live query connections on the cluster

Get details of a specific connection🔗

To get details of a specific data connection and its associated columns, send a POST request to the /tspublic/v1/connection/fetchConnection endpoint.

Resource URL🔗

POST /tspublic/v1/connection/fetchConnection

Request parameters🔗

Form Data ParameterDescription

id

String. GUID of the data connection.

includeColumns

Boolean. A flag to include or exclude column metadata in the API response. By default, the API returns data for all columns in the response.

config
Optional

String. Configuration attributes to override the connection metadata details in the API response. Use this attribute to query data from a specific database. For example, if your connection has a database named PROD, and you want to fetch details with the database name as DEVELOPMENT, you can define the config string as {"database":"DEVELOPMENT"}.

Note

Note that the config attribute does not update the connection metadata in the ThoughtSpot system. It only allows you to modify the metadata in the API response. To update a connection, you must use the /tspublic/v1/connection/update endpoint.

authentication_type

String. Type of authentication to use when fetching data from the Cloud Data Warehouse. Valid values are:

  • SERVICE_ACCOUNT
    For data connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data.

  • OAUTH
    For data connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data.
    ThoughtSpot data connections to Teradata, Oracle, and Presto Cloud Data Warehouse do not support the OAuth authentication type.

  • IAM
    For data connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only.

  • EXTOAUTH
    For data connections that have external OAuth set up. ThoughtSpot supports external OAuth with Microsoft Azure Active Directory (AD) and Okta for Snowflake data connections. For more information, see Configure Okta OAuth for a Snowflake connection and Configure Azure AD external OAuth for a Snowflake connection.

Example request🔗

cURL
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
-d 'id=abb64e33-1f06-4994-9af7-f6ea8729c9f1&includeColumns=false&config={"database":"RETAILAPPAREL-DEV"}' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/fetchConnection'
Request URL
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/fetchConnection

Example response🔗

Sample response with column data
{
  "type": "RDBMS_SNOWFLAKE",
  "authenticationType": "SERVICE_ACCOUNT",
  "externalDatabases": [
    {
      "name": "RETAILAPPAREL",
      "isAutoCreated": false,
      "schemas": [
        {
          "name": "INFORMATION_SCHEMA",
          "tables": [
            {
              "name": "APPLICABLE_ROLES",
              "type": "VIEW",
              "description": "The roles that can be applied to the current user.",
              "selected": false,
              "linked": true,
              "columns": [
                {
                  "name": "SCHEMA_NAME",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "FILE_NAME",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "LAST_LOAD_TIME",
                  "type": "DATE_TIME",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "STATUS",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "ROW_COUNT",
                  "type": "INT64",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "ROW_PARSED",
                  "type": "INT64",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "FIRST_ERROR_MESSAGE",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "FIRST_ERROR_LINE_NUMBER",
                  "type": "INT64",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "FIRST_ERROR_CHARACTER_POSITION",
                  "type": "INT64",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "FIRST_ERROR_COL_NAME",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "ERROR_COUNT",
                  "type": "INT64",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "ERROR_LIMIT",
                  "type": "INT64",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                }
              ],
              "relationships": []
            },
            {
              "name": "SCHEMATA",
              "type": "VIEW",
              "description": "The schemas defined in this database that are accessible to the current user's role.",
              "selected": false,
              "linked": true,
              "columns": [
                {
                  "name": "CATALOG_NAME",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "SCHEMA_NAME",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "SCHEMA_OWNER",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "IS_TRANSIENT",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "IS_MANAGED_ACCESS",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "RETENTION_TIME",
                  "type": "INT64",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "DEFAULT_CHARACTER_SET_CATALOG",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "DEFAULT_CHARACTER_SET_SCHEMA",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "DEFAULT_CHARACTER_SET_NAME",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "SQL_PATH",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "CREATED",
                  "type": "DATE_TIME",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "LAST_ALTERED",
                  "type": "DATE_TIME",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                },
                {
                  "name": "COMMENT",
                  "type": "VARCHAR",
                  "canImport": true,
                  "selected": false,
                  "isLinkedActive": true
                }
              ],
              "relationships": []
            },
            {
              "name": "FACT_RETAPP_SALES",
              "type": "TABLE",
              "description": "",
              "selected": true,
              "linked": true,
              "columns": [
                {
                  "name": "SALESID",
                  "type": "INT64",
                  "canImport": true,
                  "selected": true,
                  "isLinkedActive": true
                },
                {
                  "name": "PRODUCTID",
                  "type": "INT64",
                  "canImport": true,
                  "selected": true,
                  "isLinkedActive": true
                },
                {
                  "name": "STOREID",
                  "type": "INT64",
                  "canImport": true,
                  "selected": true,
                  "isLinkedActive": true
                },
                {
                  "name": "QUANTITYPURCHASED",
                  "type": "INT64",
                  "canImport": true,
                  "selected": true,
                  "isLinkedActive": true
                },
                {
                  "name": "ITEMPRICE",
                  "type": "DOUBLE",
                  "canImport": true,
                  "selected": true,
                  "isLinkedActive": true
                },
                {
                  "name": "SALES",
                  "type": "DOUBLE",
                  "canImport": true,
                  "selected": true,
                  "isLinkedActive": true
                },
                {
                  "name": "RECORDDATE",
                  "type": "DATE",
                  "canImport": true,
                  "selected": true,
                  "isLinkedActive": true
                }
              ],
              "relationships": []
            }
          ]
        }
      ]
    }
  ],
  "tables": [],
  "selectedTables": [],
  "selectedColumns": [],
  "configuration": {
    "password": "",
    "database": "RETAILAPPAREL-DEV",
    "role": "PUBLIC",
    "accountName": "coa41300.us-east-1",
    "warehouse": "DEMO_WH",
    "user": "tsuser"
  }
}
Sample response without column data
{
  "type": "RDBMS_SNOWFLAKE",
  "authenticationType": "SERVICE_ACCOUNT",
  "externalDatabases": [
    {
      "name": "RETAILAPPAREL",
      "isAutoCreated": false,
      "schemas": [
        {
          "name": "INFORMATION_SCHEMA",
          "tables": [
            {
              "name": "APPLICABLE_ROLES",
              "type": "VIEW",
              "description": "The roles that can be applied to the current user.",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            },
            {
              "name": "COLUMNS",
              "type": "VIEW",
              "description": "The columns of tables defined in this database that are accessible to the current user's role.",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            },
            {
              "name": "DATABASES",
              "type": "VIEW",
              "description": "The databases that are accessible to the current user's role.",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            },
            {
              "name": "ENABLED_ROLES",
              "type": "VIEW",
              "description": "The roles that are enabled to the current user.",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            },
            {
              "name": "EXTERNAL_TABLES",
              "type": "VIEW",
              "description": "The external tables defined in this database that are accessible to the current user's role.",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            },
            {
              "name": "FILE_FORMATS",
              "type": "VIEW",
              "description": "The file formats defined in this database that are accessible to the current user's role.",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            },
            {
              "name": "FUNCTIONS",
              "type": "VIEW",
              "description": "The user-defined functions defined in this database that are accessible to the current user's role.",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            },
            {
              "name": "INFORMATION_SCHEMA_CATALOG_NAME",
              "type": "VIEW",
              "description": "Identifies the database (or catalog, in SQL terminology) that contains the information_schema",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            },
            {
              "name": "LOAD_HISTORY",
              "type": "VIEW",
              "description": "The loading information of the copy command",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            },
            {
              "name": "SCHEMATA",
              "type": "VIEW",
              "description": "The schemas defined in this database that are accessible to the current user's role.",
              "selected": false,
              "linked": true,
              "columns": [],
              "relationships": []
            }
          ]
        },
        {
          "name": "PUBLIC",
          "tables": [
            {
              "name": "FACT_RETAPP_SALES",
              "type": "TABLE",
              "description": "",
              "selected": true,
              "linked": true,
              "columns": [],
              "relationships": []
            }
          ]
        }
      ]
    }
  ],
  "tables": [],
  "selectedTables": [],
  "selectedColumns": [],
  "configuration": {
    "password": "",
    "database": "RETAILAPPAREL-DEV",
    "role": "PUBLIC",
    "accountName": "coa41300.us-east-1",
    "warehouse": "DEMO_WH",
    "user": "tsuser"
  }
}

Response codes🔗

HTTP status codeDescription

200

Successful operation

400

Invalid parameter values

500

Invalid connection object ID

Get column data for connections with external tables🔗

To get column data for a connection with external tables, send a POST request to the /tspublic/v1/connection/fetchLiveColumns endpoint.

Resource URL🔗

POST /tspublic/v1/connection/fetchLiveColumns

Request parameters🔗

Form Data ParameterDescription

connection_id

String. GUID of the data connection.

tables

String. The external tables to include in the output. The tables string allows you to fetch one or several tables from multiple external databases.

  • To get column data for a specific table, specify the string as shown here:
    [{"tableName":"PIPES"}]

  • To get column data for multiple tables, specify the string as shown here:
    [{"tableName":"PIPES"},{"tableName":"STAGES"},{"tableName":"SEQUENCES"}]

  • To get column data for tables with a specific schema, specify the string as shown here:
    [{"databaseName":"RETAILAPPAREL","schemaName":"INFORMATION_SCHEMA"}]

  • To get column data for a specific table from a specific database, specify the string as shown here:
    [{"databaseName":"RETAILAPPAREL","tableName":"PIPES"}]

  • To get column data for a specific table in an external database with a schema, specify the string as shown here:
    [{"databaseName":"RETAILAPPAREL","schemaName":"INFORMATION_SCHEMA","tableName":"PIPES"}]

  • To get column data for multiple tables in a specific database, you can specify the string as shown here:
    [{"databaseName": "RETAILAPPAREL"},{"tableName": "PIPES"},{"tableName":"STAGES"},{"tableName": "SEQUENCES"}]

  • To get column data for specific tables from multiple databases, you can specify the tables string as shown here:
    [{"databaseName": "RETAILAPPAREL","tableName": "PIPES"},{"databaseName": "RETAILAPPAREL-DEV","tableName": "STAGES"}]

config
Optional

String. Configuration attributes to override the metadata details in the API response. Use this attribute to query data from a specific database. For example, if your connection has a database named PROD, and you want to fetch details with the database name as DEVELOPMENT, you can define the config string as {"database":"DEVELOPMENT"}.

Important

Note that the config attribute does not update the connection metadata in the ThoughtSpot system. It only allows you to modify the metadata in the API response. To update the connection metadata, you must use the /tspublic/v1/connection/update endpoint.

authentication_type

String. Type of authentication to use when fetching data from the Cloud Data Warehouse. Valid values are:

  • SERVICE_ACCOUNT Default
    For data connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data.

  • OAUTH
    For data connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data.
    ThoughtSpot data connections to Teradata, Oracle, and Presto Cloud Data Warehouse do not support the OAuth authentication type.

  • IAM
    For data connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only.

  • EXTOAUTH
    For data connections that have external OAuth set up. ThoughtSpot supports external OAuth with Microsoft Azure Active Directory (AD) and Okta for Snowflake data connections. For more information, see Configure Okta OAuth for a Snowflake connection and Configure Azure AD external OAuth for a Snowflake connection.

Example request🔗

cURL
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
-d 'connection_id=2aa36dbd-dda6-4497-a6db-bc47e128862e&tables=[{"tableName":"PIPES"},{"tableName":"STAGES"},{"tableName":"SEQUENCES"}]&config={"database":"DEVELOPMENT"}' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/fetchLiveColumns'
Request URL
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/fetchLiveColumns

Example response🔗

Sample response with a single table
{
  "..PIPES": [
    {
      "name": "PIPE_CATALOG",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "PIPE_SCHEMA",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "PIPE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "PIPE_OWNER",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "CREATED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "LAST_ALTERED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    }
  ]
}
Sample response with multiple tables
{
  "..STAGES": [
    {
      "name": "STAGE_CATALOG",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_SCHEMA",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_URL",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_REGION",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_TYPE",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_OWNER",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "CREATED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "LAST_ALTERED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    }
  ],
  "..PIPES": [
    {
      "name": "PIPE_CATALOG",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "PIPE_SCHEMA",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "PIPE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "PIPE_OWNER",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "CREATED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "LAST_ALTERED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    }
  ],
  "..SEQUENCES": [
    {
      "name": "SEQUENCE_CATALOG",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "SEQUENCE_SCHEMA",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "SEQUENCE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "SEQUENCE_OWNER",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "DATA_TYPE",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "CREATED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "LAST_ALTERED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    }
  ]
}
Sample response with tables associated to a specific schema
{
  "RETAILAPPAREL.INFORMATION_SCHEMA.": [
    {
      "name": "GRANTEE",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "ROLE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "ROLE_OWNER",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "IS_GRANTABLE",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "TABLE_CATALOG",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "TABLE_SCHEMA",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "TABLE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "COLUMN_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "DATA_TYPE",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "DOMAIN_CATALOG",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "DOMAIN_SCHEMA",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "DOMAIN_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "DATABASE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "DATABASE_OWNER",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "IS_TRANSIENT",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "CREATED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "LAST_ALTERED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "SEQUENCE_CATALOG",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "SEQUENCE_SCHEMA",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "SEQUENCE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "SEQUENCE_OWNER",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "CREATED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "LAST_ALTERED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_CATALOG",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_SCHEMA",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_URL",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_REGION",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_TYPE",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_OWNER",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "CREATED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "LAST_ALTERED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    }
  ]
}
Sample response with a single table from a specific database
{
"RETAILAPPAREL..PIPES": [
{
"name": "PIPE_CATALOG",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "PIPE_SCHEMA",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "PIPE_NAME",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "PIPE_OWNER",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "DEFINITION",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "CREATED",
"type": "DATE_TIME",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "LAST_ALTERED",
"type": "DATE_TIME",
"canImport": true,
"selected": false,
"isLinkedActive": true
}
]
}
Sample response with multiple tables from one or more external databases
{
"RETAIL.INFORMATION_SCHEMA.PIPES": [
{
"name": "PIPE_CATALOG",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "PIPE_SCHEMA",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "PIPE_NAME",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "PIPE_OWNER",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "DEFINITION",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "CREATED",
"type": "DATE_TIME",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "LAST_ALTERED",
"type": "DATE_TIME",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "COMMENT",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
},
{
"name": "PATTERN",
"type": "VARCHAR",
"canImport": true,
"selected": false,
"isLinkedActive": true
}
],
"RETAILCLOUD.INFORMATION_SCHEMA.STAGES": [
 {
      "name": "STAGE_CATALOG",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_SCHEMA",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_NAME",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_URL",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_REGION",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_TYPE",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "STAGE_OWNER",
      "type": "VARCHAR",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "CREATED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    },
    {
      "name": "LAST_ALTERED",
      "type": "DATE_TIME",
      "canImport": true,
      "selected": false,
      "isLinkedActive": true
    }
]
}

Response codes🔗

HTTP status codeDescription

200

Successful operation

400

Invalid connection ID

500

Invalid string format

Export a connection map🔗

To export the metadata of an active connection map, send a GET request to the /tspublic/v1/connection/export API.

Resource URL🔗

GET /tspublic/v1/connection/export

Request parameters🔗

Query parameterDescription

id

String. The GUID of the data connection you want to export.

Example request🔗

cURL
curl -X GET
--header 'Accept: text/yaml'
--header 'X-Requested-By: ThoughtSpot'
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/export?id=627c35cb-768d-45c7-b41d-346a2220cd82'
Request URL
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/export?id=627c35cb-768d-45c7-b41d-346a2220cd82

Example response🔗

If the specified GUID is valid and points to an existing data connection on your cluster, the API returns a YAML file containing the connection mapping data.

Click the link in the Response body to download the YAML file.

Response codes🔗

HTTP status codeDescription

200

Successful export of the connection object

401

Unauthorized request or wrong credentials

500

Invalid connection ID

Delete a data connection🔗

To delete a data connection, send a POST request to the /tspublic/v1/connection/delete API.

Important

A connection can be used in multiple data sources or visualizations. If a data connection has dependent objects, make sure you remove its associations before running the delete operation.

Resource URL🔗

POST /tspublic/v1/connection/delete

Request parameters🔗

Form parameterDescription

ids

Array of Strings. A JSON array of data connection GUIDs to delete.

Example request🔗

cURL
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
-d 'ids=%5B%229114f105-fc9e-48c9-a8f1-57f2fda4f056%22%5D' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/delete'
Request URL
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/connection/delete

Example response🔗

If the connection deletion is successful, the following response code is returned:

Response Code
204

Response codes🔗

HTTP status codeDescription

204

Successful deletion of the connection object

401

Unauthorized request or wrong credentials

500

The connection could not be deleted due to table dependencies