Security APIs
The Security APIs allow you to share ThoughtSpot objects, such as pinboards and visualizations, with another user or a user group. Any ThoughtSpot user can share objects with another user or user group.
Supported operations
|
|
Share objects with another user
To programmatically share ThoughtSpot objects with another user or user group, use the /tspublic/v1/security/share
API endpoint.
When you share an object like a pinboard or visualization, a notification with a live link is sent to the user. When the users access this object, they can view the last saved version of the object.
Request parameters
Form parameter | Description | ||
---|---|---|---|
|
String. Type of metadata object. Specify one of the following values as a metadata object type:
|
||
|
String. A JSON array of the GUIDs of the objects to be shared. |
||
|
String. A string with the GUIDs of the user or user group, and the type of access privilege.
For example, to provide read-only access to a user with a GUID of The following example shows how to set the permission string to provide read-only access to multiple users:
|
||
|
String. The email address of the user accounts with whom you want to share the objects. |
||
|
Boolean. When set to |
||
|
String. The message text to send in the notification email. |
||
|
Boolean. When set to |
Example request
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&id=["237921cc-ebf5-445a-8b7b-15c301f8456e"]&permission={“permissions”:{“237921cc-ebf5-445a-8b7b-15c301f8456e”:{“shareMode”:”READ_ONLY”}}}&emailshares=["tsuser@thoughtspot.com"]¬ify=false&useCustomEmbedUrls=true'\
'https://<ThoughtSpot-host/callosum/v1/tspublic/v1/security/share'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/security/share
Share a visualization with another user or user group
If you want to share a specific visualization from a pinboard with another user or user group, use the /tspublic/v1/security/shareviz
API. This API lets you share the visualization with specific user IDs and provide a read-only access.
Request parameters
Form parameter | Description |
---|---|
|
String. Type of the metadata object. The valid value is |
|
String. The GUID of the pinboard to which the visualization belongs. |
|
Array of strings. A JSON array of the GUID of the users with whom you want to share the visualization. |
|
String. The GUID of visualization. |
|
String. The email address of the user account with whom you want to share the visualization. If no email address is specified, the visualization is shared only with the user IDs specified in |
|
Boolean. When set to |
|
String. The message text to send in the notification email. |
|
Boolean. When set to |
Example request
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&pinboardId=7a9a6715-e154-431b-baaf-7b58246c13dd&principalids=["59481331-ee53-42be-a548-bd87be6ddd4a"]&vizid=e9753523-5de5-41ef-8d8c-b840f0260ea0&emailshares=[tsuser@thoughtspot.com]¬ify=true&useCustomEmbedUrls=false' \
'https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/security/shareviz'
https://<ThoughtSpot-host>/callosum/v1/tspublic/v1/security/shareviz