Skip to main content

 

ThoughtSpot

Public API reference

Overview

Explains what the feature is or what its benefits are to the user or customer.

Feature

This is a list of all the public ThoughtSpot APIs. The descriptions are aimed to help you solve specific use cases, such as syncing users and groups, or fetching visualization headers.

Public name: pinboarddata

  • Public namespace: Data
  • Current path: tspublic/v1/pinboarddata
  • Implementation notes: Gets the pinboard data from the ThoughtSpot system.
Table 1. Input parameters
Parameter Value Description Parameter Type Data Type
id   GUID id of the pinboard query string
vizid   Optional GUID ids of the visualizations query string
batchsize -1 Batch size query integer
pagenumber -1 PageNumber. Alternate way to set offset. This is 1-based indexingOffset = (pageNumber - 1) * batchSize query integer
offset -1 Offset query integer
formattype COMPACT JSON format type. Values allowed are FULL and COMPACT. query string
Table 2. Response messages
HTTP Status Code Reason Response Model Headers
200 Gets the data of a pinboard/visualization.  
400 Invalid pinboard id.  
default    
Response example:

Curl

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' 'https://dogfood/callosum/v1/tspublic/v1/pinboarddata?batchsize=-1&pagenumber=-1&offset=-1&formattype=COMPACT'
Request URL
https://dogfood/callosum/v1/tspublic/v1/pinboarddata?batchsize=-1&pagenumber=-1&offset=-1&formattype=COMPACT
Response Body
no content
Response Code
400
Response Headers
{
  "x-callosum-incident-id": "2ff9d2e4-c928-4192-8250-8450de264ab7",
  "x-callosum-trace-id": "2e551b8d-d3f4-4cf1-af90-a49bb246ad92",
  "date": "Sun, 19 Feb 2017 03:39:41 GMT",
  "x-callosum-request-time-us": "11536",
  "server": "nginx",
  "pragma": "no-cache",
  "cache-control": "no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0",
  "content-security-policy": "script-src 'self'",
  "connection": "keep-alive",
  "content-length": "0",
  "x-callosum-ip": "192.168.2.247",
  "content-type": null
}

Public name: pinboard/listvizheaders

  • Public namespace: Objects
  • Current path: /tspublic/v1/metadata/listvizheaders
  • Implementation notes: Gets 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.
Table 3. Input parameters
Parameter Value Description Parameter Type Data Type
id   GUID of the reportbook query string
Table 4. Response messages
HTTP Status Code Reason Response Model Headers
200 Gets the visualization headers.  
400 Invalid pinboard GUID.  
default    
Response example:
Curl
curl -X GET --header 'Accept: application/json' 'https://dogfood/callosum/v1/tspublic/v1/metadata/listvizheaders'
Request URL
https://dogfood/callosum/v1/tspublic/v1/metadata/listvizheaders
Response Body
[]
Response Code
200
Response Headers
Header of each visualization header object obtained will have these first class citizens:
  1. id (GUID)
  2. name (String)
  3. author (GUID)
  4. created (Epoch)
  5. modified (Epoch)
  6. modifiedBy (GUID)
  7. owner (GUID)
  8. vizType (String : CHART, TABLE, etc.)
  9. title
{
  "x-callosum-incident-id": "6f10c360-1dc8-4469-8d7d-41c7eab4d883",
  "x-callosum-trace-id": "70d91ca9-7278-4926-8161-bec75bfe3c5e",
  "date": "Sun, 19 Feb 2017 03:19:17 GMT",
  "content-encoding": "gzip",
  "x-callosum-request-time-us": "3437",
  "server": "nginx",
  "vary": "Accept-Encoding",
  "content-type": "application/json",
  "pragma": "no-cache",
  "cache-control": "no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0",
  "transfer-encoding": "chunked",
  "content-security-policy": "script-src 'self'",
  "connection": "keep-alive",
  "x-callosum-ip": "192.168.2.247",
  "x-ua-compatible": "IE=edge"
}

Public name: principal/sync

  • Public namespace: Configuration
  • Current path: tspublic/v1/user/sync.
  • Implementation notes: API to synchronize principal from external system with ThoughtSpot system. This API is for users and groups. It should help to keep ThoughtSpot users and groups synchronized with your external database.

    Specifically, you will have to make a call to /tspublic/v1/user/sync containing all users and groups present in the external database. If the call succeeds, then it is guaranteed that the users and groups in ThoughtSpot match those specified in the list of objects passed to /tspublic/v1/user/sync. This means that:

    • Objects (users or groups) present in ThoughtSpot, but not present in the list passed to a sync call will be deleted.
    • Objects present in ThoughtSpot, and present in the list passed to a sync call will be updated such that the object attributes in ThoughtSpot match those present in the list. This includes group membership.

    • Objects not present in ThoughtSpot, and present in the list will be created in ThoughtSpot.
    The returned object represents the changes that were made in ThoughtSpot.
Table 5. Input parameters
Parameter Value Description Parameter Type Data Type
principals   formData string  
applyChanges true false (default) formData boolean  
password   formData string  
Table 6. Response messages
HTTP Status Code Reason Response Model Headers
200    
default    

