Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: ThoughtSpot Public REST Data API
version: '2.0'
servers:
- url: '{base-url}'
variables:
base-url:
default: https://localhost:443
security:
- bearerAuth: []
tags:
- name: Data
paths:
/api/rest/2.0/metadata/answer/data:
post:
operationId: fetchAnswerData
description: 'Version: 9.0.0.cl or later
Fetches data from a saved Answer.
Requires at least view access to the saved Answer. If Role-Based Access Control (RBAC) is enabled, the `CAN_DOWNLOAD_DETAILED_DATA` (**Can download detailed data**) privilege is also required.
The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see Pagination and record size settings.
#### Endpoint URL'
tags:
- Data
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FetchAnswerDataRequest'
required: true
parameters: []
responses:
'200':
description: Fetching data of specified metadata object is successful.
content:
application/json:
schema:
$ref: '#/components/schemas/AnswerDataResponse'
'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'
summary: Fetch answer data
x-summary-source: derived
/api/rest/2.0/metadata/liveboard/data:
post:
operationId: fetchLiveboardData
description: 'Version: 9.0.0.cl or later
Gets data from a Liveboard object and its visualization.
Requires at least view access to the Liveboard. If Role-Based Access Control (RBAC) is enabled, the `CAN_DOWNLOAD_DETAILED_DATA` (**Can download detailed data**) privilege is also required.
#### Usage guidelines
In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request.
To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down.
For more information, and see Liveboard data API.
#### Endpoint URL'
tags:
- Data
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FetchLiveboardDataRequest'
required: true
parameters: []
responses:
'200':
description: Fetching data of specified metadata object is successful.
content:
application/json:
schema:
$ref: '#/components/schemas/LiveboardDataResponse'
'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'
summary: Fetch liveboard data
x-summary-source: derived
/api/rest/2.0/searchdata:
post:
operationId: searchData
description: 'Version: 9.0.0.cl or later
Generates an Answer from a given data source.
Requires at least view access to the data source object (Worksheet or View). If Role-Based Access Control (RBAC) is enabled, the `CAN_DOWNLOAD_DETAILED_DATA` (**Can download detailed data**) privilege is also required.
#### Usage guidelines
To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view.
Pass search tokens in the `query_string` attribute in the API request as shown in the following example:
```
{
"query_string": "[sales] by [store]",
"logical_table_identifier": "cd252e5c-b552-49a8-821d-3eadaa049cca",
}
```
For more information about the `query_string` format and data source attribute, see Search data API.
The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see Pagination and record size settings.
#### Endpoint URL'
tags:
- Data
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SearchDataRequest'
required: true
parameters: []
responses:
'200':
description: Fetching data of specified metadata object is successful.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchDataResponse'
'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'
summary: Search data
x-summary-source: derived
components:
schemas:
FetchAnswerDataRequest:
type: object
properties:
metadata_identifier:
description: GUID or name of the Answer.
type: string
data_format:
description: JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later.
default: COMPACT
type: string
enum:
- FULL
- COMPACT
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 to include in a batch.
default: 10
type: integer
format: int32
runtime_filter:
description: 'JSON object with representing filter condition to apply filters at runtime. For example, <code> {"col1": "item type", "op1": "EQ", "val1": "Bags"} </code>. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters).'
type: object
runtime_sort:
description: 'JSON object representing columns to sort data at runtime. For example, <code> {"sortCol1": "sales", "asc1": true} </code>. You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort).'
type: object
runtime_param_override:
description: 'JSON object for setting values of parameters at runtime. For example, <code> {"param1": "Double List Param", "paramVal1": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters).'
type: object
required:
- metadata_identifier
AnswerDataResponse:
type: object
required:
- metadata_id
- metadata_name
- contents
properties:
metadata_id:
type: string
description: The unique identifier of the object
metadata_name:
type: string
description: Name of the metadata object
contents:
type: array
items:
$ref: '#/components/schemas/AnswerContent'
description: Data content of metadata objects
description: Response format associated with fetch data api
LiveboardDataResponse:
type: object
required:
- metadata_id
- metadata_name
- contents
properties:
metadata_id:
type: string
description: The unique identifier of the object
metadata_name:
type: string
description: Name of the metadata object
contents:
type: array
items:
$ref: '#/components/schemas/LiveboardContent'
description: Data content of metadata objects
SearchDataResponse:
type: object
required:
- contents
properties:
contents:
type: array
items:
$ref: '#/components/schemas/AnswerContent'
description: Data content of metadata objects
description: Response format associated with the search data API.
AnswerContent:
type: object
required:
- available_data_row_count
- column_names
- data_rows
- record_offset
- record_size
- returned_data_row_count
- sampling_ratio
properties:
available_data_row_count:
type: integer
format: int32
description: Total available data row count.
column_names:
type: array
items:
type: string
description: Name of the columns.
data_rows:
type: array
items:
type: object
description: Rows of data set.
record_offset:
type: integer
format: int32
description: The starting record number from where the records should be included.
record_size:
type: integer
format: int32
description: The number of records that should be included.
returned_data_row_count:
type: integer
format: int32
description: Total returned data row count.
sampling_ratio:
type: number
format: float
description: Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned.
LiveboardContent:
type: object
required:
- available_data_row_count
- column_names
- data_rows
- record_offset
- record_size
- returned_data_row_count
- sampling_ratio
properties:
available_data_row_count:
type: integer
format: int32
description: Total available data row count.
column_names:
type: array
items:
type: string
description: Name of the columns.
data_rows:
type: array
items:
type: object
description: Rows of data set.
record_offset:
type: integer
format: int32
description: The starting record number from where the records should be included.
record_size:
type: integer
format: int32
description: The number of records that should be included.
returned_data_row_count:
type: integer
format: int32
description: Total returned data row count.
sampling_ratio:
type: number
format: float
description: Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned.
visualization_id:
type:
- string
- 'null'
description: Unique ID of the visualization.
visualization_name:
type:
- string
- 'null'
description: Name of the visualization.
FetchLiveboardDataRequest:
type: object
properties:
metadata_identifier:
description: GUID or name of the Liveboard.
type: string
visualization_identifiers:
description: GUIDs or names of the visualizations on the Liveboard.
type: array
items:
type: string
transient_content:
description: Transient content of the Liveboard.
type: string
data_format:
description: JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later.
default: COMPACT
type: string
enum:
- FULL
- COMPACT
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 to include in a batch.
default: 10
type: integer
format: int32
runtime_filter:
description: 'JSON object with representing filter condition to apply filters at runtime. For example, <code> {"col1": "item type", "op1": "EQ", "val1": "Bags"} </code>. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters).'
type: object
runtime_sort:
description: 'JSON object representing columns to sort data at runtime. For example, <code> {"sortCol1": "sales", "asc1": true} </code>. You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort).'
type: object
runtime_param_override:
description: 'JSON object for setting values of parameters at runtime. For example, <code> {"param1": "Double List Param", "paramVal1": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters).'
type: object
required:
- metadata_identifier
ErrorResponse:
type: object
properties:
error:
type:
- object
- 'null'
SearchDataRequest:
type: object
properties:
query_string:
description: Query string with search tokens. For example, <code>[Sales][Region]</code>. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api)
type: string
logical_table_identifier:
description: GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details.
type: string
data_format:
description: JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later.
default: COMPACT
type: string
enum:
- FULL
- COMPACT
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 to include in a batch.
default: 10
type: integer
format: int32
runtime_filter:
description: 'JSON object with representing filter condition to apply filters at runtime. For example, <code> {"col1": "item type", "op1": "EQ", "val1": "Bags"} </code>. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters).'
type: object
runtime_sort:
description: 'JSON object representing columns to sort data at runtime. For example, <code> {"sortCol1": "sales", "asc1": true} </code>. You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort).'
type: object
runtime_param_override:
description: 'JSON object for setting values of parameters at runtime. For example, <code> {"param1": "Double List Param", "paramVal1": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters).'
type: object
required:
- query_string
- logical_table_identifier
securitySchemes:
bearerAuth:
type: http
scheme: bearer
x-roles:
- name: 26.2.0.cl
id: 26.2.0.cl
tags:
- 26.2.0.cl
description: Roles for version 26.2.0.cl
- name: 10.4.0.cl
id: 10.4.0.cl
tags:
- 10.4.0.cl
description: Roles for version 10.4.0.cl
- name: 26.7.0.cl
id: 26.7.0.cl
tags:
- 26.7.0.cl
description: Roles for version 26.7.0.cl
- name: 26.8.0.cl
id: 26.8.0.cl
tags:
- 26.8.0.cl
description: Roles for version 26.8.0.cl
- name: 26.6.0.cl
id: 26.6.0.cl
tags:
- 26.6.0.cl
description: Roles for version 26.6.0.cl
- name: 10.15.0.cl
id: 10.15.0.cl
tags:
- 10.15.0.cl
description: Roles for version 10.15.0.cl
- name: 10.13.0.cl
id: 10.13.0.cl
tags:
- 10.13.0.cl
description: Roles for version 10.13.0.cl
- name: 26.9.0.cl
id: 26.9.0.cl
tags:
- 26.9.0.cl
description: Roles for version 26.9.0.cl
- name: 10.7.0.cl
id: 10.7.0.cl
tags:
- 10.7.0.cl
description: Roles for version 10.7.0.cl
- name: 26.5.0.cl
id: 26.5.0.cl
tags:
- 26.5.0.cl
description: Roles for version 26.5.0.cl
- name: 9.0.0.cl
id: 9.0.0.cl
tags:
- 9.0.0.cl
description: Roles for version 9.0.0.cl
- name: 9.4.0.cl
id: 9.4.0.cl
tags:
- 9.4.0.cl
description: Roles for version 9.4.0.cl
- name: 9.12.0.cl
id: 9.12.0.cl
tags:
- 9.12.0.cl
description: Roles for version 9.12.0.cl
- name: 26.4.0.cl
id: 26.4.0.cl
tags:
- 26.4.0.cl
description: Roles for version 26.4.0.cl
- name: 10.12.0.cl
id: 10.12.0.cl
tags:
- 10.12.0.cl
description: Roles for version 10.12.0.cl
- name: 9.2.0.cl
id: 9.2.0.cl
tags:
- 9.2.0.cl
description: Roles for version 9.2.0.cl
- name: 9.9.0.cl
id: 9.9.0.cl
tags:
- 9.9.0.cl
description: Roles for version 9.9.0.cl
- name: 9.6.0.cl
id: 9.6.0.cl
tags:
- 9.6.0.cl
description: Roles for version 9.6.0.cl
- name: 10.10.0.cl
id: 10.10.0.cl
tags:
- 10.10.0.cl
description: Roles for version 10.10.0.cl
- name: 10.6.0.cl
id: 10.6.0.cl
tags:
- 10.6.0.cl
description: Roles for version 10.6.0.cl
- name: 10.3.0.cl
id: 10.3.0.cl
tags:
- 10.3.0.cl
description: Roles for version 10.3.0.cl
- name: 10.1.0.cl
id: 10.1.0.cl
tags:
- 10.1.0.cl
description: Roles for version 10.1.0.cl
- name: 10.9.0.cl
id: 10.9.0.cl
tags:
- 10.9.0.cl
description: Roles for version 10.9.0.cl
- name: 10.8.0.cl
id: 10.8.0.cl
tags:
- 10.8.0.cl
description: Roles for version 10.8.0.cl
- name: 9.5.0.cl
id: 9.5.0.cl
tags:
- 9.5.0.cl
description: Roles for version 9.5.0.cl
- name: 26.3.0.cl
id: 26.3.0.cl
tags:
- 26.3.0.cl
description: Roles for version 26.3.0.cl
- name: 10.14.0.cl
id: 10.14.0.cl
tags:
- 10.14.0.cl
description: Roles for version 10.14.0.cl
- name: 9.7.0.cl
id: 9.7.0.cl
tags:
- 9.7.0.cl
description: Roles for version 9.7.0.cl