The Metadata APIs allow you to fetch metadata for ThoughtSpot objects.

The Metadata APIs enable you to fetch metadata details for various objects in the ThoughtSpot system. For example, you may want to see the visualization headers of a particular answer or a pinboard.

Get visualization headers

Use this API to list the visualization headers from the ThoughtSpot system. The expected output includes a list of objects, each with information about the visualizations of the given pinboard or an answer.

Resource URL

get /tspublic/v1/metadata/listvizheaders

Request Parameters

Query Parameter Data Type Description
id string ID of a particular answer or a pinboard.

Request Example

cURL
curl -X GET --header 'Accept: application/json' --header 'X-Requested-By: ThoughtSpot' 'https://<instance>/callosum/v1/tspublic/v1/metadata/listvizheaders?id=97begg839e-71b6-42ad-a980-20c38b4d6db5'
Request URL
https://<instance>/callosum/v1/tspublic/v1/metadata/listvizheaders?id=97be839e-71b6-42ggad-a980-20c38b4d6db5

Response Example

[
  {
    "id": "dd7f5467-99c3-4278-998b-6dd0c4346cd4",
    "name": "Headline Viz answer book guid max timestamp answer book guid != {null} sort by max timestamp descending today last 180 days",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1536179170172,
    "modified": 1536179170172,
    "modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "owner": "ec718bc5-4608-4ea9-93e2-c1f82e9f2b31"
  },
  {
    "id": "fcb65fdb-3965-4f56-8bda-e5e3c2a127a7",
    "name": "Filter Viz answer book guid max timestamp answer book guid != {null} sort by max timestamp descending today last 180 days Row: 1",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1536179170172,
    "modified": 1536179170172,
    "modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "owner": "ec718bc5-4608-4ea9-93e2-c1f82e9f2b31"
  },
  {
    "id": "0f6e7220-5088-4a0e-8122-50b637c356fc",
    "name": "Table Viz answer book guid max timestamp answer book guid != {null} sort by max timestamp descending today last 180 days",
    "author": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "created": 1536179170172,
    "modified": 1536179170172,
    "modifiedBy": "67e15c06-d153-4924-a4cd-ff615393b60f",
    "owner": "ec718bc5-4608-4ea9-93e2-c1f82e9f2b31"
  }
]

Get object headers

Use this API to fetch a comprehensive list of metadata headers of a specific object type in the Thoughtspot system.

Resource URL

get /tspublic/v1/metadata/listobjectheaders

Request Parameters

Query Parameter Data Type Description
type string Specifies the metadata object type. Valid values are:
  • QUESTION_ANSWER_BOOK
  • PINBOARD_ANSWER_BOOK
  • QUESTION_ANSWER_SHEET
  • PINBOARD_ANSWER_SHEET
  • LOGICAL_COLUMN
  • LOGICAL_TABLE
  • LOGICAL_RELATIONSHIP
  • TAG
  • DATA_SOURCE
subtypes string Specifies the sub-types of metadata object. Valid values are:
  • ONE_TO_ONE_LOGICAL
  • WORKSHEET
  • PRIVATE_WORKSHEET
  • USER_DEFINED
  • AGGR_WORKSHEET
Note: This parameter only applies to the LOGICAL_TABLE type.
category string Specifies the metadata object category. Valid values are:
  • ALL
  • MY
  • FAVORITE
  • REQUESTED
sort string Sort order of returned headers. Valid values are:
  • DEFAULT
  • NAME
  • DISPLAY_NAME
  • AUTHOR
  • CREATED
  • MODIFIED
sortascending boolean A flag to specify the sort order. A null value defines the default order.
  • Choose true to set ascending order
  • Choose false to set descending order
offset integer The batch offset to fetch the page headers. The system default is -1 that implies first page.
batchsize integer The batch size of the object. A value of -1 implies no pagination.
tagname string A JSON array containing a set of tag names to filter headers by.
pattern string A pattern to match for object name. Use % for wildcard match.
skipids string IDs of metadata objects to exclude.
fetchids string IDs of metadata objects to fetch.
auto_created boolean A flag that indicates whether to list auto-created objects only. A value of null signifies return all.

Request Example

cURL
curl -X GET --header 'Accept: application/json' --header 'X-Requested-By: ThoughtSpot' 'https://<instance>/callosum/v1/tspublic/v1/metadata/listobjectheaders?type=PINBOARD_ANSWER_BOOK&subtypes=WORKSHEET&category=ALL&sort=CREATED&offset=-1'
Request URL
https://<instance>/callosum/v1/tspublic/v1/metadata/listobjectheaders?type=PINBOARD_ANSWER_BOOK&subtypes=WORKSHEET&category=ALL&sort=CREATED&offset=-1

Response Example

[
  {
    "id": "7752fa9e-db22-415e-bf34-e082c4bc41c3",
    "name": "Basic Pinboard 1",
    "description": "This pinboard contains one TPCH based visualization",
    "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
    "created": 1450823023991,
    "modified": 1504281997165,
    "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
    "owner": "7752fa9e-db22-415e-bf34-e082c4bc41c3",
    "isAutoCreated": false,
    "isAutoDelete": false
  },
  {
    "id": "6715f768-8930-4180-9a3d-1efdbfaa8e7f",
    "name": "Headline Pinboard",
    "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
    "created": 1519940021267,
    "modified": 1519945210514,
    "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
    "owner": "6715f768-8930-4180-9a3d-1efdbfaa8e7f",
    "isAutoCreated": false,
    "isAutoDelete": false
  },
  {
    "id": "601be8e5-140e-477c-8812-843795306438",
    "name": "Pinboard Filter - datatypes",
    "author": "59481331-ee53-42be-a548-bd87be6ddd4a",
    "created": 1519943239150,
    "modified": 1519944533160,
    "modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
    "owner": "601be8e5-140e-477c-8812-843795306438",
    "isAutoCreated": false,
    "isAutoDelete": false
  }
]