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

POST /tspublic/v1/metadata/assigntag
Assigns tags to a metadata object, such as a pinboard, search answer, table, worksheet, or view.

POST /tspublic/v1/metadata/unassigntag
Removes tag associations to metadata objects.

GET /tspublic/v1/metadata/details
Gets metadata details for a specific data object such as a pinboard, search answer, or a worksheet.

GET /tspublic/v1/metadata/list
Gets a list of metadata objects from the ThoughtSpot system.

GET /tspublic/v1/metadata/listas
Gets a list of metadata objects for a user or user group.

GET /tspublic/v1/metadata/listobjectheaders
Lists metadata object headers in the repository.

GET /tspublic/v1/metadata/listvizheaders
Gets visualization headers from the ThoughtSpot system.

POST /tspublic/v1/metadata/markunmarkfavoritefor
Adds objects to favorites for a given user account.

DELETE /tspublic/v1/metadata/markunmarkfavoritefor
Removes the objects from a user’s favorites list.

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.

Resource URL

POST /tspublic/v1/metadata/assigntag

Request parameters

Form parameter Description

id

String. A JSON array of the metadata object GUIDs. For example, a pinboard or answer.

type Optional

String. Type of the metadata object. Specify any of the following values as a metadata object type:

  • QUESTION_ANSWER_BOOK for answers.

  • PINBOARD_ANSWER_BOOK for pinboards.

  • LOGICAL_TABLE for any data object such as a table, worksheet, or view.

  • LOGICAL_COLUMN for a column of any data object such as tables, worksheets, or views.

For example, if you want to assign a tag named Sales to a pinboard and answer, specify a JSON array of the pinboard and answer GUIDs in id and set the type as ["PINBOARD_ANSWER_BOOK","QUESTION_ANSWER_BOOK"].

tagid

String. A JSON array of the GUIDs of the tags that you want to apply to the specified objects. The tagid attribute is optional if the tagname attribute is specified.

tagname

String. A JSON array of the names of tags that you want to apply to the specified objects. The tagname attribute is optional if tagid is specified.

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=%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'
Request URL
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/assigntag

Example response

Response code

204

Response codes

HTTP status code Description

204

Successful application of tag to a metadata object

400

Invalid parameter value

500

Invalid metadata object ID

Unassign tags

To remove the tags assigned to a ThoughtSpot object, send a POST request to the /tspublic/v1/metadata/unassigntag endpoint.

Resource URL

POST /tspublic/v1/metadata/unassigntag

Request parameters

Form parameter Description

id

String. A JSON array of the pinboard and answer GUIDs for which you want to remove the tags.

type Optional

String. Type of the metadata object. Specify any of the following values as a metadata object type:

  • QUESTION_ANSWER_BOOK for answers.

  • PINBOARD_ANSWER_BOOK for pinboards.

  • LOGICAL_TABLE for any data object such as a table, worksheet, or view.

  • LOGICAL_COLUMN for a column of any data object such as tables, worksheets, or views.

For example, if you want to remove a tag named Sales from a pinboard and answer, specify a JSON array of the pinboard and answer GUIDs in id and set the type as ["PINBOARD_ANSWER_BOOK","QUESTION_ANSWER_BOOK"].

tagid

String. A JSON array of the GUIDs of the tags assigned to the specified object.

tagname

String. A JSON array of the names of the tags assigned to the specified objects.

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=%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'
Request URL
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/unassigntag

Example response

If the tag removal operation is successful, the API returns the following response:

Response code

204

Response codes

HTTP status code Description

204

Successful application of tag to a metadata object

400

Invalid parameter value

500

Invalid metadata object ID

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.

Resource URL

GET /tspublic/v1/metadata/details

Request parameters

Query parameter Description

type

String. Type of the metadata object. To query the details of a specific object type, set the metadata object type to one of the following values:

  • QUESTION_ANSWER_BOOK for answers.

  • PINBOARD_ANSWER_BOOK for pinboards.

  • LOGICAL_TABLE for any data object such as a table, worksheet, or view.

  • LOGICAL_COLUMN for a column of any data object such as tables, worksheets, or views.

  • LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines columns from one or several data objects by using matching values.

  • TAG for tag objects.

  • DATA_SOURCE for data source connections from which the metadata objects were loaded.

  • USER for user objects.

  • USER_GROUP for user group objects.

id

String. A JSON array of GUIDs of the objects.

showhidden

Boolean. When set to true, returns details of the hidden objects, such as a column in a worksheet or a table. By default, this attribute is set to false.

dropquestiondetails

Boolean. When set to true, the search assist data associated with a worksheet is not included in the API response. This attribute is applicable only for LOGICAL_TABLE data type. By default, this attribute is set to false.

version Optional

Long integer. Object version. By default, the API returns metadata for all versions of the object.

Example request

