Dependent objects APIs
The tspublic/v1/dependency
endpoints allow you to query dependent objects for a metadata object type or ID.
Dependency in ThoughtSpot is defined as a relation between the referenced and referencing objects. If the referenced object cannot be deleted without first deleting the referencing object, the referenced object is considered as a dependent object.
Consider a worksheet (Worksheet1
) that has a derived logical column (Column1
), which in turn has a reference to a base logical column (Column2
).

In the above example, Worksheet1
has a dependency on Column2
, which means that Worksheet1
is a referencing object and Column2
is a referenced object. ThoughtSpot does not allow you to delete Column2
if you have not deleted Worksheet1
, because the deletion of Column2
will be prevented by the relationship between Worksheet1’s
Column1
and Column2
. Similarly, Column1
has a dependency on Column2
; that is, Column1
is a referencing object and Column2
is a referenced object. You cannot delete Column2
without first deleting Column1
.
Before deleting a data object such as a worksheet, table, or column, you must check if it has any dependent objects, and remove its associations.
Types of data objects
The tspublic/v1/dependency
endpoint allows you to query dependency details for the following data object types:
-
LOGICAL_TABLE
for data objects such as tables, worksheets, or views. -
QUESTION_ANSWER_BOOK
for answers. -
PINBOARD_ANSWER_BOOK
for pinboards. -
LOGICAL_COLUMN
for columns of a table, worksheet, or view. -
LOGICAL_RELATIONSHIP
for table joins.A join combines columns from one or several data objects by using matching values.
-
PHYSICAL_COLUMN
for the underlying column objects that exist in the physical layer of the data repository. -
PHYSICAL_TABLE
for the underlying table objects that exist in the physical layer of the data repository.
The APIs require you to specify the GUIDs of the data objects that you want to query. You can use the |
Supported operations
|
Get dependent objects for metadata type
To get a list of dependents for a specific metadata object type, send a POST
request to the /tspublic/v1/dependency/listdependents
endpoint.
Request parameters
Form parameter | Description |
---|---|
|
String. Type of the data object. Valid values are:
|
|
Array of strings. A JSON array of GUIDs of the objects to associate as dependents. |
|
Integer. The maximum number of batches to fetch in a query. If this attribute is not defined, the |
Example request
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'X-Requested-By: ThoughtSpot' \
-d 'id=%5B%22cd252e5c-b552-49a8-821d-3eadaa049cca%22%2C%20%2269428b60-58fd-42d7-b645-16ea3d524a06%22%5D&batchsize=1'\
'https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/dependency/listdependents'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/dependency/listdependents
Example response
If the POST
operation is successful, the API returns a response body with dependent object details:
{
"69428b60-58fd-42d7-b645-16ea3d524a06": {},
"cd252e5c-b552-49a8-821d-3eadaa049cca": {
"PINBOARD_ANSWER_BOOK": [
{
"hasTabs": false,
"modelVersion": "V1",
"id": "d084c256-e284-4fc4-b80c-111cb606449a",
"indexVersion": 12,
"generationNum": 566,
"name": "Sales Performance",
"description": "",
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"authorName": "tsadmin",
"authorDisplayName": "Administrator",
"created": 1620247455573,
"modified": 1620247455573,
"modifiedBy": "59481331-ee53-42be-a548-bd87be6ddd4a",
"owner": "d084c256-e284-4fc4-b80c-111cb606449a",
"isDeleted": false,
"isHidden": false,
"isAutoCreated": false,
"isAutoDelete": false,
"resolvedObjects": {},
"tags": [],
"isExternal": false,
"isDeprecated": false
}
]
}
}