Search embed

Hi, I have a question regarding Metadata API i.e. We have used the Metadata API to display the saved queries to our clients, now we have to navigate to the edit page once any of the query is clicked. What API shall we use for that?
8 Replies
ashish
ashish10mo ago
Hi Nidhi, You would have to use the SearchEmbed component from the visual-embed-sdk to show the edit page for a saved thoughtspot query (answer). https://developers.thoughtspot.com/docs/search-embed
Embed ThoughtSpot Search page
You can use the SearchEmbed SDK library to embed ThoughtSpot search and use it for live queries.
Nidhi
NidhiOP10mo ago
Is there any API to save the query using custom actions also? Thank you, it worked.
ashish
ashish10mo ago
When you say save the query are you saying after a user edits the query in the edit page ? You can use the "Save" Hostevent. https://developers.thoughtspot.com/docs/Enumeration_HostEvent#_save
HostEvent
Event types that can be triggered by the host application to the embedded ThoughtSpot app
Nidhi
NidhiOP10mo ago
Yes, I want to use customAction instead of using the build in Save functionality.
ashish
ashish10mo ago
You can trigger the Hostevent from the custom action callback. It should do the save for you, if the answer is an existing answer it will not popup a modal or anything
Nidhi
NidhiOP10mo ago
I am not able to figure out the API call endpoint.
ashish
ashish10mo ago
There wouldn't be a REST API to save changes made to an answer within the edit page. HostEvent would be the best bet currently.. is that not working ?
Nidhi
NidhiOP10mo ago
It is working fine, just had an additional functionality to save custom query but seems have to drop that now. Thank you for the clarification.

Did you find this page helpful?