cURL
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'
Request URL
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": {}
}

Response codes

HTTP status code Description

200

Successful retrieval of metadata details

400

Invalid request

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.

Resource URL

GET /tspublic/v1/metadata/list

Request parameters

Query parameter Description

type

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 type:

  • QUESTION_ANSWER_BOOK for answers.

  • PINBOARD_ANSWER_BOOK for pinboards.

  • LOGICAL_TABLE for any data object such as a table, worksheet, or view.

  • LOGICAL_COLUMN for a column of any data object such as tables, worksheets, or views.

  • LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines columns from one or several data objects by using matching values.

  • DATA_SOURCE for external data source connections that are mapped in ThoughtSpot to support live query of data.

  • TAG for tag objects.

  • USER for user objects.

  • USER_GROUP for user group objects.

The QUESTION_ANSWER_SHEET and PINBOARD_ANSWER_SHEET metadata object types are deprecated.

subtypes Optional

String. A JSON array specifying the sub-types of a metadata object. Based on the value specified for the type attribute, you can query data objects of specific subtypes:

  • For the LOGICAL_TABLE metadata object type, the valid subtypes are:

    • ONE_TO_ONE_LOGICAL for tables

    • WORKSHEET for worksheets. A worksheet is a collection of related tables.

    • USER_DEFINED for imported data; For example, the tables uploaded from a CSV file.

    • AGGR_WORKSHEET for views. A View in ThoughtSpot refers to a table materialized from a saved answer that was saved as a view by a user.

    The PRIVATE_WORKSHEET metadata subtype is deprecated.

  • For LOGICAL_COLUMN and LOGICAL_RELATIONSHIP metadata object types, the valid subtypes include:

    • FORMULA to query a list of formulas applied to a worksheet column.

    • CALENDAR_TYPE to query the type of calendar used by the DATE TYPE column in a worksheet.

    • CALENDAR_TABLE to query columns that have a custom calendar configured.

ownertypes Optional

String. A JSON array of owner types for metadata object subtypes such as ONE_TO_ONE_LOGICAL, WORKSHEET, USER_DEFINED, and AGGR_WORKSHEET.

category Optional

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:

  • ALL to get all objects for a given metadata type, for example, answers or pinboards.

  • MY to get the objects created or saved by the current logged-in user.

  • FAVORITE to get a list of objects marked as favorites by the current logged-in user.

  • REQUESTED to get only the objects requested by the current logged-in user.

sort Optional

String. The sort order for the headers returned by the API. Valid values are:

  • DEFAULT

  • NAME

  • DISPLAY_NAME

  • AUTHOR

  • CREATED

  • MODIFIED

sortascending Optional

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. 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.

batchsize Optional

Integer. The batch size of the objects returned in the API response. A value of -1 implies all items starting from the offset value.

tagname Optional

String. A JSON array containing a set of tag names to filter headers by.

pattern Optional

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 %.

showhidden

Boolean. When set to true, returns details of the hidden objects, such as a column in a worksheet or a table. By default, this attribute is set to false.

skipids Optional

String. A JSON array containing the GUIDs of the metadata objects that you want to exclude.

fetchids Optional

String. A JSON array containing the GUIDs of the metadata objects that you want to fetch.

auto_created Optional

Boolean. A flag to indicate whether to list only the auto-created objects. A value of null returns all objects.

Example request

cURL
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'
Request URL
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": {}
}

Response codes

HTTP status code Description

200 204

Successful retrieval of metadata objects

400

Invalid parameter

500

Invalid metadata type

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.

Resource URL

GET /tspublic/v1/metadata/listas

Request parameters

Query parameter Description

offset Optional

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.

batchsize Optional

Integer. The batch size of the objects returned in the response. A value of -1 implies all items starting from the offset value.

pattern Optional

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 %.

principalid Optional

String. The GUID of the user or user group.

  • If you specify a userID and set the type parameter to USER, the API returns metadata objects associated with the user ID.

  • If you specify a user group ID and set the type parameter to USER_GROUP, the API returns metadata objects for all the users mapped to the specified user group.

  • If the principalID parameter is not defined, but the type attribute is set to USER, the API returns metadata objects for the current logged-in user.

  • If the principalID parameter is not defined, but the type attribute is set to USER_GROUP, the API returns metadata objects for all user groups.

  • If both principalID and type parameters are not defined, the API returns headers for all users.

minimumaccesslevel Optional

String. Minimum access level that the specified user or user group has. Valid values are:

  • NO_ACCESS

  • READ_ONLY

  • MODIFY

The default value is NO_ACCESS.

type Optional

String. Type of principal. The allowed values are USER and USER_GROUP.

Example request

cURL
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'
Request URL
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": {}
}]
}

Response codes

HTTP status Code Description

200

Successful retrieval of the metadata headers

401

Unauthorized request

404

