createLiveboardWithAnswers(answers: AnswerService[] , name: string ) : Promise< any >
Creates a new Liveboard in ThoughtSpot using the provided AnswerService instances.
Each answer will be added as a visualization to the newly created Liveboard.
Function Parameters
- answers
-
-
answers: AnswerService[]
-
An array of initialized AnswerService
instances
representing the answers to be added to the Liveboard.
- name
-
-
name: string
-
The name of the Liveboard to create.
Returns
Promise< any >
Version : SDK: 1.33.1 | ThoughtSpot: *
import { EmbedEvent, AnswerService } from "@thoughtspot/visual-embed-sdk";
embed.on(EmbedEvent.Data, async () => {
try {
const answerService = await embed.getAnswerService();
const lb = await createLiveboardWithAnswers(
[answerService],
"My Liveboard"
);
console.log("Liveboard created:", lb);
} catch (err) {
console.error("Failed to create liveboard:", err);
}
});
Defined in : utils/liveboardService/liveboardService.ts