ThoughtSpot Developer Documentation

website·Indexed 41 days ago

https://developers.thoughtspot.com/

Developer resources for ThoughtSpot, featuring documentation for REST API v1 and v2, the Visual Embed SDK for React and web applications, and tools for managing metadata, authentication, and Liveboard integration.

Tokens
221.6K
Snippets
1K
Records
1.5K
Agent score
65%

What's inside ThoughtSpot

  1. Overview of EmbedConfig for ThoughtSpot Embedding

    The EmbedConfig object is the primary configuration mechanism for embedding ThoughtSpot content into applications. It defines critical connection details including the ThoughtSpot hostname or IP address, the authentication type, and the authentication endpoint for trusted authentication servers.
  2. Overview of Multi-tenancy with Orgs

    The Orgs feature allows ThoughtSpot to support multi-tenancy by creating logical boundaries between different departments or distinct organizations. Each Org acts as an independent container with its own users, groups, and data objects. Users belonging to a single Org experience the system as single-tenant; users belonging to multiple Orgs can switch between them via a menu, though all activity occurs within the context of one Org at a time.

    Key Constraints:

    • Requires ThoughtSpot Analytics Enterprise Edition or ThoughtSpot Embedded license.
    • Once enabled, the ability to create Orgs cannot be turned off.
    • The 'Primary Org' (Org 0) is created by default and cannot be deleted; it serves as the administration Org for all others.
  3. Overview of ThoughtSpot Custom Actions

    Custom actions allow developers to add new menu items to the ThoughtSpot UI, extending the standard set of menu commands. These actions can be placed in the primary menu bar, the 'More' options menu, or the contextual menu (triggered by right-clicking an Answer or visualization).

    There are two primary implementation methods:

    1. UI-based: Created via the ThoughtSpot UI under Develop > Customizations > Custom actions.
    2. Code-based: Defined programmatically within an application using the Visual Embed SDK.
  4. Overview of ThoughtSpot Modeling Language (TML)

    ThoughtSpot Modeling Language (TML) is a scriptable format used for exporting, modifying, and migrating metadata objects. It allows developers to manage and version control ThoughtSpot objects outside the UI, facilitating bulk changes, programmatic edits via REST API, and migration between development, test, and production environments. Supported objects include Models, Views, SQL Views, Tables, Answers, Liveboards, Collections, Connections, Joins, and Monitor Alerts.
  5. Overview of AnswerService

    AnswerService is a utility in the ThoughtSpot Visual Embed SDK used to interact with ThoughtSpot Answers programmatically. It enables developers to customize visualizations, filter data, and extract insights directly within an application. Key capabilities include modifying columns, applying filters, fetching data in multiple formats (JSON, CSV, PNG), running custom GraphQL queries, and adding visualizations to Liveboards.
    // Example: Get the answer service and add columns
    embed.on(EmbedEvent.Data, async (e) => {
        const service = await embed.getAnswerService();
    
        // Add columns to the answer
        await service.addColumnsByName(["Sales", "Region"]);
    
        // Get the data
        const data = await service.fetchData();
        console.log(data);
    });
  6. Overview of ThoughtSpot Custom Actions

    Custom actions allow developers to add new menu items to the ThoughtSpot UI, extending the standard set of menu commands. These actions can be placed in the primary menu bar, the 'More' options menu, or the contextual right-click menu on Answers and visualizations. There are two primary ways to implement them: through the ThoughtSpot UI or programmatically via the Visual Embed SDK.
  7. Overview of ThoughtSpot Runtime Filters

    Runtime filters allow you to apply dynamic data constraints to a Liveboard, Answer, visualization, or Spotter conversation session. Unlike persistent filters, these are applied at runtime and are not saved to the object. They are typically used to pre-filter content based on the application user's context.

    Important Constraints:

    • Not a Security Feature: Runtime filters do not provide data security. Use Row Level Security (RLS) for security rules.
    • Column Aliases: If a Model has a column alias, use the underlying base column name in the filter, not the alias.
    • URL Limit: Runtime filter operations will return an error if the resulting URL exceeds 2000 characters.
    • Exporting: Attempting to override existing filter values with runtime filters while exporting a Liveboard will result in an error.
  8. Overview of ThoughtSpot Trusted Authentication

    Trusted authentication is a single sign-on (SSO) method that allows a web application to authenticate users to a ThoughtSpot instance using login tokens. In this flow, the web application performs the actual user authentication and then communicates with a custom token request service to obtain a ThoughtSpot login token. This method can also be used for back-end REST API processes to impersonate specific users to retrieve filtered data based on row-level security.
  9. Overview of ThoughtSpot UI text customization methods

    The Visual Embed SDK provides three ways to override system-generated UI text via the customizations.content object. Note that user-created text (object names, titles, descriptions) cannot be customized, and all overrides are case-sensitive.

    1. stringIDs: Precise, granular overrides mapped to specific internal string IDs. Takes precedence over the strings object if both target the same text.
    2. stringIDsUrl: Loads string ID overrides from a remote JSON file. Requires the hosting domain to be added to CSP and CORS allowlists in ThoughtSpot.
    3. strings: Global replacement of visible strings and substrings. Replaces all occurrences across the UI; use with caution to avoid unintended changes.
  10. Overview of ThoughtSpot custom actions

    Custom actions allow ThoughtSpot users to push data from an Answer or visualization to external applications. These actions are configured by users with developer or admin privileges in the Develop tab. There are two primary types of custom actions: URL actions (sending data to a target URL) and callback actions (triggering a callback event to a parent application with a response payload).
  11. Overview of Row Level Security (RLS) in ThoughtSpot

    Row Level Security (RLS) rules are applied to Tables in ThoughtSpot to restrict data access based on the user's identity or group membership. These rules automatically propagate to all Models, saved answers, and Liveboards derived from the secured Table. RLS is primarily implemented via two patterns: Direct RLS rules (filtering columns on the table itself) and Access Control List (ACL) table rules (referencing a separate entitlements table). For more complex, dynamic attribute-based access control, ABAC via RLS variables should be used.
  12. Overview of ThoughtSpot Git Integration

    ThoughtSpot allows connecting Orgs to a Git repository (currently supporting GitHub and GitHub Enterprise). This enables pushing TML (ThoughtSpot Modeling Language) files to Git branches and deploying commits from those branches back into ThoughtSpot Orgs.

    An environment is defined as a linked pair of a ThoughtSpot Org and a Git branch. Environments can exist across different ThoughtSpot instances (e.g., a 'dev instance' deploying to multiple 'prod instances').