The requested resource could not be found

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.

Resource URL

GET /tspublic/v1/metadata/listobjectheaders

Request parameters

Query parameter Description

type Optional

String. Type of the metadata object. To query data for a specific object type, set the metadata object type to one of the following values:

  • QUESTION_ANSWER_BOOK for answers.

  • PINBOARD_ANSWER_BOOK for pinboards.

  • LOGICAL_TABLE for any data object such as a table, worksheet, or view.

  • LOGICAL_COLUMN for a column of any data object such as tables, worksheets, or views.

  • LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines columns from one or several data objects by using matching values.

  • TAG for tags assigned to a metadata object.

  • DATA_SOURCE for data source connections from which the metadata objects were loaded.

  • USER for data objects associated with a user.

  • USER_GROUP for data objects associated with a user group.

The QUESTION_ANSWER_SHEET and PINBOARD_ANSWER_SHEET metadata object types are deprecated.

subtypes Optional

String. A JSON array specifying the sub-types of a metadata object. Based on the value specified for the type attribute, you can query data objects of specific subtypes:

  • For the LOGICAL_TABLE metadata object type, the valid subtypes are:

    • ONE_TO_ONE_LOGICAL for tables

    • WORKSHEET for worksheets. A worksheet is a collection of related tables.

    • USER_DEFINED for imported data; For example, the tables uploaded from a CSV file.

    • AGGR_WORKSHEET for views. A View in ThoughtSpot refers to a table materialized from an answer saved as a view by a user.

The PRIVATE_WORKSHEET metadata subtype is deprecated.

  • For LOGICAL_COLUMN and LOGICAL_RELATIONSHIP metadata object types, the valid subtypes include:

    • FORMULA to query a list of formulas applied to a worksheet column.

    • CALENDAR_TYPE to query the type of calendar used by the DATE TYPE column in a worksheet.

    • CALENDAR_TABLE to query columns that have a custom calendar configured.

category Optional

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:

  • ALL to get all objects for a given metadata type, for example, answers or pinboards.

  • MY to get the objects created or saved by the current logged-in user.

  • FAVORITE to get a list of objects marked as favorites by the current logged-in user.

  • REQUESTED to get only the objects requested by the current logged-in user.

sort Optional

String. The sort order for the headers returned by the API. Valid values are:

  • DEFAULT

  • NAME

  • DISPLAY_NAME

  • AUTHOR

  • CREATED

  • MODIFIED

sortascending Optional

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. 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.

batchsize Optional

Integer. The batch size of the objects returned in the response. A value of -1 implies all items starting from the offset value.

tagname Optional

String. A JSON array containing a set of tag names to filter headers by.

pattern Optional

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 %.

skipids Optional

String. A JSON array containing the GUIDs of the metadata objects that you want to exclude.

fetchids Optional

String. A JSON array containing the GUIDs of the metadata objects that you want to fetch.

auto_created Optional

Boolean. A flag to indicate whether to list only the auto-created objects. A value of null returns all objects.

Example request

cURL
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'
Request URL
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
  }
]

Response codes

HTTP status code Description

200

Successful retrieval of metadata headers

400

Invalid metadata subtype

500

Invalid metadata type

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.

Resource URL

GET /tspublic/v1/metadata/listvizheaders

Request parameters

Query parameter Description

id

String. ID of a saved answer or a pinboard.

Example request

cURL
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'
Request URL
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"
  }
]

Response codes

HTTP status code Description

200

Successful retrieval of the visualization headers list

400

Invalid object ID

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.

Resource URL

POST /tspublic/v1/metadata/markunmarkfavoritefor

Request parameters

Form parameter Description

type

String. Type of metadata object. Specify one of the following types:

  • PINBOARD_ANSWER_BOOK for pinboards

  • QUESTION_ANSWER_BOOK for answers

ids

String. A JSON array of the GUIDs of objects to be set as favorites.

userid

String. The GUID of the user account for which you want to add the object to the favorites list.

Example request

cURL
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'
Request URL
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/markunmarkfavoritefor

Example response

When the specified object is successfully added to a user’s favorites list, the following response code is returned.

Response Code
204

Response codes

HTTP status code Description

204

The object is successfully added to favorites

400

Invalid object or user ID

500

Invalid metadata type

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.

Resource URL

DELETE /tspublic/v1/metadata/markunmarkfavoritefor

Request parameters

Form parameter Description

ids

String. A JSON array of the GUIDs of objects to remove from the favorites list.

userid

String. The GUID of the user account for which you want to run the delete operation.

Example request

cURL
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'
Request URL
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/metadata/markunmarkfavoritefor

Example response

When the specified object is successfully deleted from the favorites list in the user account, the following response code is returned.

Response Code
204

Response codes

HTTP status code Description

204

The object is successfully added to favorites

400

Invalid object or user ID