Response example:

Curl
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d 'applyChanges=false' 'https://dogfood/callosum/v1/tspublic/v1/user/sync'
Request URL
https://dogfood/callosum/v1/tspublic/v1/user/sync
Response Body
no content
Response Code
415
Response Headers
{
  "x-callosum-incident-id": "645499d1-d0cf-4b3b-bbdc-4296abb9a326",
  "x-callosum-trace-id": "19f7ad7d-226a-4e88-a301-405f85125959",
  "date": "Sun, 19 Feb 2017 03:55:52 GMT",
  "x-callosum-request-time-us": "4545",
  "server": "nginx",
  "pragma": "no-cache",
  "cache-control": "no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0",
  "content-security-policy": "script-src 'self'",
  "connection": "keep-alive",
  "content-length": "0",
  "x-callosum-ip": "192.168.2.247",
  "content-type": null
}

Public name: principal/list

  • Public namespace: Configuration
  • Current path: tspublic/v1/user/list
  • Implementation notes: API to get all users, groups, and their inter-dependencies in the form of principal objects. This API is for users and groups.

    One principal object contains the following properties (* denotes required properties):

    • name*: String to represent the name of the principal.
      Note: This field, in conjunction with whether the object is a user or group, is used to identify a user/group. Consequently, this field is required to be unique (unique for users and groups separately. I.e. you can have user “x” and group “x”).
    • displayName*: String to represent the display name of the principal.

    • description: String to describe the principal.

    • mail: String to represent the email address of the user. This field should be populated only in case of user not group. It is ignored in the case of groups.

    • principalTypeEnum*: The value of this field should be one of the following:

      • LOCAL_USER: User created in the ThoughtSpot system and the validation of the user is done through password saved in the ThoughtSpot database.

      • LOCAL_GROUP: Groups created in the ThoughtSpot system.
    • password: String to represent the password of the user. This field should be only populated in case of user not group. It is ignored in the case of groups. Also password is only required if the user is of LOCAL_USER type. Password is only required when the user is created for the first time. In subsequent update of the user password is not updated even if it changes in the source system.

    • groupNames: List of group names that a principal belongs to directly. Groups and users can belong to other groups.

Table 7. Response messages
HTTP Status Code Reason Response Model Headers
200    
default    

Response example:

Curl
curl -X GET --header 'Accept: application/json' 'https://dogfood/callosum/v1/tspublic/v1/user/list'
Request URL
https://dogfood/callosum/v1/tspublic/v1/user/list
Response Body format
[ 
  {
    "name": "Group 1",
    "displayName": "Group Display Name 1",
    "description": "Group Description 1",
    "principalTypeEnum": "LOCAL_GROUP",
    "groupNames": []
  },
  {
    "name": "Test Name",
    "displayName": "Test DisplayName",
    "principalTypeEnum": "LOCAL_USER"
    "password": "password_123",
    "groupNames": ["Group 1"]
  }
]
Response Body example
[
  {
    "name": "Sales Executives",
    "displayName": "Sales Executives",
    "description": "",
    "created": 1481827712854,
    "modified": 1481827713052,
    "principalTypeEnum": "LOCAL_GROUP",
    "groupNames": []
  },
  {
    "name": "Operations Demo",
    "displayName": "Operations Demo",
    "description": "",
    "created": 1436491036553,
    "modified": 1436498598655,
    "principalTypeEnum": "LOCAL_GROUP",
    "groupNames": []
  },
  {
    "name": "Sales Directors",
    "displayName": "Sales Directors",
    "description": "",
    "created": 1481827747555,
    "modified": 1485805361837,
    "principalTypeEnum": "LOCAL_GROUP",
    "groupNames": []
  },
  {
    "name": "Product",
    "displayName": "Product",
    "description": "",
    "created": 1409250574242,
    "modified": 1477525172084,
    "principalTypeEnum": "LOCAL_GROUP",
    "groupNames": []
  },
  {
    "name": "Sales Development",
    "displayName": "Sales Development",
    "description": "",
    "created": 1481831987186,
    "modified": 1481831987382,
    "principalTypeEnum": "LOCAL_GROUP",
    "groupNames": [
      "Sales"
    ]
  }
]
Response Code
200
Response Headers
{
  "x-callosum-incident-id": "1be6e07b-b7aa-4531-8597-8852760757f0",
  "x-callosum-trace-id": "e92c54ca-d5f1-44a6-ab8e-f6871bb0da8b",
  "date": "Sun, 19 Feb 2017 04:14:13 GMT",
  "content-encoding": "gzip",
  "x-callosum-request-time-us": "19720",
  "server": "nginx",
  "vary": "Accept-Encoding",
  "content-type": "application/json",
  "pragma": "no-cache",
  "cache-control": "no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0",
  "transfer-encoding": "chunked",
  "content-security-policy": "script-src 'self'",
  "connection": "keep-alive",
  "x-callosum-ip": "192.168.2.247",
  "x-ua-compatible": "IE=edge"
}
  • Was this article helpful?