Skip to content

Instantly share code, notes, and snippets.

@quintonwall
Created December 7, 2021 15:49
Show Gist options
  • Save quintonwall/c37f6ef8bfa71f2a140f632d00bd7959 to your computer and use it in GitHub Desktop.
Save quintonwall/c37f6ef8bfa71f2a140f632d00bd7959 to your computer and use it in GitHub Desktop.
{
"info": {
"_postman_id": "edc9b1b6-7b9c-4736-a05e-eb49c481e4f1",
"name": "ThoughtSpot",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Login",
"request": {
"method": "POST",
"header": [
{
"key": "X-Requested-By",
"value": "ThoughtSpot",
"type": "text"
},
{
"warning": "This is a duplicate header and will be overridden by the Content-Type header generated by Postman.",
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "username",
"value": "{{username}}",
"type": "text"
},
{
"key": "password",
"value": "{{password}}\n",
"type": "text"
},
{
"key": "rememberme",
"value": "true",
"type": "text"
}
]
},
"url": {
"raw": "{{domain}}/tspublic/v1/session/login",
"host": [
"{{domain}}"
],
"path": [
"tspublic",
"v1",
"session",
"login"
]
}
},
"response": []
},
{
"name": "Get Auth Token",
"request": {
"method": "POST",
"header": [
{
"key": "X-Requested-By",
"value": "ThoughtSpot",
"type": "text"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "username",
"value": "{{username}}",
"type": "text"
},
{
"key": "secret_key",
"value": "{{clientId}}",
"type": "text"
},
{
"key": "access_level",
"value": "FULL",
"type": "text"
}
]
},
"url": {
"raw": "{{domain}}/tspublic/v1/session/auth/token",
"host": [
"{{domain}}"
],
"path": [
"tspublic",
"v1",
"session",
"auth",
"token"
]
}
},
"response": []
},
{
"name": "Connection - List",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domain}}/tspublic/v1/connection/list?category=ALL",
"host": [
"{{domain}}"
],
"path": [
"tspublic",
"v1",
"connection",
"list"
],
"query": [
{
"key": "category",
"value": "ALL"
}
]
}
},
"response": []
},
{
"name": "Connection - Export",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domain}}/tspublic/v1/connection/export?id=713ed518-f72b-4fa4-8c9b-359520433d95",
"host": [
"{{domain}}"
],
"path": [
"tspublic",
"v1",
"connection",
"export"
],
"query": [
{
"key": "id",
"value": "713ed518-f72b-4fa4-8c9b-359520433d95"
}
]
}
},
"response": []
},
{
"name": "TML - Export",
"request": {
"method": "POST",
"header": [
{
"key": "X-Requested-By",
"value": "ThoughtSpot",
"type": "text"
},
{
"key": "Accept",
"value": "text/plain",
"type": "text"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "export_ids",
"value": "[\"402edd22-0d11-4f15-99fa-a0e7c43541c2\"]\n",
"type": "text"
},
{
"key": "format_type",
"value": "YAML",
"type": "text"
},
{
"key": "export_associated",
"value": "false",
"type": "text"
}
]
},
"url": {
"raw": "{{domain}}/tspublic/v1/metadata/tml/export",
"host": [
"{{domain}}"
],
"path": [
"tspublic",
"v1",
"metadata",
"tml",
"export"
]
}
},
"response": []
},
{
"name": "TML - Import",
"request": {
"method": "POST",
"header": [
{
"key": "X-Requested-By",
"value": "ThoughtSpot",
"type": "text"
},
{
"key": "Accept",
"value": "text/plain",
"type": "text"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "import_objects",
"value": "[\"guid: 402edd22-0d11-4f15-99fa-a0e7c43541c2\\npinboard:\\n name: County Level Stats\\n visualizations:\\n - id: Viz_1\\n answer:\\n name: Total Impressions by County\\n tables:\\n - id: Web Marketing\\n name: Web Marketing\\n search_query: \\\"[Impressions] by [County] sort by [Impressions] descending\\\"\\n answer_columns:\\n - name: Total Impressions\\n - name: County\\n table:\\n table_columns:\\n - column_id: County\\n headline_aggregation: COUNT_DISTINCT\\n - column_id: Total Impressions\\n headline_aggregation: SUM\\n ordered_column_ids:\\n - County\\n - Total Impressions\\n client_state: \\\"\\\"\\n client_state_v2: \\\"{\\\\\\\"tableVizPropVersion\\\\\\\": \\\\\\\"V1\\\\\\\",\\\\\\\"columnProperties\\\\\\\": [{\\\\\\\"columnId\\\\\\\": \\\\\\\"County\\\\\\\",\\\\\\\"columnProperty\\\\\\\": {}},{\\\\\\\"columnId\\\\\\\": \\\\\\\"Total Impressions\\\\\\\",\\\\\\\"columnProperty\\\\\\\": {}}]}\\\"\\n chart:\\n type: COLUMN\\n chart_columns:\\n - column_id: County\\n - column_id: Total Impressions\\n axis_configs:\\n - x:\\n - County\\n \\\"y\\\":\\n - Total Impressions\\n client_state: \\\"\\\"\\n client_state_v2: \\\"{\\\\\\\"version\\\\\\\": \\\\\\\"V4DOT1\\\\\\\",\\\\\\\"chartProperties\\\\\\\": {\\\\\\\"mapviewport\\\\\\\": {\\\\\\\"center\\\\\\\": [-1.0670154693088695E7,4614999.07705929],\\\\\\\"zoomLevel\\\\\\\": 5.0},\\\\\\\"responsiveLayoutPreference\\\\\\\": \\\\\\\"AUTO_OFF\\\\\\\",\\\\\\\"chartSpecific\\\\\\\": {},\\\\\\\"showStackedLabels\\\\\\\": true,\\\\\\\"allLabels\\\\\\\": true},\\\\\\\"columnProperties\\\\\\\": [{\\\\\\\"columnId\\\\\\\": \\\\\\\"Total Impressions\\\\\\\",\\\\\\\"columnProperty\\\\\\\": {\\\\\\\"dataLabels\\\\\\\": true}}],\\\\\\\"axisProperties\\\\\\\": [{\\\\\\\"id\\\\\\\": \\\\\\\"6d56a945-6204-4500-a4ec-09ed6f76b378\\\\\\\",\\\\\\\"properties\\\\\\\": {\\\\\\\"axisType\\\\\\\": \\\\\\\"Y\\\\\\\",\\\\\\\"linkedColumns\\\\\\\": [\\\\\\\"Total Impressions\\\\\\\"],\\\\\\\"isOpposite\\\\\\\": false}},{\\\\\\\"id\\\\\\\": \\\\\\\"58905c41-1df3-4297-af05-8e5bdb3df82b\\\\\\\",\\\\\\\"properties\\\\\\\": {\\\\\\\"axisType\\\\\\\": \\\\\\\"X\\\\\\\",\\\\\\\"linkedColumns\\\\\\\": [\\\\\\\"County\\\\\\\"]}}],\\\\\\\"systemSeriesColors\\\\\\\": [{\\\\\\\"serieName\\\\\\\": \\\\\\\"Total Impressions\\\\\\\",\\\\\\\"color\\\\\\\": \\\\\\\"#48D1E0\\\\\\\"}]}\\\"\\n display_mode: CHART_MODE\\n - id: Viz_2\\n answer:\\n name: Total Clicks by County\\n tables:\\n - id: Web Marketing\\n name: Web Marketing\\n search_query: \\\"[Clicks] by [County] sort by [Clicks] descending\\\"\\n answer_columns:\\n - name: County\\n - name: Total Clicks\\n table:\\n table_columns:\\n - column_id: County\\n headline_aggregation: COUNT_DISTINCT\\n - column_id: Total Clicks\\n headline_aggregation: SUM\\n ordered_column_ids:\\n - County\\n - Total Clicks\\n client_state: \\\"\\\"\\n client_state_v2: \\\"{\\\\\\\"tableVizPropVersion\\\\\\\": \\\\\\\"V1\\\\\\\",\\\\\\\"columnProperties\\\\\\\": [{\\\\\\\"columnId\\\\\\\": \\\\\\\"County\\\\\\\",\\\\\\\"columnProperty\\\\\\\": {}},{\\\\\\\"columnId\\\\\\\": \\\\\\\"Total Clicks\\\\\\\",\\\\\\\"columnProperty\\\\\\\": {}}]}\\\"\\n chart:\\n type: COLUMN\\n chart_columns:\\n - column_id: County\\n - column_id: Total Clicks\\n axis_configs:\\n - x:\\n - County\\n \\\"y\\\":\\n - Total Clicks\\n client_state: \\\"\\\"\\n client_state_v2: \\\"{\\\\\\\"version\\\\\\\": \\\\\\\"V4DOT1\\\\\\\",\\\\\\\"chartProperties\\\\\\\": {\\\\\\\"mapviewport\\\\\\\": {\\\\\\\"center\\\\\\\": [-1.0670154693088695E7,4614999.07705929],\\\\\\\"zoomLevel\\\\\\\": 4.0},\\\\\\\"responsiveLayoutPreference\\\\\\\": \\\\\\\"AUTO_OFF\\\\\\\",\\\\\\\"chartSpecific\\\\\\\": {},\\\\\\\"showStackedLabels\\\\\\\": true,\\\\\\\"allLabels\\\\\\\": true},\\\\\\\"columnProperties\\\\\\\": [{\\\\\\\"columnId\\\\\\\": \\\\\\\"Total Clicks\\\\\\\",\\\\\\\"columnProperty\\\\\\\": {\\\\\\\"dataLabels\\\\\\\": true}}],\\\\\\\"axisProperties\\\\\\\": [{\\\\\\\"id\\\\\\\": \\\\\\\"2bde4dbc-bcb1-4e5e-a5dc-81d0991612cf\\\\\\\",\\\\\\\"properties\\\\\\\": {\\\\\\\"axisType\\\\\\\": \\\\\\\"Y\\\\\\\",\\\\\\\"linkedColumns\\\\\\\": [\\\\\\\"Total Clicks\\\\\\\"],\\\\\\\"isOpposite\\\\\\\": false}},{\\\\\\\"id\\\\\\\": \\\\\\\"b483cf68-4827-40d2-8d68-582c910d000c\\\\\\\",\\\\\\\"properties\\\\\\\": {\\\\\\\"axisType\\\\\\\": \\\\\\\"X\\\\\\\",\\\\\\\"linkedColumns\\\\\\\": [\\\\\\\"County\\\\\\\"]}}],\\\\\\\"systemSeriesColors\\\\\\\": [{\\\\\\\"serieName\\\\\\\": \\\\\\\"Total Clicks\\\\\\\",\\\\\\\"color\\\\\\\": \\\\\\\"#747E8C\\\\\\\"}]}\\\"\\n display_mode: CHART_MODE\\n - id: Viz_3\\n answer:\\n name: Total Conversions by County\\n tables:\\n - id: Web Marketing\\n name: Web Marketing\\n search_query: \\\"[Conversions] by [County] sort by [Conversions] descending\\\"\\n answer_columns:\\n - name: County\\n - name: Total Conversions\\n table:\\n table_columns:\\n - column_id: County\\n headline_aggregation: COUNT_DISTINCT\\n - column_id: Total Conversions\\n headline_aggregation: SUM\\n ordered_column_ids:\\n - County\\n - Total Conversions\\n client_state: \\\"\\\"\\n client_state_v2: \\\"{\\\\\\\"tableVizPropVersion\\\\\\\": \\\\\\\"V1\\\\\\\",\\\\\\\"columnProperties\\\\\\\": [{\\\\\\\"columnId\\\\\\\": \\\\\\\"County\\\\\\\",\\\\\\\"columnProperty\\\\\\\": {}},{\\\\\\\"columnId\\\\\\\": \\\\\\\"Total Conversions\\\\\\\",\\\\\\\"columnProperty\\\\\\\": {}}]}\\\"\\n chart:\\n type: COLUMN\\n chart_columns:\\n - column_id: County\\n - column_id: Total Conversions\\n axis_configs:\\n - x:\\n - County\\n \\\"y\\\":\\n - Total Conversions\\n client_state: \\\"\\\"\\n client_state_v2: \\\"{\\\\\\\"version\\\\\\\": \\\\\\\"V4DOT1\\\\\\\",\\\\\\\"chartProperties\\\\\\\": {\\\\\\\"mapviewport\\\\\\\": {\\\\\\\"center\\\\\\\": [-1.0670154693088695E7,4614999.07705929],\\\\\\\"zoomLevel\\\\\\\": 5.0},\\\\\\\"responsiveLayoutPreference\\\\\\\": \\\\\\\"AUTO_OFF\\\\\\\",\\\\\\\"chartSpecific\\\\\\\": {},\\\\\\\"showStackedLabels\\\\\\\": true,\\\\\\\"allLabels\\\\\\\": true},\\\\\\\"columnProperties\\\\\\\": [{\\\\\\\"columnId\\\\\\\": \\\\\\\"Total Conversions\\\\\\\",\\\\\\\"columnProperty\\\\\\\": {\\\\\\\"dataLabels\\\\\\\": true}}],\\\\\\\"axisProperties\\\\\\\": [{\\\\\\\"id\\\\\\\": \\\\\\\"f99feeee-9f53-470b-85b7-743dad78233d\\\\\\\",\\\\\\\"properties\\\\\\\": {\\\\\\\"axisType\\\\\\\": \\\\\\\"Y\\\\\\\",\\\\\\\"linkedColumns\\\\\\\": [\\\\\\\"Total Conversions\\\\\\\"],\\\\\\\"isOpposite\\\\\\\": false}},{\\\\\\\"id\\\\\\\": \\\\\\\"501ff784-d10d-4bdf-8467-522a19ae9995\\\\\\\",\\\\\\\"properties\\\\\\\": {\\\\\\\"axisType\\\\\\\": \\\\\\\"X\\\\\\\",\\\\\\\"linkedColumns\\\\\\\": [\\\\\\\"County\\\\\\\"]}}],\\\\\\\"systemSeriesColors\\\\\\\": [{\\\\\\\"serieName\\\\\\\": \\\\\\\"Total Conversions\\\\\\\",\\\\\\\"color\\\\\\\": \\\\\\\"#8C62F5\\\\\\\"}]}\\\"\\n display_mode: CHART_MODE\\n layout:\\n tiles:\\n - visualization_id: Viz_1\\n size: LARGE_SMALL\\n - visualization_id: Viz_2\\n size: LARGE_SMALL\\n - visualization_id: Viz_3\\n size: LARGE_SMALL\\n\"]",
"type": "text"
},
{
"key": "import_policy",
"value": "VALIDATE_ONLY",
"description": "PARTIAL, ALL_OR_NONE, VALIDATE_ONLY",
"type": "text"
},
{
"key": "force_create",
"value": "false",
"type": "text"
}
]
},
"url": {
"raw": "{{domain}}/tspublic/v1/metadata/tml/import",
"host": [
"{{domain}}"
],
"path": [
"tspublic",
"v1",
"metadata",
"tml",
"import"
]
}
},
"response": []
},
{
"name": "Metadata - List",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domain}}/tspublic/v1/metadata/list?type=PINBOARD_ANSWER_BOOK",
"host": [
"{{domain}}"
],
"path": [
"tspublic",
"v1",
"metadata",
"list"
],
"query": [
{
"key": "type",
"value": "PINBOARD_ANSWER_BOOK"
}
]
}
},
"response": []
}
]
}
@quintonwall
Copy link
Author

To use this Postman collection, make sure you create an environment with three global variables

  • domain: The url of the cloud instance you are connecting to. For a trial instance, it is https://try.thoughtspot.cloud/callosum/v1
  • username: The username of your ThoughtSpot account
  • password: The password of your ThoughtSpot account

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment