Hey All! Please can someone help me with
Hey All! Please can someone help me with following questions
1. How to configure Search data button inside the liveboard experience to trigger onclick event to render custom searchEmbed? I already have a liveboard i want to customize search embed experience by writing my own
SearchEmbed
2. When user login to thoughtspot via website, how can i fetch the list of user created liveboards?
3. How can i get the shared reports list i.e. reports shared with me and is this list separate from the user created list?15 Replies
1. Are you doing
AppEmbed
? You can hide the top nav (where the button is) using the config flag or hide just the "Search Data" button using CSS rules. Then you can provide your own button. We do not have an event for the "Search Data" button you can listen to right now.
2. You can use this https://developers.thoughtspot.com/docs/restV2-playground?apiResourceId=http%2Fapi-endpoints%2Fmetadata%2Fsearch-metadata API endpoint. There are options you can alter on the payload to get the desired output.
Which authtype are you using ? Cookieless or cookies ?REST API v2.0 Playground
ThoughtSpot REST API v2.0 Playground
I am using LiveboardEmbed for rendering liveboard.
This is the search button i am talking about.
- go to thoughtspot
- go to liveboard tab
- create new liveboard
- click on the newly created liveboard
- you see empty liveboard with "search data" button. This one today triggers SearchEmbed, but how can i render a custom SearchEmbed through code.
I am using SDK FYI
'@thoughtspot/visual-embed-sdk'
Please can you provide inputs wrt SDK
authType: AuthType.TrustedAuthToken,
Thanks for the clarification.
That button is not yet customizable. You could use css selectors to hide it and provide your own button in your UI.
You could just call the above mentioned API (using fetch etc) to achieve what you want, it should use the cookies set by the SDK during initial auth already.
Got it! Thanks
Please can you help me with 3rd question How can i get the shared reports list i.e. reports shared with me and is this list separate from the user created list?
There is a property you can pass in the API called "created_by_user" where you can pass the username of the current user to filter just the user created and not shared with the user objects.

Thank you will look into it! Appreciate your inputs👍
Hi Ashish! I hope you are doing well
So i looked into the button and attaching the image of code what i am looking.
I don't see data-testid which i can use to hide the search button.
When you said css selectors please can you be specific what to use given i don't want to hack using the styles as this will be in prod and if thoughtspot decided to change any of the styles naming, code will break.
i am trying to look at cleaner solution which will not break the code based on changes from thoughtspot given this is not public API exposed by thoughtspot and i am assuming any changes to UI will not be notified to make necessary updates? correct me if i am wrong.

.button-module__buttonWrapper {
display: none;
}.
Hi Kruthi, yes the CSS rules can be unstable that's why the property name says that too. Currently CSS rules are the only way but we can introduce a property to hide it as a first class. That will take some time to be released/deployed, you could use the rules until then ?
Sounds good, i will use the css class for now. Please can you share the case or ticket to track the progress of when the property to hide will be release. Thanks!
is it possible to expose the
onclick
event for this button which just solves the issue i am trying to solve. i.e. to add my searchEmbed to this onClick
event.You would also want to block the default action of opening search embed as well right ? We have not built the infra for that
yes but if i control the default onclick action on the button then shouldn't that automatically disable the default action since everytime a user clicks on the button it will trigger my code?
Regarding getting list of liveboard created by me or based on logged in user i see
Users with ADMINISTRATION (Can administer ThoughtSpot) privileges can view data for all metadata objects, including users and groups.
the search metadata API needs admin permissions. If i am an user and i have created a report using customer website which internally creates report on thoughspot. When user logs in to our website i want to fetch all there reports and populate in sidebar for easy nav.On onclick:
- its an additional callback right now, it does not override the default callback.
On the search API:
- Any user can trigger the API, for an admin user it returns all objects since they have access to all objects. The parameters you send to the API would still work.
Thanks for your inputs!
Wrt using css classes to hide search button, today we use iframe to embed thoughtspot into our website. Because of same-origin policy (restricts how documents interact from different origins) what is the best way that's recommend today to access elements inside iframe
https://developers.thoughtspot.com/docs/custom-css ... Look at the "rules_UNSTABLE"
Customize CSS
Customize styles, design, and layout of embedded ThoughtSpot app using custom CSS