Metadata APIs

Metadata APIs

The metadata APIs allow you to query metadata objects from the ThoughtSpot system. The metadata objects include answers, Liveboards, 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πŸ”—

API endpointAvailable from

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

ThoughtSpot Cloud ts7.jun.cl
ThoughtSpot Software 7.1.1

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

ThoughtSpot Cloud ts7.sep.cl
ThoughtSpot Software 7.2.1

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

ThoughtSpot Cloud ts7.jun.cl
ThoughtSpot Software 7.1.1

GET /tspublic/v1/metadata/list
Gets a list of all metadata objects from the ThoughtSpot resource repository.

ThoughtSpot Cloud ts7.sep.cl
ThoughtSpot Software 7.2.1

The authorguid attribute is available from ThoughtSpot Cloud ts8.nov.cl and ThoughtSpot Software 8.4.1-sw onwards.

GET /tspublic/v1/metadata/listas
Gets a list of metadata objects that are available to a user or user group.

ThoughtSpot Cloud ts7.may.cl
ThoughtSpot Software 7.1.1

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

ThoughtSpot Cloud ts7.may.cl
ThoughtSpot Software 6.0.x

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

ThoughtSpot Cloud ts7.may.cl
ThoughtSpot Software 6.0.x

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

ThoughtSpot Cloud ts7.jun.cl
ThoughtSpot Software 7.1.1

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

ThoughtSpot Cloud ts7.jun.cl
ThoughtSpot Software 7.1.1

POST /tspublic/v1/metadata/delete
Deletes one or several metadata objects.

ThoughtSpot Cloud 9.0.0.cl
ThoughtSpot Software 9.0.1.sw

Required permissionsπŸ”—

  • You must have edit access to the metadata objects to query data, set an object as a favorite, and assign or remove tags,

  • To query user or group metadata objects, you must have administrator access.

Assign tags to metadata objectsπŸ”—

Tags are labels that you can apply to a Thoughtspot object, such as a Liveboard or Answer. You can use tags to find and filter your answers, Liveboards, 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.

Note

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 parameterDescription

id

String. A JSON array of the metadata object GUIDs. For example, a Liveboard or Answer.

type

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

  • 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 Liveboard and Answer, specify a JSON array of the Liveboard 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 codeDescription

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 parameterDescription

id

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

type

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

  • 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 Liveboard and Answer, specify a JSON array of the Liveboard 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 codeDescription

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 parameterDescription

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

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

orgScope

Optional. The Org scope. To query user metadata for all Orgs on your cluster, set the Org scope to ALL. If the Org scope is not set, ThoughtSpot returns metadata for only the user objects in your current Org context.

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 Liveboard 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 codeDescription

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 parameterDescription

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

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

Important

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.

    Important

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

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

authorguid Optional

String. The GUID of the author of the specified metadata object.

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 Liveboard 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 codeDescription

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 parameterDescription

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 Liveboard 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 Liveboard 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 CodeDescription

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 parameterDescription

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

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

Important

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.

    Important

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

  • 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 codeDescription

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 Liveboard or Answer.

Resource URLπŸ”—

GET /tspublic/v1/metadata/listvizheaders

Request parametersπŸ”—

Query parameterDescription

id

