Metadata APIs
The metadata APIs allow you to query metadata objects from the ThoughtSpot system. The metadata objects include answers, pinboards, visualizations, and data objects such as tables, worksheets, and views. You can also query metadata objects for a user or user group configured in ThoughtSpot.
Supported operations
|
|
|
|
|
|
|
|
|
Assign tags to metadata objects
Tags are labels that you can apply to a Thoughtspot object, such as a pinboard or answer. You can use tags to find and filter your answers, pinboards, and data objects.
To apply a tag to a ThoughtSpot object programmatically, you can use the /tspublic/v1/metadata/assigntag
API endpoint.
Before you apply a tag, make sure the tags are created and available for assignment.
Only ThoughtSpot admin users can create a tag. ThoughtSpot users with edit permissions can assign a tag to an object. |
Request parameters
Form parameter | Description |
---|---|
|
String. A JSON array of the metadata object GUIDs. For example, a pinboard or answer. |
|
String. Type of the metadata object. Specify any of the following values as a metadata object type:
For example, if you want to assign a tag named |
|
String. A JSON array of the GUIDs of the tags that you want to apply to the specified objects. The |
|
String. A JSON array of the names of tags that you want to apply to the specified objects. The |
Example request
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' --header 'X-Requested-By: ThoughtSpot' \
-d 'id=%5B%225772aaf1-555d-44c4-a24c-ae6fba6684c3%22%5D&type=%5B%22QUESTION_ANSWER_BOOK%22%5D&tagid=%5B%22c4db6274-dec3-4902-ba0e-493734fef9c0%22%5D' \
'https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/assigntag'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/assigntag
Unassign tags
To remove the tags assigned to a ThoughtSpot object, send a POST
request to the /tspublic/v1/metadata/unassigntag
endpoint.
Request parameters
Form parameter | Description |
---|---|
|
String. A JSON array of the pinboard and answer GUIDs for which you want to remove the tags. |
|
String. Type of the metadata object. Specify any of the following values as a metadata object type:
For example, if you want to remove a tag named |
|
String. A JSON array of the GUIDs of the tags assigned to the specified object. |
|
String. A JSON array of the names of the tags assigned to the specified objects. |
Example request
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
-d 'id=%5B%2216d94e69-305a-44c2-abfe-bffb70041f0c"%22%2C%20%22eaf4abc0-8d30-4511-be00-7ad219de3244%22%5D&type=%5B%22PINBOARD_ANSWER_BOOK%22%2C%20%22QUESTION_ANSWER_BOOK%22%5D&tagid=%5B%2253a10282-42be-492e-9560-66d5c5f6657d%22%5D&tagname=%5B%22stick%20me%22%5D' \
'https:/<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/unassigntag'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/unassigntag
Get metadata details
To get the metadata details of one or several objects, send a GET
request to the /tspublic/v1/metadata/details
endpoint. The API returns a JSON representation of the objects specified in the API request.
Request parameters
Query parameter | Description |
---|---|
|
String. Type of the metadata object. To query the details of a specific object type, set the metadata object
|
|
String. A JSON array of GUIDs of the objects. |
|
Boolean. When set to |
|
Boolean. When set to |
|
Long integer. Object version. By default, the API returns metadata for all versions of the object. |
Example request
curl -X GET
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
'https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/details?type=QUESTION_ANSWER_BOOK&id=%5B%22999edb43-7957-495c-bfdf-d2a9de2a4fd6%22%5D&showhidden=false&dropquestiondetails=false'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/details?type=QUESTION_ANSWER_BOOK&id=%5B%22999edb43-7957-495c-bfdf-d2a9de2a4fd6%22%5D&showhidden=false&dropquestiondetails=false
Example response
The following example shows the metadata details of a pinboard object:
{
"storables": [
{
"reportContent": {
"sheets": [
{
"sheetType": "QUESTION",
"sheetContent": {
"headlineVisibilityMap": {},
"defaultQueryableSource": "LIVE",
"querableSources": [
"LIVE"
],
"externalQueryableDataSource": "RDBMS_SNOWFLAKE",
"bestDisplayMode": "TABLE_MODE",
"canGenerateLeafData": true,
"sheetContentType": "QUESTION",
"question": {
"sageContextProto": "CoYDCgMKATAa8wEK5gEKD0FjY291bnQgQmFsYW5jZRACGAcgASokOTM4NjFkZjQtMjIwZC00YzgyLWI1YWMtNmMxNGM4MTBkZGQzMiRkMmIxOTBlNi1mNzIxLTRjOTUtOTFkYy1jZWFlN2RlZGY4ZGY6CgoDCgExGgMKATFSHRIPQWNjb3VudCBCYWxhbmNlIgMKATEqAwoBMTAAWABhE+xy+yLF9UCAAQCQAQCYAQDqAQ9BY2NvdW50IEJhbGFuY2WAAgCQAleaAgIIAaICJGI5MTMxMTZiLTBhNGQtNDI3MC1hNzM3LTA4NjZmYmRmNTBiNxIICAEQABgBIAEqAwoBMjIUMTQxMDE4NDUxNTI2ODMxNDUxMjg6VBJQCiMgAkAAchcIASIRCgMKATQaCgoDCgExGgMKATFAB4IBAwoBMkoDCgEzWiQwZDM3MTNjNS05YjdkLTQ3M2YtYTI2Mi1iMmYyM2FlNGZjZTYYAEoKCgQIABIAEgISAFgKegplbl9VUy51dGY4MjIKJGEzMDdhZWYwLWFlYWMtNDNkOC1hNmYyLTEwNTI1NzhjNGY3ORIKTmV3IFRhYmxlMDI2CiQwZDM3MTNjNS05YjdkLTQ3M2YtYTI2Mi1iMmYyM2FlNGZjZTYSDlJldGFpbCBCYW5raW5nMjcKJGQyYjE5MGU2LWY3MjEtNGM5NS05MWRjLWNlYWU3ZGVkZjhkZhIPQWNjb3VudCBCYWxhbmNlMiYKJDhiOWNhZDk1LTJkY2MtNDg2MS05ZWFmLTcwOTNjODRiMjFiODI3CiQ5Mzg2MWRmNC0yMjBkLTRjODItYjVhYy02YzE0YzgxMGRkZDMSD0FjY291bnQgQmFsYW5jZTgC",
"sageContextIndex": 0,
"text": "account balance",
"isChasmTrapQuery": false
},
"visualizations": [
{
"vizContent": {
"vizType": "TABLE",
"columns": [
{
"isUserSorted": false,
"aggrTypeOverride": "NONE",
"typeOverride": "MEASURE",
"dataTypeOverride": "UNKNOWN",
"formatTypeOverride": "NONE",
"groupBy": false,
"uniqueValues": -1,
"sageOutputColumnId": "d2b190e6-f721-4c95-91dc-ceae7dedf8df",
"outputIdsWithMatchingLogicalKey": [],
"aggrApplied": false,
"isVisible": true,
"columnToFormatPatternType": {},
"effectiveAggrType": "SUM",
"effectiveDataType": "DOUBLE",
"effectiveType": "MEASURE",
"id": "d2b190e6-f721-4c95-91dc-ceae7dedf8df",
"effectiveColumnGuid": "d17c7367-e653-31d2-8542-4c8751401c18",
"effectiveColumnIdString": "93861df4-220d-4c82-b5ac-6c14c810ddd3#SUM#MEASURE#null",
"baseColumnName": "Account Balance",
"baseAggrType": "SUM",
"baseDataType": "DOUBLE",
"baseType": "MEASURE",
"isBaseColumnFormulaColumn": true,
"isBaseColumnAdditive": true,
"baseCurrencyTypeInfo": {
"setting": "FROM_ISO_CODE",
"isoCode": "USD"
},
"referencedTableHeaders": [
{
"id": "0d3713c5-9b7d-473f-a262-b2f23ae4fce6",
"name": "Retail Banking"
}
],
"referencedColumnHeaders": [
{
"id": "93861df4-220d-4c82-b5ac-6c14c810ddd3",
"name": "Account Balance"
}
],
"allLevelReferencedTableHeaders": [
{
"id": "0d3713c5-9b7d-473f-a262-b2f23ae4fce6",
"name": "Retail Banking"
},
{
"id": "d56e7bee-979f-4220-b6e8-aab95ea5fa3c",
"name": "DIM_RB_ACCOUNTS"
}
],
"allLevelReferencedColumnHeaders": [
{
"id": "93861df4-220d-4c82-b5ac-6c14c810ddd3",
"name": "Account Balance"
},
{
"id": "cf782d93-7c17-4033-a99f-8f4ef2d6bf41",
"name": "BALANCE"
}
]
}
],
"title": {
"value": {
"text": "Table 1"
}
},
"customTitle": false,
"locked": false
},
"relatedLinks": [],
"header": {
"id": "9657d273-c9a4-431d-9ae9-a409e4f8e75c",
"indexVersion": 2468,
"generationNum": 2468,
"name": "Table Viz account balance",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1623061257553,
"modified": 1623061257553,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "bf5aad95-efb2-41f1-b3e8-5f7e41dd6a0f",
"isDeleted": false,
"isHidden": false,
"clientState": {
"tableVizPropVersion": "V1"
},
"tags": [],
"type": "QUESTION",
"isExternal": false,
"isDeprecated": false
},
"complete": true,
"incompleteDetail": []
},
{
"vizContent": {
"vizType": "HEADLINE",
"template": "MEASURE",
"columns": [
{
"column": {
"isUserSorted": false,
"aggrTypeOverride": "NONE",
"typeOverride": "MEASURE",
"dataTypeOverride": "UNKNOWN",
"formatTypeOverride": "NONE",
"groupBy": false,
"uniqueValues": -1,
"sageOutputColumnId": "d2b190e6-f721-4c95-91dc-ceae7dedf8df",
"outputIdsWithMatchingLogicalKey": [],
"aggrApplied": true,
"isVisible": true,
"columnToFormatPatternType": {},
"effectiveAggrType": "SUM",
"effectiveDataType": "DOUBLE",
"effectiveType": "MEASURE",
"id": "d2b190e6-f721-4c95-91dc-ceae7dedf8df",
"effectiveColumnGuid": "d17c7367-e653-31d2-8542-4c8751401c18",
"effectiveColumnIdString": "93861df4-220d-4c82-b5ac-6c14c810ddd3#SUM#MEASURE#null",
"baseColumnName": "Account Balance",
"baseAggrType": "SUM",
"baseDataType": "DOUBLE",
"baseType": "MEASURE",
"isBaseColumnFormulaColumn": true,
"isBaseColumnAdditive": true,
"baseCurrencyTypeInfo": {
"setting": "FROM_ISO_CODE",
"isoCode": "USD"
},
"referencedTableHeaders": [
{
"id": "0d3713c5-9b7d-473f-a262-b2f23ae4fce6",
"name": "Retail Banking"
}
],
"referencedColumnHeaders": [
{
"id": "93861df4-220d-4c82-b5ac-6c14c810ddd3",
"name": "Account Balance"
}
],
"allLevelReferencedTableHeaders": [
{
"id": "0d3713c5-9b7d-473f-a262-b2f23ae4fce6",
"name": "Retail Banking"
},
{
"id": "d56e7bee-979f-4220-b6e8-aab95ea5fa3c",
"name": "DIM_RB_ACCOUNTS"
}
],
"allLevelReferencedColumnHeaders": [
{
"id": "93861df4-220d-4c82-b5ac-6c14c810ddd3",
"name": "Account Balance"
},
{
"id": "cf782d93-7c17-4033-a99f-8f4ef2d6bf41",
"name": "BALANCE"
}
]
},
"possibleAggrs": [
"SUM",
"AVERAGE",
"STD_DEVIATION",
"VARIANCE",
"MIN",
"MAX",
"TABLE_AGGR"
],
"aggrs": [
"TABLE_AGGR"
],
"tableSummary": true
}
],
"showSummaryAggrs": false,
"title": {
"value": {
"text": "Headline Account Balance"
}
},
"customTitle": false,
"locked": true
},
"relatedLinks": [],
"header": {
"id": "4e33f9ec-80e3-4080-a24f-ed2e47e9f663",
"indexVersion": 2468,
"generationNum": 2468,
"name": "Headline Account Balance",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1623061257553,
"modified": 1623061257553,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "bf5aad95-efb2-41f1-b3e8-5f7e41dd6a0f",
"isDeleted": false,
"isHidden": false,
"clientState": {
"headlineVizPropVersion": "V1"
},
"tags": [],
"type": "QUESTION",
"isExternal": false,
"isDeprecated": false
},
"complete": true,
"incompleteDetail": []
}
]
},
"header": {
"id": "bf5aad95-efb2-41f1-b3e8-5f7e41dd6a0f",
"indexVersion": 2468,
"generationNum": 2468,
"name": "Total Account Balance",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1623061257553,
"modified": 1623061257553,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "999edb43-7957-495c-bfdf-d2a9de2a4fd6",
"isDeleted": false,
"isHidden": false,
"tags": [],
"type": "QUESTION",
"isExternal": false,
"isDeprecated": false
},
"complete": true,
"incompleteDetail": []
}
]
},
"type": "QUESTION",
"header": {
"id": "999edb43-7957-495c-bfdf-d2a9de2a4fd6",
"indexVersion": 2468,
"generationNum": 2468,
"name": "Total Account Balance",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1623061257553,
"modified": 1623061257553,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "999edb43-7957-495c-bfdf-d2a9de2a4fd6",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"tags": [],
"isExternal": false,
"isDeprecated": false
},
"complete": true,
"incompleteDetail": []
}
],
"debugInfo": {}
}
Get a list of metadata objects
To get a list of metadata objects from the ThoughtSpot resource repository, send a GET
request to the /tspublic/v1/metadata/list
API endpoint.
Request parameters
Query parameter | Description | ||
---|---|---|---|
|
String. Type of the metadata object. To query the details of a specific object type, specify one of the following values as the metadata object
|
||
|
String. A JSON array specifying the sub-types of a metadata object. Based on the value specified for the
|
||
|
String. A JSON array of owner types for metadata object subtypes such as |
||
|
String. The metadata object classification. In ThoughtSpot, metadata objects such as answers and pinboards are categorized under All, Yours, and Favorites. To filter data by category, specify one of the following values:
|
||
|
String. The sort order for the headers returned by the API. Valid values are:
|
||
|
Boolean. A flag to specify the sort order. A null value defines the default order.
|
||
|
Integer. The batch offset value that indicates the index point starting from which the list of objects are retrieved. The system default is -1, which implies the first item in the list. |
||
|
Integer. The batch size of the objects returned in the API response. A value of -1 implies all items starting from the offset value. |
||
|
String. A JSON array containing a set of tag names to filter headers by. |
||
|
String. A pattern to match the name of the metadata object or the username associated with the object. This parameter supports matching case-insensitive strings. For a wildcard match, use |
||
|
Boolean. When set to |
||
|
String. A JSON array containing the GUIDs of the metadata objects that you want to exclude. |
||
|
String. A JSON array containing the GUIDs of the metadata objects that you want to fetch. |
||
|
Boolean. A flag to indicate whether to list only the auto-created objects. A value of null returns all objects. |
Example request
curl -X GET \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
'https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/list?type=PINBOARD_ANSWER_BOOK&category=ALL&sort=DEFAULT&offset=-1&showhidden=false'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/list?type=PINBOARD_ANSWER_BOOK&category=ALL&sort=DEFAULT&offset=-1&showhidden=false
Example response
{
"headers": [
{
"hasTabs": false,
"modelVersion": "V1",
"id": "3dd38ec0-083c-41c3-b0c3-f5c25341e1de",
"indexVersion": 185,
"generationNum": 185,
"name": "y_pin",
"description": "",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1631788734680,
"modified": 1631788736425,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "3dd38ec0-083c-41c3-b0c3-f5c25341e1de",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"resolvedObjects": {},
"tags": [
{
"id": "53a10282-42be-492e-9560-66d5c5f6657d",
"indexVersion": 0,
"generationNum": 0,
"name": "stick me",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1412881354020,
"modified": 1412881354020,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "53a10282-42be-492e-9560-66d5c5f6657d",
"isDeleted": false,
"isHidden": false,
"clientState": {
"color": "#ff78a9"
},
"tags": [],
"isExternal": false,
"isDeprecated": false
}
],
"isExternal": false,
"isDeprecated": false
},
{
"hasTabs": false,
"modelVersion": "V1",
"id": "b4851888-e572-4ac8-ad1a-ffad5899795c",
"indexVersion": 172,
"generationNum": 172,
"name": "p2",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1631785984607,
"modified": 1631785984607,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "b4851888-e572-4ac8-ad1a-ffad5899795c",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"resolvedObjects": {},
"tags": [
{
"id": "7840759b-2cbf-4dca-aaa4-f8b86a8b9dcd",
"indexVersion": 0,
"generationNum": 0,
"name": "try me",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1412881252884,
"modified": 1412881252884,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "7840759b-2cbf-4dca-aaa4-f8b86a8b9dcd",
"isDeleted": false,
"isHidden": false,
"clientState": {
"color": "#fbc17c"
},
"tags": [],
"isExternal": false,
"isDeprecated": false
}
],
"isExternal": false,
"isDeprecated": false
},
{
"hasTabs": false,
"modelVersion": "V1",
"id": "2ff57a24-cf90-485f-8b4b-45fc17474c6f",
"indexVersion": 2,
"generationNum": 2,
"name": "Learn how to use ThoughtSpot",
"description": "This pinboard is to enable learning",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1494392331242,
"modified": 1494392331242,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "2ff57a24-cf90-485f-8b4b-45fc17474c6f",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"resolvedObjects": {},
"tags": [],
"isExternal": false,
"isDeprecated": false
}
],
"isLastBatch": true,
"debugInfo": {}
}
Get metadata objects for a user or user group
To get a list of metadata objects associated with a user or user group, send a GET
request to the /tspublic/v1/metadata/listas
API endpoint.
Request parameters
Query parameter | Description |
---|---|
|
Integer. The batch offset value that indicates the index point starting from which the list of objects should be retrieved. The system default is -1, which implies the first item in the list. |
|
Integer. The batch size of the objects returned in the response. A value of -1 implies all items starting from the offset value. |
|
String. A pattern to match the name of the metadata object associated with the user or user group. This parameter supports matching case-insensitive strings. For a wildcard match, use |
|
String. The GUID of the user or user group.
|
|
String. Minimum access level that the specified user or user group has. Valid values are:
The default value is |
|
String. Type of principal. The allowed values are |
Example request
curl -X GET
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
'https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/listas?offset=-1&pattern=%25&principalid=13bb9aec-aad0-4075-adb9-bd0569351393&minimumaccesslevel=READ_ONLY&type=USER'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/listas?offset=-1&pattern=%25&principalid=13bb9aec-aad0-4075-adb9-bd0569351393&minimumaccesslevel=READ_ONLY&type=USER
Example response
The following example shows the headers for user groups:
{
"headers": [
{
"id": "eea322db-2b8c-4bb7-922d-a80807a0ba94",
"indexVersion": 5,
"generationNum": 1471,
"name": "Stats and Trends for Search on Answers",
"description": "This pinboard describes how users are searching for existing answers.",
"author": "67e15c06-d153-4924-a4cd-ff615393b60f",
"authorName": "system",
"authorDisplayName": "System User",
"created": 1604579772176,
"modified": 1618858656671,
"modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
"owner": "eea322db-2b8c-4bb7-922d-a80807a0ba94",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"tags": [],
"isExternal": false,
"isDeprecated": false
},
{
"id": "9d789a9e-12a7-4b00-91de-e558b590d192",
"indexVersion": 1217,
"generationNum": 1217,
"name": "test table 2",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1618463063893,
"modified": 1618463113058,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "9d789a9e-12a7-4b00-91de-e558b590d192",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"tags": [],
"isExternal": false,
"isDeprecated": false
}
],
"isLastBatch": true,
"debugInfo": {}
}
The following example shows the headers returned for a user:
{
"headers": [
{
"id": "b27d4ce9-0220-4238-b0b0-917ee18147df",
"indexVersion": 1494,
"generationNum": 1494,
"name": "Sales Performance",
"description": "",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1614677491805,
"modified": 1619648685627,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "b27d4ce9-0220-4238-b0b0-917ee18147df",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"tags": [],
"isExternal": false,
"isDeprecated": false
},
{
"id": "8161e7ab-8ada-43ae-9627-f9b76dd85d27",
"indexVersion": 1490,
"generationNum": 1490,
"name": "Copy of Sales Performance",
"description": "",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1619644750652,
"modified": 1619644750652,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "8161e7ab-8ada-43ae-9627-f9b76dd85d27",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"tags": [],
"isExternal": false,
"isDeprecated": false
},
{
"id": "eea322db-2b8c-4bb7-922d-a80807a0ba94",
"indexVersion": 5,
"generationNum": 1471,
"name": "Stats and Trends for Search on Answers",
"description": "This pinboard describes how users are searching for existing answers. It provides what users are searching for, where users are successful and where they are not.",
"author": "67e15c06-d153-4924-a4cd-ff615393b60f",
"authorName": "system",
"authorDisplayName": "System User",
"created": 1604579772176,
"modified": 1618858656671,
"modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
"owner": "eea322db-2b8c-4bb7-922d-a80807a0ba94",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"tags": [],
"isExternal": false,
"isDeprecated": false
},
{
"id": "7e4071e5-6223-4ccd-a839-2621e5d8201e",
"indexVersion": 1230,
"generationNum": 1470,
"name": "Sales Breakdown",
"description": "",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1618469015915,
"modified": 1618469413741,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "7e4071e5-6223-4ccd-a839-2621e5d8201e",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"tags": [
{
"id": "bde9b681-01e8-4156-bf86-170f6cb7d7ab",
"indexVersion": 2045,
"generationNum": 2045,
"name": "Sales",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1621312956892,
"modified": 1621312957239,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "bde9b681-01e8-4156-bf86-170f6cb7d7ab",
"isDeleted": false,
"isHidden": false,
"clientState": {
"color": "#63c9ea"
},
"tags": [],
"isExternal": false,
"isDeprecated": false
}
],
"isLastBatch": true,
"debugInfo": {}
}]
}
Get object headers
To query metadata objects headers for a data type in the Thoughtspot system, send a GET
request to the /tspublic/v1/metadata/listobjectheaders
API endpoint.
Request parameters
Query parameter | Description | ||
---|---|---|---|
|
String. Type of the metadata object. To query data for a specific object type, set the metadata object
|
||
|
String. A JSON array specifying the sub-types of a metadata object. Based on the value specified for the
|
||
|
String. The metadata object classification. In ThoughtSpot, metadata objects such as answers and pinboards are categorized under All, Yours, and Favorites. To query data for an object based on category, set one of the following values:
|
||
|
String. The sort order for the headers returned by the API. Valid values are:
|
||
|
Boolean. A flag to specify the sort order. A null value defines the default order.
|
||
|
Integer. The batch offset value that indicates the index point starting from which the list of object headers should be retrieved. The system default is -1, which implies the first item in the list. |
||
|
Integer. The batch size of the objects returned in the response. A value of -1 implies all items starting from the offset value. |
||
|
String. A JSON array containing a set of tag names to filter headers by. |
||
|
String. A pattern to match the name of the metadata object or the username associated with the object. This parameter supports matching case-insensitive strings. For a wildcard match, use |
||
|
String. A JSON array containing the GUIDs of the metadata objects that you want to exclude. |
||
|
String. A JSON array containing the GUIDs of the metadata objects that you want to fetch. |
||
|
Boolean. A flag to indicate whether to list only the auto-created objects. A value of null returns all objects. |
Example request
curl -X GET \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
'https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/listobjectheaders?type=LOGICAL_TABLE&subtypes=%5B'WORKSHEET'%5D&category=ALL&sort=CREATED&offset=-1'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/listobjectheaders?type=LOGICAL_TABLE&subtypes=%5B'WORKSHEET'%5D&category=ALL&sort=CREATED&offset=-1
Example response
[
{
"id": "3c46f48d-daa8-4da7-8baa-fd72347143dc",
"name": "WS_Line",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1627464397667,
"modified": 1630367206866,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "3c46f48d-daa8-4da7-8baa-fd72347143dc",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "4bd78d45-ed85-4941-8467-07479b129d73",
"name": "ws_e2e",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1627398074706,
"modified": 1627398074709,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "4bd78d45-ed85-4941-8467-07479b129d73",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "8016c464-57f9-4cec-afb6-cb0a9b530085",
"name": "ws_lo",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1627391314614,
"modified": 1627395620394,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "8016c464-57f9-4cec-afb6-cb0a9b530085",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "29899d20-c65a-46d8-b501-799acc0e49ef",
"name": "ws_line_synonym",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1627392964307,
"modified": 1627392964315,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "29899d20-c65a-46d8-b501-799acc0e49ef",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "955f64e2-a1ee-47b1-a322-1495835be753",
"name": "lineorder_ws",
"description": "",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1627390202905,
"modified": 1627390202917,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "955f64e2-a1ee-47b1-a322-1495835be753",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "3b64b1ab-aad7-4453-ad05-14341ba600c0",
"name": "ws_date",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1627385261332,
"modified": 1627385261335,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "3b64b1ab-aad7-4453-ad05-14341ba600c0",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "dc84653d-d3a3-43e0-b8cc-e25e9b653173",
"name": "My Worksheet",
"description": "",
"author": "aa5c00fc-9cc7-4bcf-8bd2-622d294d834b",
"created": 1627308893875,
"modified": 1627308893875,
"modifiedBy": "aa5c00fc-9cc7-4bcf-8bd2-622d294d834b",
"owner": "dc84653d-d3a3-43e0-b8cc-e25e9b653173",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "cd252e5c-b552-49a8-821d-3eadaa049cca",
"name": "Sample Retail - Apparel",
"description": "",
"author": "67e15c06-d153-4924-a4cd-ff615393b60f",
"created": 1590520895516,
"modified": 1620302414025,
"modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
"owner": "cd252e5c-b552-49a8-821d-3eadaa049cca",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "9a527010-0a08-4b54-9700-e6da0a82a084",
"name": "Product Usage",
"author": "67e15c06-d153-4924-a4cd-ff615393b60f",
"created": 1619631459319,
"modified": 1619631580691,
"modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
"owner": "9a527010-0a08-4b54-9700-e6da0a82a084",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "2b9d083a-275c-4984-9cfe-90b036affa17",
"name": "Discover Monitoring Data",
"description": "",
"author": "67e15c06-d153-4924-a4cd-ff615393b60f",
"created": 1604575960913,
"modified": 1616226670804,
"modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
"owner": "2b9d083a-275c-4984-9cfe-90b036affa17",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "965b5f46-7162-4c16-8aac-7ab26f313b25",
"name": "Credit Usage Worksheet",
"description": "Worksheet to track credits consumed for consumption licensing",
"author": "67e15c06-d153-4924-a4cd-ff615393b60f",
"created": 1610966985049,
"modified": 1615366038163,
"modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
"owner": "965b5f46-7162-4c16-8aac-7ab26f313b25",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "7a388e7f-f0b2-4e65-b6da-7aad186dff38",
"name": "Credits Purchased",
"description": "Credits Purchased",
"author": "67e15c06-d153-4924-a4cd-ff615393b60f",
"created": 1610966985100,
"modified": 1610966985100,
"modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
"owner": "7a388e7f-f0b2-4e65-b6da-7aad186dff38",
"isAutoCreated": false,
"isAutoDelete": false
},
{
"id": "eaab6de7-c556-468c-8b4b-ff6d78dd3ecf",
"name": "TS: BI Server",
"description": "",
"author": "67e15c06-d153-4924-a4cd-ff615393b60f",
"created": 1487886483492,
"modified": 1546532557818,
"modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
"owner": "eaab6de7-c556-468c-8b4b-ff6d78dd3ecf",
"isAutoCreated": false,
"isAutoDelete": false
}
]
Get visualization headers
To get a list of visualization headers from the ThoughtSpot system, you can use the /tspublic/v1/metadata/listvizheaders
API.
The API returns a list of visualizations for a given pinboard or answer.
Example request
curl -X GET \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
'https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/listvizheaders?id=97begg839e-71b6-42ad-a980-20c38b4d6db5'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/listvizheaders?id=97be839e-71b6-42ggad-a980-20c38b4d6db5
Example response
[
{
"size": "s",
"vizType": "CHART",
"title": {
"value": {
"text": "Chart 1"
}
},
"id": "9985fccf-b28d-4262-b54b-29619a38348e",
"name": "Total Revenue Trend",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1487851011206,
"modified": 1649041058020,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "061457a2-27bc-43a9-9754-0cd873691bf0"
},
{
"size": "s",
"vizType": "TABLE",
"title": {
"value": {
"text": "Total count Color by Color table"
}
},
"id": "dd006929-9baa-4705-bb55-e037e28e8544",
"name": "Top 20 Color for Revenue by Ship Mode",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1487851011341,
"modified": 1649041058031,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "061457a2-27bc-43a9-9754-0cd873691bf0"
},
{
"size": "s",
"vizType": "HEADLINE",
"title": {
"value": {
"text": "Headline for 31e10b74-4b0a-450d-b035-18f02f014d68"
}
},
"id": "93bc9a18-e606-4a40-8ec6-52cefaee57c5",
"name": "1995 Revenue Trend by Ship Mode",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"created": 1487851011537,
"modified": 1649041058033,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "061457a2-27bc-43a9-9754-0cd873691bf0"
},
{
"vizType": "FILTER",
"title": {
"value": {
"text": "Filter 0"
}
},
"id": "3d3366b0-7be9-4941-85e3-c8af26744df1",
"name": "Untitled",
"author": "67e15c06-d153-4924-a4cd-ff615393b60f",
"created": 1600028570018,
"modified": 1600029455632,
"modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
"owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
}
]
Set objects as favorites
To add a pinboard or answer to a user’s favorites list in ThoughtSpot, send a POST request to the /tspublic/v1/metadata/markunmarkfavoritefor
API endpoint.
Request parameters
Form parameter | Description |
---|---|
|
String. Type of metadata object. Specify one of the following types:
|
|
String. A JSON array of the GUIDs of objects to be set as favorites. |
|
String. The GUID of the user account for which you want to add the object to the favorites list. |
Example request
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' --header 'X-Requested-By: ThoughtSpot' \
-d 'type=PINBOARD_ANSWER_BOOK&ids=%5B%227e38be97-e66f-4274-923f-6fd29a7141f3%22%5D&userid=59481331-ee53-42be-a548-bd87be6ddd4a' \
'https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/markunmarkfavoritefor'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/markunmarkfavoritefor
Remove objects from favorites
To remove a pinboard or answer from the favorites list in a ThoughtSpot user account, send a DELETE request to the /tspublic/v1/metadata/markunmarkfavoritefor
API endpoint.
Request parameters
Form parameter | Description |
---|---|
|
String. A JSON array of the GUIDs of objects to remove from the favorites list. |
|
String. The GUID of the user account for which you want to run the delete operation. |
Example request
curl -X DELETE \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
-d 'ids=%5B%227e38be97-e66f-4274-923f-6fd29a7141f3%22%5D&userid=59481331-ee53-42be-a548-bd87be6ddd4a' \
'https://10.87.89.232/callosum/v1/tspublic/v1/metadata/markunmarkfavoritefor'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/markunmarkfavoritefor