String. ID of a saved Answer or a Liveboard.

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": "xs",
    "vizType": "HEADLINE",
    "title": {
      "value": {
        "text": "Headline User"
      }
    },
    "id": "fa934657-e347-4de7-b02d-3b46609233cc",
    "name": "MAU Last 30 Days",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569951,
    "modified": 1600029455591,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "ms",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "76fc7ab5-5a9b-4eee-80a6-b8328d4d0afc",
    "name": "ThoughtSpot Champions Last 30 Days",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569955,
    "modified": 1600029455593,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "6abbd815-1451-48f2-a199-92bdf722cd2b",
    "name": "Popular Pinboards Last 30 Days",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569957,
    "modified": 1600029455594,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "xs",
    "vizType": "HEADLINE",
    "title": {
      "value": {
        "text": "Headline answer"
      }
    },
    "id": "bd93a45a-43eb-4639-8f48-b7ed6c2f79c3",
    "name": "Count of Current Pinboards",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569960,
    "modified": 1600029455596,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "ms",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "2c195fba-3942-4075-b789-e21e6449d933",
    "name": "Top 10 Adhoc Searchers",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569962,
    "modified": 1600029455597,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "ms",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "eb77ba14-15de-4d4d-aac4-625ebd58b1c6",
    "name": "Top 10 Pinboard Consumers Last 30 days",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569964,
    "modified": 1600029455599,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "xs",
    "vizType": "HEADLINE",
    "title": {
      "value": {
        "text": "Headline Unique Number of User"
      }
    },
    "id": "c660b43e-ff56-4394-9909-3c4b66db2bd6",
    "name": "WAU Last 4 Weeks",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569966,
    "modified": 1600029455601,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "xs",
    "vizType": "HEADLINE",
    "title": {
      "value": {
        "text": "Headline Unique Number of User"
      }
    },
    "id": "0d0eb44d-4d9f-4af6-913c-2d0439be2fd6",
    "name": "Unique Count User",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569968,
    "modified": 1600029455601,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "xs",
    "vizType": "HEADLINE",
    "title": {
      "value": {
        "text": "Headline User"
      }
    },
    "id": "62f98ad3-6ddd-4aed-8f13-58054295b7e3",
    "name": "Inactive Users",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569969,
    "modified": 1600029455602,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "ls",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "83342996-1909-48a0-a333-d7474a721deb",
    "name": "Daily Active Users",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569972,
    "modified": 1600029455603,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "ls",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "4394f4b7-7bce-4031-ba27-cea587f295ec",
    "name": "Weekly Active Users",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569974,
    "modified": 1600029455604,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "ls",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "db598058-2986-4f96-b6cf-ac00c6d0dc47",
    "name": "Hourly Active Users",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569975,
    "modified": 1600029455605,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "907d0cd0-b464-4acc-99d5-13ad36abdfb1",
    "name": "Weekly User Action Group Ratio",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569977,
    "modified": 1600029455605,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "8dd121b2-77fb-4735-8b8d-62e229ec9eaf",
    "name": "Weekly User Action Group",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569981,
    "modified": 1600029455609,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "ls",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "252ea9aa-e593-4c6d-a366-97eecc5e81e2",
    "name": "Top 50 Power Use Engagment",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569985,
    "modified": 1600029455612,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "d7019435-6ed3-4abe-91f3-02f0b9a9966c",
    "name": "User Actions Last 4 Weeks",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028569997,
    "modified": 1600029455613,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "b3b9f7ed-1d52-4053-bc08-9f03fe353c1e",
    "name": "Top 10 Pinboards Ratio by Views",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028570001,
    "modified": 1600029455617,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "CHART",
    "title": {
      "value": {
        "text": "Chart 0"
      }
    },
    "id": "a02db236-be4c-41c5-9484-34499f1d269a",
    "name": "Top 10 Pinboards Ratio by Users",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028570005,
    "modified": 1600029455620,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "TABLE",
    "title": {
      "value": {
        "text": "Table 1"
      }
    },
    "id": "43979699-9c0d-4012-9006-69b89e799290",
    "name": "Abandoned Pinboards",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028570010,
    "modified": 1600029455624,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "TABLE",
    "title": {
      "value": {
        "text": "Table 1"
      }
    },
    "id": "4c8f35eb-d9aa-4fbd-98a4-4a1856985610",
    "name": "Abandoned Answers",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028570013,
    "modified": 1600029455626,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "TABLE",
    "title": {
      "value": {
        "text": "Table 1"
      }
    },
    "id": "ff189c71-aeca-469b-bff1-e9439fbf14e6",
    "name": "Inactive Users",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028570015,
    "modified": 1600029455628,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "xs",
    "vizType": "HEADLINE",
    "title": {
      "value": {
        "text": "Headline Unique Number of User"
      }
    },
    "id": "2368900c-174c-47bf-a1fa-8d441214e332",
    "name": "DAU Last 4 Weeks",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028570017,
    "modified": 1600029455629,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "size": "m",
    "vizType": "TABLE",
    "title": {
      "value": {
        "text": "Table 1"
      }
    },
    "id": "ab08ce55-953c-45b5-9ea5-c12ba258088b",
    "name": "User Profile",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600029091562,
    "modified": 1600029455630,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  },
  {
    "vizType": "FILTER",
    "id": "3d3366b0-7be9-4941-85e3-c8af26744df1",
    "name": "Untitled",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1600028570018,
    "modified": 1600029455632,
    "modifiedBy": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9",
    "owner": "bea79810-145f-4ad0-a02c-4177a6e7d861"
  }
]

Response codesπŸ”—

HTTP status codeDescription

200

Successful retrieval of the visualization headers list

400

Invalid object ID

Set objects as favoritesπŸ”—

To add a Liveboard 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 parameterDescription

type

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

  • PINBOARD_ANSWER_BOOK for Liveboards

  • 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 codeDescription

204

Successful operation

400

Invalid object or user ID

500

Invalid metadata type

Remove objects from favoritesπŸ”—

To remove a Liveboard 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 parameterDescription

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 codeDescription

204

Successful operation

400

Invalid object or user ID

Delete metadata objectsπŸ”—

To delete a metadata object, send a POST request to the /tspublic/v1/metadata/delete API endpoint.

Resource URLπŸ”—

POST /tspublic/v1/metadata/delete

Request parametersπŸ”—

Form parameterDescription

type

String. Type of the metadata object:

  • QUESTION_ANSWER_BOOK for answers.

  • PINBOARD_ANSWER_BOOK for Liveboards.

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

  • TAG for tags assigned to a metadata object.

id

String. A JSON array of metadata object GUIDs.

includedisabled

Boolean. Allows including metadata objects that are hidden, disabled, or marked for deletion.

Example requestπŸ”—

cURL
curl -X POST \--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
-d 'type=QUESTION_ANSWER_BOOK&id=%5B%22e387ba3c-12f8-4a2d-a088-fe0ea9e93c5b%22%5D&includedisabled=true'  \
'https://{ThoughtSpot-host}/callosum/v1/tspublic/v1/metadata/delete'
Request URL
https://{ThoughtSpot-host}/callosum/v1/tspublic/v1/metadata/delete

Example responseπŸ”—

When the specified object is successfully deleted from ThoughtSpot, the API returns the 204 response code.

Response Code
204

Response codesπŸ”—

HTTP status codeDescription

204

Successful operation

400

Invalid object or user ID