diff --git a/modules/ROOT/pages/abac-user-parameters.adoc b/modules/ROOT/pages/abac-user-parameters.adoc index 059271ba6..572196c58 100644 --- a/modules/ROOT/pages/abac-user-parameters.adoc +++ b/modules/ROOT/pages/abac-user-parameters.adoc @@ -1,76 +1,63 @@ -= ABAC via tokens += ABAC via tokens (Legacy method) :toc: true -:toclevels: 3 +:toclevels: 2 :page-title: ABAC via tokens :page-pageid: abac-user-parameters :page-description: Attribute-based access control pattern can be achieved via user parameters sent in the login token -In Attribute-Based Access Control (ABAC) implementation, security entitlements are sent in as lists of attributes at session creation time via the authentication service. - -This article provides a detailed overview of the ABAC implementation via tokens for row-level security (RLS), and lists configuration recommendations, and best practices. +ThoughtSpot's Attribute-Based Access Control (ABAC) implementation allows administrators to send user-specific security entitlements as attributes at session creation via JSON Web Token (JWT) tokens. [IMPORTANT] ==== -The ABAC feature is disabled by default on ThoughtSpot instances. To enable this feature on your instance, contact ThoughtSpot Support. +The ABAC feature is disabled by default on ThoughtSpot instances. To implement ABAC with data security in ThoughtSpot, refer to the instructions in the xref:abac_rls-variables.adoc[ABAC via RLS with template variables] documentation. ==== +== Overview -// * The `user_parameters` property in `auth/token/full` and `auth/token/object` APIs used for the beta implementation of ABAC is deprecated in 10.4.0.cl. -// * Starting with 10.4.0.cl, security attributes for ABAC will not be stored in the `user` > `user_parameters` object. All ABAC-related security rules and filters applied via token generated using the `/api/rest/2.0/auth/token/custom` API endpoint are stored in the `user` > `access_control_properties` object. -// * The +++Custom access token +++ REST API endpoint. - - -== Configuration recommendations and best practices - -Before you begin, note the following recommendations and feature limitations: +To generate JWT tokens for ABAC implementation, you must use the `/api/rest/2.0/auth/token/custom` REST API endpoint. -Indexing:: -Several features within ThoughtSpot, such as autocompletion in Search on values within columns or the suggestions in Explore mode, use ThoughtSpot indexing. Due to the runtime nature of ABAC via tokens, ThoughtSpot indexing will not be restricted by the values supplied in a token. - + -You must turn off indexing for any field that needs to be restricted by RLS when using ABAC via tokens for RLS, or also include an RLS Rule on fields that must also be filtered for the Indexing system. - -//// -+ [NOTE] ==== -ABAC rules are not supported on Liveboards with AI Highlights and Change Analysis features, and on the Answers generated from Spotter. +* To pass different data contexts, based on the data slices that your users are allowed to visualize, use runtime filters and Parameters. These features are designed to keep your embedded ThoughtSpot content in sync with the context of host application. +* Runtime filters and runtime parameters are not security features. For data security, use xref:rls-rules.adoc[RLS rules]. ==== -//// -Mandatory token filters:: -When setting filter rules within the token, you must place the `is_mandatory_token_filter: true` property on every column in a Worksheet or Model where a filter rule is expected. This will deny any access to data if a user has not been assigned values for the expected set of fields. +To create an easier implementation of data security for your application users, ThoughtSpot recommends using RLS rules with system variables such as `ts_username` or `ts_groups`, or by using xref:abac_rls-variables.adoc[custom variable references] whose values can be assigned to users as login tokens. -+ -[NOTE] -==== -On instances running 10.5.0.cl and 10.4.0.cl versions, if a column is set as hidden (`is_hidden: true`), the `is_mandatory_token_filter: true` setting will not be applied to the column. Due to this, the user may see no data. To work around this issue, we recommend upgrading your instance to 10.6.0.cl. On versions lower than 10.6.0.cl, ensure that you set the `is_hidden` parameter to `false` on the column before applying filter rules. -==== +=== ABAC attributes -[#column-name-warning] -Column names in Worksheet/ Model:: -The filter rules require passing the *exact* ThoughtSpot Worksheet or Model column name, or the values will not bind to any column. You must coordinate between the team that maintains the Worksheets or Models and the team that builds the xref:trusted-auth-token-request-service.adoc[token request service] to know if any changes will be made to a Model or Worksheet. + -For the same reasons, the end users of an embedded app cannot have *edit* access to any Worksheet or Model using ABAC RLS via tokens. + -Setting the `is_mandatory_token_filter: true` property on every column where a filter rule is expected ensures that no data gets returned for users when column names change. +Administrators can set the following attributes for a user via the authentication token, along with the capability to assign the user to ThoughtSpot groups: -API for token generation:: -The ABAC via tokens feature in ThoughtSpot 10.4.0.cl and later versions involves generating a token with filter rules and parameter values using the +++auth/token/custom+++ API endpoint. Customers using the xref:abac-user-parameters-beta.adoc[beta version of ABAC with the V2.0 Get token APIs] (`auth/token/full` or `auth/token/object`) to `/api/rest/2.0/auth/token/custom`, refer to the instructions in the xref:jwt-migration.adoc[migration guide]. +* Filter rules + +This method uses xref:runtime-filters.adoc[runtime filters] (`filter_rules`) in the token to create data security rules. It can filter multiple values of any data type and binds to any Column in any Model with a matching column name in ThoughtSpot. +* Parameter values + +This method uses xref:runtime-parameters.adoc[runtime Parameters] (`parameter_values`) in the token to create data security rules. It binds a single value to any Parameter in any Model by Parameter Name and Type match. Parameters can be used in *Formulas* and then as *Filters* in Models. -== ABAC attributes +=== Mandatory token filters -Administrators can set the following attributes for a user via the authentication token, along with the capability to assign the user to ThoughtSpot groups: +The `is_mandatory_token_filter: true` setting in object TML enforces that a filter rule must be provided for a specific column. When this attribute is set on a column in a Model, ThoughtSpot will deny all data access for users who do not have a corresponding filter rule for that column in their ABAC token. -* xref:runtime-filters.adoc[Filter rules] + -Can filter multiple values of any data type. Binds to any Column in any Model or Worksheet with a matching column name in ThoughtSpot (and not the underlying database table column name). +When setting filter rules within the token, you must place the `is_mandatory_token_filter: true` property on every column in a Model where a filter rule is expected. This setting will deny any access to data if a user has not been assigned values for the expected set of fields. -* xref:runtime-parameters.adoc[Parameter values] + -Binds a single value to any Parameter in any Worksheet or Model by Parameter Name and Type match. Parameters can be used in *Worksheet formulas* and then as *Worksheet filters*. +[#column-name-warning] +The filter rules require passing the *exact* column name as defined in the Model. Otherwise, the values will not bind to any column. You must coordinate between the team that maintains the data objects and the team that builds the xref:trusted-auth-token-request-service.adoc[token request service] to know if any changes will be made to a Model and to ensure column names remain consistent. + +For this reason, end users of an embedded app must not be granted edit access to any Model using ABAC rules via tokens. Setting the `is_mandatory_token_filter: true` property on every column where a filter rule is expected ensures that no data is returned for users when column names change. + +[NOTE] +==== +If a column is set with both `is_hidden: true` and `is_mandatory_token_filter: true`, and filter conditions for that column are defined in the ABAC token, the filter will be applied as expected. The column will be hidden from the user interface, but the mandatory filter requirement will still be enforced, and data will be shown according to the filter values provided in the token. +==== + +=== Indexing +Several features within ThoughtSpot, such as autocompletion in Search on values within columns or the suggestions in *Explore* mode, use ThoughtSpot indexing. Due to the runtime nature of ABAC via tokens, ThoughtSpot indexing will not be restricted by the values supplied in a token. This means the indexed columns may expose values in search suggestions or autocompletion that a user should not see, even if ABAC filters would block access to the underlying data. To prevent this, you can do one of the following: -The request for a token with ABAC details can xref:abac-user-parameters.adoc#persistForUser[persist] the set of filters and Parameter values to user sessions within ThoughtSpot, after which all sessions and scheduled reports will use the persisted values until they are changed by another token generation request. +- Disable indexing for columns and fields that must be restricted by ABAC. You may also want to disable indexing on all sensitive columns. +- Define an RLS rule on those fields, since RLS is enforced at the indexing layer and will secure suggestions and sample values. == Token request -The ABAC message to ThoughtSpot is encoded in JSON Web Token (JWT) format. This token can be used as a bearer token for Cookieless trusted authentication or REST API access. You can also use it as a sign-in token to create a session, in which case, we recommend that the ABAC user properties be *persisted*, to ensure scheduled exports remain secure after the session ends. +The ABAC message to ThoughtSpot is encoded in JSON Web Token (JWT) format. This token can be used as a bearer token for Cookieless trusted authentication or REST API access. You can also use it as a sign-in token to create a session, in which case, we recommend that the ABAC user properties be *persisted*, to ensure scheduled exports remain secure after the session ends. [NOTE] ==== @@ -455,24 +442,6 @@ An example workflow might be: 4. Worksheets that need these entitlements use the combination of pass-through function with parameter + formula + filter so that all queries in ThoughtSpot include a WHERE clause with the sub-select. == Known limitations -The ABAC via tokens method requires using trusted authentication and using Worksheets or Models as data sources for Liveboards and Answers, rather than individual Table objects. - -For indexing recommendations, see xref:abac-user-parameters.adoc#_configuration_recommendations_and_best_practices[Configuration recommendations and best practices]. - -//// -* Several features within ThoughtSpot, such as autocompletion in Search on values within columns or the suggestions in *Explore* mode, use ThoughtSpot indexing. Due to the runtime nature of ABAC via tokens, ThoughtSpot indexing will not be restricted by the values supplied in a token. -+ -You must turn off indexing for any field that needs to be restricted by RLS when using ABAC via tokens for RLS, or also include an RLS Rule on fields that must also be filtered for the Indexing system. - - -// * Schedules created with JWT using ABAC will not follow the same security rules as schedules created with standard RLS set up in ThoughtSpot. + -// Schedules created by users in a session secured via RLS using ABAC currently do not follow any data security rules, that is, all data will be shown in schedules. ThoughtSpot recommends removing the ability to create schedules for your end users. The improvements in the upcoming versions include: -// .. The security rules applied to the schedule will be those of the schedule creator -// .. Using `persist:true` in the JWT for security rules will ensure that the schedule is run using the filter rules persisted on the user. -//* Runtime filter conditions must match the column names in your worksheet to avoid data leakage. - -//+ -//The `runtime_filters` must include the exact ThoughtSpot worksheet column name, or they will not apply to the data set. If a worksheet is changed, you must coordinate between the team that maintains it and the team that builds the token request service, or the filters will no longer be applied. For the same reasons, the end users of an embedded app cannot have edit access to any worksheet using ABAC RLS via tokens. + -// + +The ABAC via tokens method requires using xref:trusted-authentication.adoc[trusted authentication], and using Worksheets or Models as data sources for Liveboards and Answers, rather than individual Table objects. -// You can pass in runtime filters and Parameters for a user via their login token. Both features work like the runtime filters and Parameters available within the Visual Embed SDK, but values set via token cannot be overridden by any user action within the ThoughtSpot UI. +For indexing recommendations, see xref:abac-user-parameters.adoc#_indexing[Indexing]. diff --git a/modules/ROOT/pages/abac_rls-variables.adoc b/modules/ROOT/pages/abac_rls-variables.adoc new file mode 100644 index 000000000..29e167013 --- /dev/null +++ b/modules/ROOT/pages/abac_rls-variables.adoc @@ -0,0 +1,413 @@ += ABAC via RLS with variables +:toc: true +:toclevels: 2 + +:page-title: ABAC via tokens +:page-pageid: abac-via-rls-variables +:page-description: Attribute-based access control pattern with variable attributes referenced in Row-Level Security (RLS) rules on a given table. + +Attribute-Based Access Control (ABAC) is an access control model in which security entitlements are determined by evaluating a set of attributes included in a token generated for a user. The attributes are passed in a JSON Web Token (JWT) at session creation to dynamically filter data and enable user-specific security policies. + +== Overview + +To implement data security for application users, administrators can define RLS rules that use system variables such as `ts_username` or `ts_groups`. If a ThoughtSpot deployment requires granular access control and dynamic assignments beyond what system variables can support, administrators can use formula variables within RLS rules. + +Formula variables are custom variables that enable dynamic and context-aware logic in RLS rules. They can be assigned at the Org, user, and data model levels. + +In embedded analytics scenarios, where each user may require different data access, administrators can assign security attributes and rules on a per-user basis. For these use cases, administrators can implement a JWT-based ABAC model combined with RLS to enforce data security using dynamic attributes derived from formula variables. + +In the ABAC via RLS with variables method, administrators add formula variables to RLS rules and pass their values (`variable_values`) as security attributes and entitlements to the user session through a JWT. All derived objects then inherit the data security rules from the underlying Table and are filtered according to the user’s entitlements provided in the token. + +[NOTE] +==== + +* Formula variables are available on ThoughtSpot starting from 10.15.0.cl. If this feature is not enabled on your instance, contact ThoughtSpot Support. + +* In the legacy JWT ABAC token requests, you could set the `persist_option` parameter to `NONE`, `APPEND`, `REPLACE`, and `RESET`. However, when you use the `variable_values` parameter in the JWT API token request to set up RLS values for a given user, only `APPEND` and `REPLACE` are supported. + +* To reset the formula variable attributes of a user, use the `/api/rest/2.0/template/variables/update-values` API endpoint. + +* The ability to set variable values only for the current session, previously achieved by setting `persist_option: NONE`, is not supported with RLS via ABAC. + +For session-based rules, create dedicated user accounts for your application users and apply persisted rules. This approach ensures that Liveboard schedule attachments enforce security rules and deliver only secured output to your end users. When combined with cookieless authentication, this configuration addresses all use cases that previously relied on session-based JWT. You can simplify user provisioning and programmatically manage user creation and deletion workflows using ThoughtSpot's REST APIs. +==== + +=== Indexing +Several features within ThoughtSpot, such as autocompletion in Search on values within columns, use ThoughtSpot indexing. Due to the runtime nature of ABAC tokens, ThoughtSpot indexing will not be restricted by the values supplied in a token. This means the indexed columns may expose values in search suggestions or autocompletion that a user should not see, even if ABAC filters would block access to the underlying data. To prevent this, you can do one of the following: + +* Disable indexing for columns and fields that must be restricted by ABAC. You may also want to disable indexing on all sensitive columns. +* Define an RLS rule on those fields, since RLS is enforced at the indexing layer and will secure suggestions and sample values. + +=== Implementation steps +The ABAC implementation with formula variables and RLS rules includes the following steps: + +* xref:abac_rls-variables.adoc#_create_formula_variables[Creating formula variables] + +To generate tokens with variable attributes, the variables must be available in ThoughtSpot. To create variables, use the xref:variables.adoc#_create_a_variable[Variable REST API]. +* xref:abac_rls-variables.adoc#_add_rls_rules_with_variable_references[Adding RLS rules with formula variables] + +When defining an RLS rule with variables, use the `ts_var` function. These RLS rules will apply to the Models, Liveboards, and other objects derived from that Table. +* xref:abac_rls-variables.adoc#_define_values_and_scope_for_variables[Creating a token request with variable attributes] + +To generate a JWT token, use the `/api/rest/2.0/auth/token/custom` REST API endpoint. The token generation request must include the variable attributes, which will be used for RLS evaluation to enable per‑user entitlements and data filters across all the objects derived from the Table. +* xref:abac_rls-variables.adoc#_verify_the_entitlements[Verifying entitlements] + +To ensure data security rules are applied, check user entitlements and verify if they are translated accurately during query generation. + +The ABAC via tokens method requires the xref:trusted-authentication.adoc[trusted authentication] setup. + +//// +=== Mandatory token filters + +The `is_mandatory_token_filter: true` setting in object TML enforces that a filter rule must be provided for a specific column. When this attribute is set on a column in a Model, ThoughtSpot will deny all data access for users who do not have a corresponding filter rule for that column in their ABAC token. + +When setting filter rules within the token, you must place the `is_mandatory_token_filter: true` property on every column in a Model where a filter rule is expected. This setting will deny any access to data if a user has not been assigned values for the expected set of fields. + +[#column-name-warning] +The filter rules require passing the *exact* column name as defined in the Model. Otherwise, the values will not bind to any column. You must coordinate between the team that maintains the data objects and the team that builds the xref:trusted-auth-token-request-service.adoc[token request service] to know if any changes will be made to a Model and to ensure column names remain consistent. + +For this reason, end users of an embedded app must not be granted edit access to any Model using ABAC rules via tokens. Setting the `is_mandatory_token_filter: true` property on every column where a filter rule is expected ensures that no data is returned for users when column names change. + +[NOTE] +==== +If a column is set with both `is_hidden: true` and `is_mandatory_token_filter: true`, and filter conditions for that column are defined in the ABAC token, the filter will be applied as expected. The column will be hidden from the user interface, but the mandatory filter requirement will still be enforced, and data will be shown according to the filter values provided in the token. +==== +//// + +== Create formula variables + +To view the variables available on your instance, use the `POST /api/rest/2.0/template/variables/search` API call. To create a new variable, use the `/api/rest/2.0/template/variables/create` API endpoint. + +To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. Users with the `CAN_MANAGE_VARIABLES` (*Can manage variables*) role privilege can also create and manage variables for their Org context. + +The `/api/rest/2.0/template/variables/create` API endpoint allows creating formula variables for the following data types: + +* `VARCHAR` +* `INT32` +* `INT64` +* `DOUBLE` +* `DATE` +* `DATE_TIME` + +During variable creation, specify the xref:variables.adoc#data_type[`data_type`]. + +Formula variables for `BOOLEAN` and `TIME` data types are not supported. + +[source,cURL] +---- +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/]api/rest/2.0/template/variables/create' \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer {AUTH_TOKEN}' \ + --data-raw '{ + "type": "FORMULA_VARIABLE", + "name": "country_var", + "is_sensitive": false, + "data_type": "VARCHAR" +}' +---- + +The variable update API allows assigning variable values and setting the scope. In the ABAC implementation, administrators can set the variable values and scope when xref:abac_rls-variables.adoc#_create_an_abac_token_request_with_variable_attributes[generating a JWT] using the `/api/rest/2.0/auth/token/custom` API endpoint. + +== Add RLS rules with variable references +To define RLS rules with variables for a Table: + +. Navigate to the Data workspace and click the Table for which to define RLS rules. +. Click *Row security* and then click *+ Add row security*. +. In the *Row Security Editor*, define the rules. To reference the formula variable in the rule, use the `ts_var` function. For example, If you want to limit user access to data of a specific region, you can create a region-specific variable, `region = ts_var('region_var')`, and assign values in the token request. + + +=== RLS rule with a single variable reference + +In this formula example, `country` refers to the "country" column in the data table, and `country_var` is the variable. + +---- +country = ts_var('country_var') +---- + +If `country_var` is assigned a single value, the user is permitted to view only rows where the `country` column matches that value. + +If `country_var` is assigned multiple values, the formula translates to `country IN ('value1', 'value2', ...)`. The query engine interprets `=` as the `IN` clause in this case and returns rows that match these values; for example, `WHERE country IN ('Australia', 'Germany')`. + +=== RLS rules with multiple variables +The RLS rules support the `AND` operator, which means that you can combine multiple conditions in a single RLS rule, so that a row is accessible only if all the specified conditions are met. + +The following rule restricts data access to rows if the `country` column in the data table matches the value assigned to `country_var` and the `Department` column matches the value assigned to `department_var` for that user. + +---- +country = ts_var('country_var') AND Department = ts_var('department_var') +---- + +The rule in this example restricts data access to rows where the `region` column in the table matches the value assigned to `region_var` and the `product` column matches the value assigned to `product_var`. + +---- +region = ts_var('region_var') AND product = ts_var('product_var') +---- + +=== Allow all rule with a TS_WILDCARD_ALL variable +In this example, `customer` represents the column `customer` in the table and `customer_var` represents variable. If the value of the customer_var variable is set to `TS_WILDCARD_ALL`, the user can access all customers in the column. + +---- +customer = ts_var('customer_var') +---- + +=== Group override rule with variable-based check +In any security formula you build, you may want a clause that gives access to all data to certain groups. In the rule definition, you can include system variables, such as `ts_groups`, to build your preferred logic: + +In this example, users can access data if they are in the "data developers" group, or if the `Department` column matches the value assigned to their `department_var` variable. + +---- +'data developers' in ts_groups OR Department = ts_var('department_var') +---- + +==== Variables with numeric and Date data types + +The following rule enforces a numeric threshold and restricts access to rows where the Revenue value is less than or equal to the value provided by the `revenue_cap_var` variable. + +---- +Revenue <= to_double(ts_var('revenue_cap_var')) +---- + +The following rule restricts access to rows where the `date_column` is within the range defined by the `start_date_var` and `end_date_var` variables. Only rows with dates greater than or equal to the start date and less than or equal to the end date specified for these variables will be visible for the user. + +---- +(date_column >= ts_var('start_date_var')) AND (date_column <= ts_var('end_date_var')) +---- + +== Create an ABAC token request with variable attributes + +To generate a token with variable attributes, use the `POST /api/rest/2.0/auth/token/custom` API call. + +The variable attributes defined in the token request take effect only if they are referenced in an RLS rule. If the variables are not used in any formula or RLS rule, they will have no impact on data access. Before generating the request with variable attributes, ensure that the xref:abac_rls-variables.adoc#_add_rls_rules_with_formula_variables_to_tables[variables are added to the RLS rules] for the Table. + +In the token request, include the following properties along with the `username`, xref:trusted-auth-secret-key.adoc[`secret_key`]: + +* `variable_values` +* `persist_option` + +Optionally, you can specify the `objects` and `org_identifier` to set the scope of access control. + +=== Variable values + +The `variable_values` array requires the following parameters: + +* `name` + +__String__. Name of the formula variable. The formula variable referenced on the token request must be available in ThoughtSpot and included in the RLS rule. +* `values` + +__Array of strings or numeric values__. When assigning values, ensure the data format of values matches the data type set of that variable. If you are adding a variable to filter by country with the `VARCHAR` data type, specify the string values as shown in this example: + +[source,JSON] +---- +"variable_values": [ + { + "name": "country_var", + "values": [ + "Japan", + "Singapore", + "Australia" + ] + } + ] +---- + +All values are passed into the token as *arrays of strings*, even if the column is a numeric or date type in ThoughtSpot and the database. The column data type will be respected in the query issued to the database. + +==== Allow all values by default + +To allow all values by default, specify `["TS_WILDCARD_ALL"]` as the variable value to grant access to all values in a given column. + +In this example, the user is allowed all access for one variable, while for the others, specific values are set. + +[source,JSON] +---- +"variable_values": [ + { + "name": "country_var", + "values": [ + "Japan", + "Singapore", + "Australia" + ] + }, + { + "name": "department_var", + "values": [ + "Sales", + "Marketing" + ] + }, + { + "name": "product_var", + "values": [ + "TS_WILDCARD_ALL" + ] + } + ] +---- + +If `TS_WILDCARD_ALL` is set for variable attributes, ensure that the RLS rules are defined clearly on the Table to avoid unintended data exposure. + +==== Deny all by default +For every variable included in the token request, you can assign one or more values. All variables referenced in RLS rules are required. If a variable is not assigned any value, query generation will fail with the following error. + +`Error in loading data +No values are assigned to some or all Formula Variables` + +[.bordered] +[.widthAuto] +image:./images/formula-variable-error.png[Formula variable error, scale=25%] + +Due to this error, no data is returned, effectively denying all data access for the user. + +=== Persist options and session-based rules + +Variable attributes must be *persisted* for them to apply to user sessions when using xref:trusted-authentication.adoc#cookie[cookie-based trusted authentication] or scheduled reports. To specify whether variable attributes and rules should persist for user sessions, you must define the `persist_option` parameter. + +To append or replace the attributes, use the following options: + +* `APPEND` + +Adds the attributes defined in the API request to the user properties. These properties will be applied to the current and future user sessions and scheduled reports until they are explicitly changed through a token update request. + +* `REPLACE` + +Replaces existing variable assignments with the new values. + +[NOTE] +==== +* The ABAC implementation with RLS and formula variables does not support session-based rules. Therefore, ThoughtSpot does not recommend setting the `persist_option` attribute to `NONE`. +* If you don't want to append or replace any attributes, do not pass any variable values in the token update request. +* Resetting attributes using the`"persist_option": "RESET"` attribute in the token request is not supported. Passing an empty array does not reset the attributes. To reset the formula variable attributes of a user, use the `/api/rest/2.0/template/variables/update-values` API endpoint. +==== + +=== Variable scope +To restrict the scope of the variable attributes and rules to a specific Org context and object, define the `org_identifier` and `objects`. + +==== Apply to specific objects +To apply variable entitlements to a specific object, specify the object IDs in the `objects` array as shown in this example: + +[source,JSON] +---- +"objects": [ + { + // example of the format + "type": "{OBJECT_TYPE}", + "identifier": "{id or name of the object}" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "9b751df2-d344-4850-9756-18535797378c" + } +] +---- + +The API supports only the `LOGICAL_TABLE` object type. + +If the object ID is not specified in the API request, the variable values will be applied to all formulas and rules that use those variables, across all objects in the Org for that user. + +==== Apply to Org context + +The `org_identifier` attribute in the token request specifies the Org context for the user session and entitlements. + +If the `org_identifier` parameter is not defined in the token request, the token is issued for the user's last logged-in Org. For new users, the token will be assigned to the default Org on their instance. + +To apply variable entitlements to a user session, you must ensure that the RLS rules with variables and relevant objects are available in the Org context specified in the token request. + +=== Example request body + +The following example shows the request body for generating a token with formula variable attributes: + +[source,cURL] +---- + curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/auth/token/custom' \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "username": "UserA", + "validity_time_in_sec": 300, + "persist_option": "APPEND", + "auto_create": true, + "secret_key": "f8aa445b-5ff1-4a35-a58f-e324133320d5", + "variable_values": [ + { + "name": "country_var", + "values": [ + "Japan", + "Singapore", + "Australia" + ] + }, + { + "name": "department_var", + "values": [ + "Sales", + "Marketing" + ] + }, + { + "name": "product_var", + "values": [ + "TS_WILDCARD_ALL" + ] + } + ], + "objects": [ + { + "type": "LOGICAL_TABLE", + "identifier": "35aa85fe-fbb4-4862-a335-f69679ebb6e0" + } + ] +}' +---- + +If the request is successful, ThoughtSpot generates a token and sends the token details in the API response. + +[NOTE] +==== +ABAC details are sent in a JWT that can be used as a bearer token for cookieless trusted authentication, REST API calls, or as a sign-in token to start a session. JWTs are compressed by default to handle large payloads. It is recommended to keep the compression enabled to ensure all JWT tokens can get properly interpreted by the application regardless of their size, and to obfuscate the values passed in the JWT payload. If you want to disable it, contact ThoughtSpot Support. +==== + +=== Verify the variable assignment + +To verify the variable assignment, use the `POST /api/rest/2.0/users/search` API call and check `variable_values` in the user properties in the API response. + +[source,JSON] +---- +//... +{ + "variable_values": { + "821119045": { + "ALL": { + "variable_values": [ + { + "name": "country_var", + "values": [ + "Japan", + "Singapore", + "Australia" + ] + }, + { + "name": "department_var", + "values": [ + "Sales", + "Marketing" + ] + } + ] + } + } + } +} +---- + +To verify the security entitlements, start a user session using the JWT and inspect the generated SQL for your query or visualization. + +== Verify the entitlements +To verify the entitlements: + +. Log in to your app with a user account that does not have the *Can administer and bypass RLS* privilege, and initiate the user session with the ABAC token. +. Access a Liveboard, Saved Answer, or start a new search query. +. Inspect the generated SQL for your query or visualization. +. Verify the rules and check whether only the permitted rows are displayed. +. Verify whether data is displayed when no variable values are defined. +. Repeat the steps for different variable assignments to confirm the RLS rule is enforced as expected for all scenarios. + +== Additional resources + +* For information about variables and variable APIs, see link:https://docs.thoughtspot.com/cloud/latest/rls-variables-reference[Variables] and xref:variables.adoc[Variable APIs]. +* For information about RLS rules,see xref:rls-rules.adoc[RLS Rules] and link:https://docs.thoughtspot.com/cloud/latest/security-rls[ThoughtSpot Product Documentation, window=_blank]. diff --git a/modules/ROOT/pages/api-changelog.adoc b/modules/ROOT/pages/api-changelog.adoc index 84dbbcae0..510e867e7 100644 --- a/modules/ROOT/pages/api-changelog.adoc +++ b/modules/ROOT/pages/api-changelog.adoc @@ -35,7 +35,6 @@ Emits when an API call matching the conditions defined in `interceptUrls` is det For more information, see xref:api-intercept.adoc[Intercept API calls and search requests]. |==== - == Version 1.43.0, November 2025 [width="100%" cols="1,4"] |==== @@ -61,7 +60,7 @@ The Visual Embed SDK now supports runtime overrides in Spotter embed. * To apply runtime filters, use the `runtimeFilters` object * To apply runtime Parameters, use the `runtimeParameters` object. -|[tag greenBackground]#NEW FEATURE# a|*PNG images in Liveboard schedule notifications* +|[tag greenBackground]#NEW FEATURE# a|*PNG images in Liveboard schedule notifications* + To enable embedding PNG images of Liveboards in scheduled job notifications sent to subscribers, the SDK provides the `isPNGInScheduledEmailsEnabled` boolean parameter. When set to true, scheduled emails will include a PNG image of the Liveboard. The SDK also provides the following action IDs: @@ -212,7 +211,6 @@ To use these attributes effectively in embedded applications, your ThoughtSpot i |==== - == Version 1.39.0, July 2025 [width="100%" cols="1,4"] diff --git a/modules/ROOT/pages/api-intercept.adoc b/modules/ROOT/pages/api-intercept.adoc new file mode 100644 index 000000000..a3ba7e5e5 --- /dev/null +++ b/modules/ROOT/pages/api-intercept.adoc @@ -0,0 +1,268 @@ += Intercept API and data fetch requests +:toc: true +:toclevels: 2 + +:page-title: Intercept API calls from embedded components +:page-pageid: api-search-intercept +:page-description: Developers can intercept and control API calls originating from the embedded ThoughtSpot components + +Developers can intercept data fetch and other API requests initiated by the embedded ThoughtSpot application using the following features: + +* Intercept data fetch requests: + +To enable interception of search execution requests by search embed or full application embed, use the `isOnBeforeGetVizDataInterceptEnabled` attribute. When enabled, you can implement custom logic using the `OnBeforeGetVizDataIntercept` embed event, allow or block search requests, and show custom messages to users. + +* Intercept a specific API call or all requests: + +If you want to intercept other API calls initiated by the embedded application, define the URLs that you want to intercept in the `interceptUrls` attribute and handle interception using the `ApiIntercept` embed event. + +Developers can use these interception features for: + +* Custom data handling +* Securing sensitive data before sending a response +* Debugging API failures or delays +* Integrating with external systems or applying business logic before data is rendered + +== Intercepting data fetch requests + +To enable interception of data fetch requests, set the `isOnBeforeGetVizDataInterceptEnabled` attribute to `true` in the SDK. + +[source,JavaScript] +---- +const embed = new LiveboardEmbed('#embed', { + //...viewConfig, + isOnBeforeGetVizDataInterceptEnabled: true, + //... +}); +---- + +When enabled, you can intercept and control search execution and data fetch requests, and implement a custom logic to trigger a response when the `EmbedEvent.OnBeforeGetVizDataIntercept` event is emitted. + +The following example blocks the search request and returns a custom error message. + +[source,JavaScript] +---- +embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, +(payload, responder) => { + responder({ + data: { + execute: false, // Block the search from executing + error: { + // Custom error message shown to the user when the search is blocked + errorText: "This search query cannot be run. Please contact your administrator for more details." + } + } + }) +}) +---- + +The following example blocks the search only if the query contains both `sales` and `county`; otherwise, it allows the search to proceed. It also provides an error message explaining why the search was blocked: + +[source,JavaScript] +---- +embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, +(payload, responder) => { + const query = payload.data.data.answer.search_query + responder({ + data: { + // Allow the search only if the query does NOT include both 'sales' AND 'county' + execute: !(query.includes("sales") && query.includes("county")), + error: { + // Custom error message and description shown if the search is blocked + errorText: "Error Occurred", + errorDescription: "You can't use this query :" + query + + ". The 'sales' measures can never be used at the 'county' level. Please try another measure, or remove 'county' from your search." + } + } + }) +}) +---- + +== Intercept specific URLs or all API calls + +The API intercept feature lets you intercept API calls made by the embedded application, modify or block requests, and provide custom responses before they are sent to the backend. + +//// +=== Enable API interception + +To enable this feature on your embed, you must set the `enableApiIntercept` flag to `true` in the SDK. + +[source,JavaScript] +---- +const embed = new LiveboardEmbed('#embed', { + //...viewConfig, + enableApiIntercept: true, + //... +}); +---- +//// + +To intercept API requests from specific URLs, define the URLs in the `interceptUrls` array: + +Valid values for `interceptUrls` are: + +** `ALL` - Allows intercepting all API requests + +** `AnswerData` - Allows intercepting APIs that fetch data for a search query or visualization. + +** `LiveboardData` - Allows intercepting APIs requesting data for the embedded Liveboard. + +You can also set a specific URL that you want to intercept by specifying the array in the following format: + +`interceptUrls: [Type.AnswerData, '{URL-to-intercept}']` + +[NOTE] +==== +You must specify at least one API type or URL in the array for interception to be effective. If `interceptUrls` is set as an empty array, no URLs will be intercepted. +==== + +=== Intercept timeout threshold +To set a threshold for the interception handling, configure the `interceptTimeout` value in milliseconds. The default value is 30000. If the interception is not handled within the configured threshold, the API returns an error. + +[source,JavaScript] +---- +const embed = new LiveboardEmbed('#embed', { + ...viewConfig, + interceptUrls: [InterceptedApiType.AnswerData], + interceptTimeout: 2000, +}); +---- + +=== Event handling with custom workflows + +To listen to the API intercept event and trigger custom workflows, use `EmbedEvent.ApiIntercept`. You can implement a custom workflow or logic to handle interception and respond when the event is emitted. The structure of the response determines whether the user sees an error or receives custom data instead of the original API result. + +The following code intercepts the API call and blocks its execution. It returns an error message when the `EmbedEvent.ApiIntercept` event is emitted. + +[source,JavaScript] +---- +LiveboardEmbed.on(EmbedEvent.ApiIntercept, (payload, responder) => { + console.log('payload', payload); // Log the intercepted API call payload for debugging. + responder({ + data: { + execute: false, // Block the API call from proceeding. + error: { + errorText: 'Error Occurred', // Provide an error message indicating the API call was blocked. + } + } + }) +}) +---- + +The following example returns a detailed error response structure when an intercepted call is blocked, and the `EmbedEvent.ApiIntercept` event is emitted. + +[source,JavaScript] +---- +embed.on(EmbedEvent.ApiIntercept, (payload, responder) => { + console.log('payload', payload); // Log the intercepted API call payload for debugging. + responder({ + data: { + execute: false, // Block the API call from proceeding. + response: { + body: { + errors: [{ + title: 'Error Occurred', // Error title shown to the user. + description: 'Error Description', // Detailed error description. + isUserError: true, // Indicates this is a user-facing error. + }], + data: {}, // Optionally include additional data in the response. + }, + } + } + }) +}) +---- + +The following example returns a custom response when an intercepted call is blocked and the `EmbedEvent.ApiIntercept` event is emitted. + +[source,JavaScript] +---- +embed.on(EmbedEvent.ApiIntercept, (payload, responder) => { + console.log('payload', payload); // Log the intercepted API call payload for debugging. + responder({ + data: { + execute: false, // Block the API call from proceeding. + response: { + body: { + data: { // You can provide a custom data object here to override the API response. + }, + } + } + } + }) +}) +---- + +== Use both methods for comprehensive interception +To provide comprehensive control over data access and workflow customization, use both data fetch and API request interception properties in the SDK. In such configurations, API interception settings allow developers to intercept and manage API calls made by the embedded component, while `isOnBeforeGetVizDataInterceptEnabled` allows intercepting data fetch requests for visualizations and search queries before they are executed. + +[source,JavaScript] +---- +const embed = new SearchEmbed('#embed', { + //...viewConfig, + isOnBeforeGetVizDataInterceptEnabled: true, + interceptUrls: [InterceptedApiType.AnswerData], + interceptTimeout: 2000, +}); +---- + +The following example shows how to handle events when using both methods of interception: + +[source,JavaScript] +---- +// Intercept visualization data fetch before execution +embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => { + // Extract the search query from the payload + const searchQuery = payload.data.data.answer.search_query; + + // Block execution if the query contains a restricted column + if (searchQuery.includes('restricted_column')) { + responder({ + data: { + execute: false, + error: { + errorText: 'Query contains restricted columns', + errorDescription: 'Please modify your search to exclude restricted data.', + }, + }, + }); + } else { // Allow execution if no restricted columns are present + responder({ data: { execute: true } }); + } +}); + +// Intercept API calls +embed.on(EmbedEvent.ApiIntercept, (payload, responder) => { + // Intercept AnswerData API calls + if (payload.urlType === InterceptedApiType.AnswerData) { + const requestBody = payload.init.body; + + // Custom validation logic for the request body + if (validateRequest(requestBody)) { + responder({ data: { execute: true } }); + } else { + // Block execution and return a custom error response + responder({ + data: { + execute: false, + response: { + body: { + errors: [ + { + title: 'Validation Failed', + description: 'Request validation failed', + isUserError: true, + }, + ], + data: {}, + }, + }, + }, + }); + } + } else if (payload.urlType === InterceptedApiType.LiveboardData) { + // Allow LiveboardData API calls by default + responder({ data: { execute: true } }); + } +}); +---- + +== Related resources +See the xref:EmbedEvent.adoc#_apiintercept[Event reference documentation]. + diff --git a/modules/ROOT/pages/authentication.adoc b/modules/ROOT/pages/authentication.adoc index 8278520d1..70a7bade7 100644 --- a/modules/ROOT/pages/authentication.adoc +++ b/modules/ROOT/pages/authentication.adoc @@ -739,18 +739,18 @@ If the API request is successful, ThoughtSpot returns a token with the security [source,JSON] ---- { - "id": "3eefc15a-cad0-4de0-a85c-de6407a14fca", + "id": "58185cfd-4c04-4570-8bab-63bc8dad2c98", "token": "{AUTH_TOKEN}", "org": { "id": 0, "name": "Primary" }, "user": { - "id": "46228fb2-8db9-4b84-b015-82ea2f3b220d", - "name": "UserA" + "id": "00000845-7688-795c-c4a1-857dc78d799d", + "name": "userA" }, - "creation_time_in_millis": 1733323274948, - "expiration_time_in_millis": 1733323574708 + "creation_time_in_millis": 1763654650210, + "expiration_time_in_millis": 1763654949981 } ---- diff --git a/modules/ROOT/pages/common/nav.adoc b/modules/ROOT/pages/common/nav.adoc index bf410e150..3489b7ec9 100644 --- a/modules/ROOT/pages/common/nav.adoc +++ b/modules/ROOT/pages/common/nav.adoc @@ -66,18 +66,21 @@ **** link:{{navprefix}}/embed-spotter[Embed Spotter] **** link:{{navprefix}}/embed-spotter-agent[Embed Spotter Agent] **** link:{{navprefix}}/embed-nls[Embed Natural Language Search (legacy interface)] -*** Embed full app experience -**** link:{{navprefix}}/full-embed[Embed full app] -**** link:{{navprefix}}/full-app-customize[Customize full application embedding] +*** link:{{navprefix}}/full-embed[Embed full application] +**** link:{{navprefix}}/full-app-customize[Customize your embed] +**** link:{{navprefix}}/customize-nav-controls[Customize navigation panels] +**** link:{{navprefix}}/set-default-page[Customize default page and navigation path] +**** link:{{navprefix}}/customize-homepage-experience[Customize home page experience] + *** Embed token-based Search **** link:{{navprefix}}/search-embed[Embed Search] **** link:{{navprefix}}/embed-searchbar[Embed search bar] *** link:{{navprefix}}/react-app-embed[Embed with React components] ** link:{{navprefix}}/mobile-embed[Embed ThoughtSpot in a mobile app] -*** link:{{navprefix}}/embed-ts-mobile-react-native[React Native SDK ^Beta^] -*** link:{{navprefix}}/embed-ts-flutter[Flutter embed SDK ^Beta^] -*** link:{{navprefix}}/embed-ts-swift[Swift Embed SDK ^Beta^] -*** link:{{navprefix}}/embed-ts-android[Android Embed SDK ^Beta^] +*** link:{{navprefix}}/embed-ts-mobile-react-native[React Native SDK] +*** link:{{navprefix}}/embed-ts-flutter[Flutter embed SDK] +*** link:{{navprefix}}/embed-ts-swift[Swift Embed SDK] +*** link:{{navprefix}}/embed-ts-android[Android Embed SDK] ** Customize and integrate *** link:{{navprefix}}/style-customization[Customize UX and styles] @@ -96,6 +99,7 @@ *** link:{{navprefix}}/action-config[Customize menus] **** link:{{navprefix}}/actions[Action IDs in the SDK] *** link:{{navprefix}}/events-app-integration[Events and app interactions] +**** link:{{navprefix}}/api-search-intercept[Intercept API and data fetch requests] *** link:{{navprefix}}/custom-action-intro[Custom actions] **** link:{{navprefix}}/customize-actions[Custom actions through the UI] ***** link:{{navprefix}}/custom-action-url[URL actions] @@ -125,10 +129,9 @@ *** link:{{navprefix}}/access-control-sharing[Access control and sharing] *** link:{{navprefix}}/privileges-and-roles[Privileges and Roles] *** link:{{navprefix}}/data-security[Data security] -**** link:{{navprefix}}/abac-user-parameters[ABAC via tokens] -**** link:{{navprefix}}/abac-migration-guide[Migrate ABAC ^BETA^ implementation to custom token API] -**** link:{{navprefix}}/abac-user-parameters-beta[ABAC via tokens (pre-10.4.0.cl)] **** link:{{navprefix}}/rls-rules[RLS Rules] +**** link:{{navprefix}}/abac-via-rls-variables[ABAC via RLS with variables] +**** link:{{navprefix}}/abac-user-parameters[ABAC via tokens (Legacy method)] *** link:{{navprefix}}/selective-user-access[User access] ** link:{{navprefix}}/best-practices[Performance optimization] *** link:{{navprefix}}/best-practices[Best practices] @@ -255,3 +258,5 @@ include::generated/typedoc/CustomSideNav.adoc[] ** link:https://training.thoughtspot.com/page/developer[Training resources, window=_blank] ** link:https://docs.thoughtspot.com[Product Documentation, window=_blank] ** link:{{navprefix}}/rest-apiv2-beta-reference[REST API v2 ^Beta^ Reference (Deprecated)] +** link:{{navprefix}}/abac-user-parameters-beta[ABAC via tokens (pre-10.4.0.cl) (Deprecated)] + diff --git a/modules/ROOT/pages/customize-css-styles.adoc b/modules/ROOT/pages/customize-css-styles.adoc index 8047416c9..f2f06e780 100644 --- a/modules/ROOT/pages/customize-css-styles.adoc +++ b/modules/ROOT/pages/customize-css-styles.adoc @@ -184,7 +184,7 @@ Use the following variables to customize the Liveboard page elements. image::./images/custom-css-viz.png[CSS customization Liveboard page] -- [#grp-style] -=== Liveboard grouping and styling [beta betaBackground]^Beta^ +=== Liveboard grouping and styling [earlyAccess eaBackground]#Early Access# Use the following variables to customize the Liveboard visualization groups and style elements. [NOTE] diff --git a/modules/ROOT/pages/customize-homepage-full-embed.adoc b/modules/ROOT/pages/customize-homepage-full-embed.adoc new file mode 100644 index 000000000..3d4f40ac2 --- /dev/null +++ b/modules/ROOT/pages/customize-homepage-full-embed.adoc @@ -0,0 +1,370 @@ += Customize home page experience +:toc: true +:toclevels: 2 + +:page-title: Customize home page experience +:page-pageid: customize-homepage-experience +:page-description: Customize the home page experience by including or excluding specific modules and arrange them as needed in full application embedding + +Developers can customize the home page experience in full application embedding to show either the classic layout or the new modular home page. + +In the classic (V1) experience, the home page has a static layout and does not support SDK modular customization settings. + +In the V2 and V3 experience modes, you can customize the home page by specifying which modules are visible, their order, and the overall layout using configuration options available in the SDK. + +[div announcementBlock] +-- +[IMPORTANT] +The classic (V1) experience and V2 experience modes will be deprecated in an upcoming release in 2026. Therefore, ThoughtSpot recommends upgrading the UI experience of your full application embedding to the V3 experience. +-- + + +== Home page layout in the V3 experience + +In the V3 experience, the SDK provides the xref:HomePage.adoc[homePage] attribute that allows you to choose the desired home page layout: + +* `homePage: HomePage.ModularWithStylingChanges` + +Enables the V3 modular home page experience with customizable components, styling options, and enhanced layout and visual elements. +* `homePage: HomePage.Modular` + +Enables the basic modular home page experience with customizable components. + +== Customization settings for home page +The following customization settings are available for the modular home page in the V2 and V3 experience modes. + +[width="100%", cols="2,2,2,2"] +[options='header'] +|==== +|SDK property|Classic (V1) experience|V2 experience|V3 experience +| `hiddenHomepageModules` + +Controls the visibility of the modules on the home page. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `reorderedHomepageModules` + +Arranges home page modules in the specified order. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `homePageSearchBarMode` + +Sets the home page search bar experience to object search, Spotter/AI search, or none. +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `isUnifiedSearchExperienceEnabled` + +Enables a combined interface with both Object Search and Natural Language Search. The unified experience is disabled by default. +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `hideHomepageLeftNav` + +Hides the xref:customize-nav-full-embed.adoc#_customize_the_left_navigation_panel_on_home_page[left navigation panel] on the home page. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `hiddenHomeLeftNavItems` + +Hides xref:customize-nav-full-embed.adoc#_customize_the_left_navigation_panel_on_home_page[specific menu items of the left navigation panel] on the home page. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported +|==== + +== Control the visibility of home page modules + +In the V2 and V3 experience modes, the home page includes sections such as *Watchlist*, *Favorites*, *Library*, *Trending* charts, and more. You can hide a specific section of the home page and reorder these modules as needed using the xref:AppViewConfig.adoc#_hiddenhomepagemodules[hiddenHomepageModules] and xref:AppViewConfig.adoc#_reorderedhomepagemodules[reorderedHomepageModules] configuration options in the embed SDK. + +The `hiddenHomepageModules` and `reorderedHomepageModules` attributes support the following settings: + +[width="100%", cols="2,2,2,2"] +[options='header'] +|=== +| Allowed values +| Classic (V1) experience +| V2 experience +| V3 experience + +| `HomepageModule.Favorite` + +For the *Favorites* module on the home page. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomepageModule.Learning` + +For *Learning* section, which displays learning videos and resources on the home page. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomepageModule.MyLibrary` + + For the Library section, which lists Answers and Liveboard objects. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomepageModule.Search` + +For the search module on the home page. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomepageModule.Trending` + +For the Trending section, which shows a list of trending Answers and Liveboards. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +|`HomepageModule.Watchlist` + +For the **Watchlist** section, which is used for KPI monitoring. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported +|=== + +=== Customize home page modules in the V3 experience +The following example shows the configuration properties for customizing the home page modules: + +[source,javascript] +---- +import { + AppEmbed, // Main class to embed the full ThoughtSpot app + PrimaryNavbarVersion // Enum for V3 experience setting + HomePage, // Enum for home page experience settings + HomepageModule // Enum for home page modules +} from '@thoughtspot/visual-embed-sdk'; + +const embed = new AppEmbed("#embed", { + // Enable V3 navigation and home page experience + discoveryExperience: { + primaryNavbarVersion: PrimaryNavbarVersion.Sliding, // Enables V3 experience + homePage: HomePage.ModularWithStylingChanges, // Enables V3 home page + }, + // Hide modules from the home page + hiddenHomepageModules: [ + HomepageModule.Learning, + HomepageModule.Trending + ], + // Custom order for visible modules + reorderedHomepageModules: [ + HomepageModule.Search, + HomepageModule.Favorite, + HomepageModule.Watchlist, + HomepageModule.MyLibrary + ], + //... other view configuration properties +}); +---- + +=== Customize home page modules in the V2 experience +The following example shows the configuration properties for customizing the home page modules in the V2 experience: + +[source,javascript] +---- + + import { + AppEmbed, // Main class to embed the full ThoughtSpot app + HomepageModule // Enum for home page modules + } from '@thoughtspot/visual-embed-sdk'; + const embed = new AppEmbed("#embed", { + // Enable V2 experience + modularHomeExperience: true + // Hide modules from the home page + hiddenHomepageModules: [ + HomepageModule.Learning, + HomepageModule.Trending + ], + // Set the order of home page modules + reorderedHomepageModules: [ + HomepageModule.Search, + HomepageModule.Favorite, + HomepageModule.Watchlist, + HomepageModule.MyLibrary + ], + //... Other view configuration properties + }); +---- + +[#_search_experience_on_home_page] +=== Customize the search experience on home page +You can set the search experience on the home page to function as an object search bar that allows finding popular objects, or as an AI search interface that allows natural language queries or Spotter sessions. You can also choose to hide it from the home page. +To configure your preference, specify the following values in the `homePageSearchBarMode` attribute. + +[width="100%", cols="4,8"] +[options='header'] +|===== +|Search bar mode|Description +|`HomePageSearchBarMode.AI_ANSWER` | +Sets the natural language search bar that allows queries in natural language. +If Spotter is enabled on your instance, you can use this setting to set the Spotter search bar on the home page. +|`HomePageSearchBarMode.OBJECT_SEARCH` |Enables object search that allows users to find objects from the library. +|`HomePageSearchBarMode.NONE` a| Hides the search bar on the home page. Note that it only hides the Search bar on the **Home** page and doesn't affect the Object Search bar visibility on the top navigation bar. + +To hide the search bar on the home page, you can also use the xref:customize-homepage-full-embed.adoc#_control_the_visibility_of_home_page_modules[homepageModule: HomepageModule.Search] setting. +|| +|===== + +[NOTE] +==== +If your instance is using the Classic (v1) experience and if the `homePageSearchBarMode` parameter does not set the search context defined in the attribute, set `isUnifiedSearchExperienceEnabled` to `false`. +==== + +==== Examples +The following examples show code snippets to set the home page search bar mode to Spotter or AI search in different experience modes: + +V3 experience:: + +[source,javascript] +---- +import { + AppEmbed, + PrimaryNavbarVersion // Enum for V3 navigation experience + HomePage, // Enum for home page experience settings + HomePageSearchBarMode // Import the enum for search bar mode options +} from '@thoughtspot/visual-embed-sdk'; + +const embed = new AppEmbed("#embed", { + discoveryExperience: { + primaryNavbarVersion: PrimaryNavbarVersion.Sliding, // Enable v3 experience + homePage: HomePage.ModularWithStylingChanges // Enable v3 home page experience + }, + // Set the home page search bar to show the Spotter / AI search bar + homePageSearchBarMode: HomePageSearchBarMode.AI_ANSWER + // Other view configuration attributes +}); +---- + +V2 experience:: + +[source,javascript] +---- +import { + AppEmbed, + HomePageSearchBarMode // Import the enum for search bar mode options +} from '@thoughtspot/visual-embed-sdk'; + +const embed = new AppEmbed("#embed", { + modularHomeExperience: true, // Enable v2 modular home page experience + // Set the home page search bar to show the Spotter / AI search bar + homePageSearchBarMode: HomePageSearchBarMode.AI_ANSWER + // Other view configuration attributes +}); +---- + + +Classic (V1) experience:: + +[source,javascript] +---- +import { + AppEmbed, + HomePageSearchBarMode // Import the enum for search bar mode options +} from '@thoughtspot/visual-embed-sdk'; + +const embed = new AppEmbed("#embed", { + // Set the home page search bar to show the Spotter / AI search bar + homePageSearchBarMode: HomePageSearchBarMode.aiAnswer, + // Disable the unified search experience + isUnifiedSearchExperienceEnabled: false, + //... other embed view configuration attributes +}); +---- + +//// +==== Enable AI Search +To set AI Search as the default search experience on the Home page, use the settings shown in the following examples. + +==== Enable AI Search with Spotter (Recommended) +To set Spotter as the default search experience on the Home page, use the settings shown in the following examples. + +===== New Home page experience + +[source,javascript] +---- +const embed = new AppEmbed("#embed", { + isUnifiedSearchExperienceEnabled: "false", + homePageSearchBarMode: "aiAnswer", +}); +---- + +Home page search experience:: + + +Spotter page;; +[.bordered] +[.widthAuto] +image::./images/spotter-fullApp2.png[] + +===== Home page classic experience + +[source,javascript] +---- +const embed = new AppEmbed("#embed", { + isUnifiedSearchExperienceEnabled: "false", + homePageSearchBarMode: "aiAnswer", +}); +---- + + + +Spotter page;; +[.bordered] +[.widthAuto] +image::./images/spotter-fullApp2.png[] + +==== Enable AI Search (legacy) +To enable Natural Language Search (legacy), use the settings shown in these examples: + +===== New Home page experience + +[source,javascript] +---- +const embed = new AppEmbed("#embed", { + homePageSearchBarMode: "aiAnswer", +}); +---- +Home page search experience:: +[.widthAuto] +[.bordered] +image::./images/sage-search-new-exp.png[] + +AI Search page:: + +[.widthAuto] +[.bordered] +image::./images/sage-search-home.png[] + +===== Home page classic experience + +[source,javascript] +---- +const embed = new AppEmbed("#embed", { + homePageSearchBarMode: "aiAnswer", +}); +---- + +Home page search experience:: + +[.widthAuto] +[.bordered] +image::./images/sage_search-home-classic.png[] + +AI Search page:: + +[.widthAuto] +[.bordered] +image::./images/sage-search-home.png[] + +//// + +== Additional resources + +See also: + +* xref:full-embed.adoc[Embed full application] +* xref:full-app-customize.adoc[Customize full application embed] +* xref:AppViewConfig.adoc[AppViewConfig reference page] +* xref:HostEvent.adoc[Host events] +* xref:EmbedEvent.adoc[Embed Events] +* xref:Action.adoc[Actions] diff --git a/modules/ROOT/pages/customize-nav-full-embed.adoc b/modules/ROOT/pages/customize-nav-full-embed.adoc new file mode 100644 index 000000000..b66347f3f --- /dev/null +++ b/modules/ROOT/pages/customize-nav-full-embed.adoc @@ -0,0 +1,289 @@ += Customize navigation panels +:toc: true +:toclevels: 2 + +:page-title: Customize navigation panels +:page-pageid: customize-nav-controls +:page-description: Customize the the navigation panel and menu items in full application embedding using the settings in the Visual Embed SDK + +You can customize the navigation experience and the visibility of navigation menu elements using the Visual Embed SDK. + +[div announcementBlock] +-- +[IMPORTANT] +The classic (V1) experience and V2 experience modes will be deprecated in an upcoming release in 2026. Therefore, ThoughtSpot recommends upgrading the UI experience of your full application embedding to the V3 experience. +-- + +== Navigation experience +The navigation structure in ThoughtSpot UI varies based on the UI experience mode set in your embed view. + +[width="100%", cols="2,4"] +[options='header'] +|==== +|UI experience| Navigation options +|Classic (V1) experience a|A standard top navigation bar with the following components: + + +* A horizontal application menu +* Help and user profile icons +* Org switcher + +|V2 experience a| +* Simplified top navigation structure. Includes the following components: + +** Object search bar +** The application selector to switch between different application contexts +** Help and profile icons +** Org switcher for instances with Orgs +* A left navigation panel for each application context. +|V3 experience +a| +* Top navigation bar with a modern look and feel. Includes the following components: +** A hamburger icon for the sliding navigation overlay +** Object search bar +** Help and profile icons + +The user profile includes *Admin settings* option, which is visible to users with administration privileges. +** Org switcher +* Left navigation +** A sliding left navigation panel controlled via the hamburger icon +** Persona-based app selection icons in the panel header +** Left navigation menu that adjusts its contents according to the application context. +|==== + +== Customize the top navigation bar +The following customization settings are available for the top navigation bar. + +[width="100%", cols="2,2,2,2"] +[options='header'] +|==== +| SDK property +| Classic (V1) experience +| V2 experience +| V3 experience +|`showPrimaryNavbar` + +To show or hide the navigation experience. +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `hideApplicationSwitcher` + +To show or hide the application switcher. +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported + +In V2 experience, hides the app selector in the top navigation bar. +| [tag greenBackground tick]#✓# Supported + +In the V3 experience, hides the app selection icons on the left navigation panel and the *Admin settings* option in the Profile menu. +| `disableProfileAndHelp` + +To show or hide the help and user profile icons in top navigation bar. +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +Also hides or shows *Help* menu on the left navigation panel of the home page. +| [tag greenBackground tick]#✓# Supported + +Also hides the *Admin settings* menu in the profile dropdown. + +| `hideOrgSwitcher` + +To show or hide the Org switcher. +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `hideNotification` + +To show or hide the notification (bell) icon. +| [tag redBackground tick]#x# Not supported +| [tag redBackground tick]#x# Not supported +| [tag greenBackground tick]#✓# Supported + +| `hideObjectSearch` + +To show or hide the object search bar in the top navigation bar. +| __Not applicable__ + +The object search bar is hidden by default. +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `hideHamburger` + +To show or hide the hamburger icon in the top navigation bar. +| __ Not applicable__ +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported + +Hides the hamburger icon available on pages where the left navigation panel is hidden by default. +|==== + +=== Example + +The following example hides the icons in the top navigation and the application selection menu: + +[source,JavaScript] +---- +const embed = new AppEmbed("#embed", { + //... V3 experience attributes + // Show navigation bar + showPrimaryNavbar: true, + hideApplicationSwitcher: true, + // Hide Help and User Profile icons in top navigation + disableProfileAndHelp: true, + // Hide object search bar in top navigation + hideObjectSearch: true, + // Hide the alert icon in top navigation + hideNotification: true, + //... other attributes +}); +---- + +== Customize the left navigation panel on the home page +In the V2 and V3 experience modes, the left navigation panel on the *Insights* > *Home* page includes menu items such as *Answers*, *Liveboards*, *SpotIQ Analysis*, *Monitor Subscriptions*, and more. You can hide this navigation panel by setting the `hideHomepageLeftNav` property to `true` in the SDK. Note that this attribute hides the left navigation only on the home page. + +If you want to include the left navigation, but hide only a specific section in the *Insights* panel, use the `hiddenHomeLeftNavItems` property and specify the menu items to hide. The allowed values for `hiddenHomeLeftNavItems` are listed in the following table: + +[width="100%", cols="2,2,2,2"] +[options='header'] + +|=== +|Allowed values +| Classic (V1) experience +| V2 experience +| V3 experience + +| `HomeLeftNavItem.Create` + +To show or hide the `+` icon that allows users to create a Liveboard or Answer in the *Insights* panel. +| __ Not applicable__ +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported + +| `HomeLeftNavItem.Home` + +To show or hide the *Home* menu in the *Insights* panel. +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomeLeftNavItem.Spotter` + +To show or hide the *Spotter* menu item in the *Insights* panel. +| __ Not applicable__ +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported + +| `HomeLeftNavItem.SearchData` + +To show or hide the *Search Data* in the *Insights* panel. +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomeLeftNavItem.Liveboards` + +To show or hide the *Liveboards* menu in the *Insights* panel. +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomeLeftNavItem.Answers` + +To show or hide the *Answers* menu in the *Insights* panel. +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomeLeftNavItem.LiveboardSchedules` + +To show or hide the *LiveboardSchedules* menu in the *Insights* panel. +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomeLeftNavItem.MonitorSubscription` + +To show or hide the *Monitor subscriptions* in the *Insights* panel. +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomeLeftNavItem.SpotIQAnalysis` + +To show or hide the *SpotIQ analyses* in the *Insights* panel. +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported +| [tag greenBackground tick]#✓# Supported + +| `HomeLeftNavItem.Favorites` + +To show or hide the `Favorites` section in the *Insights* panel. +| __ Not applicable__ +| __ Not applicable__ +| [tag greenBackground tick]#✓# Supported +|=== + +== Examples +The following sections show code samples for customizing the default left navigation panel in the *Insights* section and the home page. + +=== V3 experience + +[source,JavaScript] +---- +import { + AppEmbed, // Main class to embed the full ThoughtSpot app + HomePage, // Enum for home page experience setting + PrimaryNavbarVersion, // Enum for navigation bar version + HomeLeftNavItem, // Enum for left navigation items +} from '@thoughtspot/visual-embed-sdk'; + +const embed = new AppEmbed("#embed", { + discoveryExperience: { + primaryNavbarVersion: PrimaryNavbarVersion.Sliding, // Enable V3 navigation + homePage: HomePage.ModularWithStylingChanges, // Enable V3 modular home page + }, + // Show navigation bar + showPrimaryNavbar: true, + // Show left navigation on home page + hideHomepageLeftNav: false, + // Hide SpotIQ analysis and Favorites menu options + hiddenHomeLeftNavItems: [ + HomeLeftNavItem.Favorites, + HomeLeftNavItem.SpotIQAnalysis + ], + //... other embed view configuration attributes +}); +---- + +=== V2 experience + +[source,JavaScript] +---- +import { + AppEmbed, // Main class to embed the full ThoughtSpot app + HomeLeftNavItem, // Enum for left navigation items +} from '@thoughtspot/visual-embed-sdk'; + +const embed = new AppEmbed("#embed", { + // Enable the V2 navigation experience + modularHomeExperience: true, + // Show left navigation panel + hideHomepageLeftNav: false, + // Hide SpotIQ analysis and Monitor subscriptions menu options + hiddenHomeLeftNavItems: [ + HomeLeftNavItem.MonitorSubscription, + HomeLeftNavItem.SpotIQAnalysis + ], + //... other embed view configuration attributes +}); +---- + +== Customize the Help menu + +If you want to include the help menu and link:https://docs.thoughtspot.com/cloud/latest/customize-help[add custom links, window=_blank] to it, ensure that the top navigation bar is visible and `disableProfileAndHelp` is set to `false`. + +By default, the help menu in the embedded view shows the legacy information center controlled using Pendo. To enable the new information center and add custom links, set `enablePendoHelp` to `false`. + +To add custom links to the help menu, use the customization settings available on the **Admin settings** > **Help customization** page. For more information, refer to the link:https://docs.thoughtspot.com/cloud/latest/customize-help[ThoughtSpot Product Documentation]. + +[source,JavaScript] +---- +const embed = new AppEmbed("#embed", { + // Display the top navigation bar + showPrimaryNavbar: true, + // Show the profile and help icons in the top navigation bar. + disableProfileAndHelp: false, + // Use the new ThoughtSpot information center for help and support. + enablePendoHelp: false, + //... other embed view configuration attributes +}); +---- + +== Additional resources +See also: + +* xref:full-app-customize.adoc[Customize full application embed] +* xref:full-embed.adoc[Embed full application] +* xref:AppViewConfig.adoc[AppViewConfig reference page] +* xref:HostEvent.adoc[Host events] +* xref:EmbedEvent.adoc[Embed Events] +* xref:Action.adoc[Actions] diff --git a/modules/ROOT/pages/data-security.adoc b/modules/ROOT/pages/data-security.adoc index 99e98c112..ae6adf312 100644 --- a/modules/ROOT/pages/data-security.adoc +++ b/modules/ROOT/pages/data-security.adoc @@ -15,9 +15,10 @@ Row Level Security (RLS) is the term for filtering down to rows of data based on ThoughtSpot has three mechanisms for row-level security: -* xref:rls-rules.adoc[RLS Rules, window=_blank] applied to the ThoughtSpot table objects -* xref:abac-user-parameters.adoc[Attribute-Based Access Control (ABAC)] filters and parameters passed in via login token -* link:https://docs.thoughtspot.com/cloud/latest/connections-snowflake-oauth[OAuth connections, _target=blank]: Individualized login to the data warehouse connection using OAuth, where security rules have already been implemented for each user. +* xref:rls-rules.adoc[RLS Rules, window=_blank] applied to the ThoughtSpot table objects. +* xref:abac_rls-variables.adoc[Attribute-Based Access Control (ABAC)] with custom variables referenced in RLS rules passed in via login token. +* xref:abac-user-parameters.adoc[Attribute-Based Access Control (ABAC)] with filters parameters passed in via login token. +* link:https://docs.thoughtspot.com/cloud/latest/connections-snowflake-oauth[OAuth connections, window=_blank]: Individualized login to the data warehouse connection using OAuth, where security rules have already been implemented for each user. The OAuth workflow requires opening a new window or redirecting to the OAuth provider for the initial sign-in workflow, making it less seamless than using a service account and defining data security via ThoughtSpot. It tends to be used for non-embedded ThoughtSpot use cases or for embedded applications for an organization's internal users with existing individual data warehouse user accounts. diff --git a/modules/ROOT/pages/deprecated-features.adoc b/modules/ROOT/pages/deprecated-features.adoc index 8db175032..b64e3d751 100644 --- a/modules/ROOT/pages/deprecated-features.adoc +++ b/modules/ROOT/pages/deprecated-features.adoc @@ -14,7 +14,7 @@ As ThoughtSpot applications evolve, some existing features will be deprecated an [options='header'] |===== |Feature|Impacted interface and release versions|Deprecation date |End of Support / removal from the product - +a|xref:deprecated-features.adoc#_answer_data_panel_classic_experience_deprecation[Answer Data panel classic experience] |ThoughtSpot Cloud 26.4.0.cl and later | April 2026 | August 2026 a|xref:deprecated-features.adoc#_worksheet_deprecation_and_removal[Worksheets] a| ThoughtSpot Cloud 10.4.0.cl and later |November 2024 | September 2025 @@ -79,7 +79,14 @@ a|xref:deprecated-features.adoc#_deprecated_parameter_in_rest_api_v2_0_authentic |September 2022| January 2023 |||| |===== - + +== Answer Data panel classic experience deprecation +The classic Data panel experience in Search and Answer pages will be deprecated in ThoughtSpot 26.4.0.cl release version. The new data panel experience, which provides a more intuitive layout with improved organization of data elements and features such as query sets and custom groups, will be the default data panel experience on all ThoughtSpot Embedded instances using Visual Embed SDK v1.41.1 or later. + +Recommended action:: +If your instance is still using the classic experience, we recommend switching to the new experience, testing your rollout, and updating your application workflows for a seamless embedding experience. You can enable the new data panel experience using the xref:embed-search.adoc#_data_panel_experience_in_the_embedded_search_page[dataPanelV2] attribute in the Visual Embed SDK. + +For more information and migration assistance, contact ThoughtSpot Support. + == Worksheet deprecation and removal Starting with 10.4.0.cl, Worksheets are deprecated and disabled by default in ThoughtSpot. In ThoughtSpot Cloud 10.12.0.cl and later versions, the ability to create new Worksheets will be removed, and all existing Worksheets will be automatically migrated to Models. diff --git a/modules/ROOT/pages/embed-events.adoc b/modules/ROOT/pages/embed-events.adoc index 6369e3433..ba6616f20 100644 --- a/modules/ROOT/pages/embed-events.adoc +++ b/modules/ROOT/pages/embed-events.adoc @@ -513,9 +513,8 @@ Fires when a change occurs in the data sources, including the initial load of th Fires when a change occurs in the search bar, including the initial load of the `SearchEmbed` component. The returned object includes a `data.search` property with the TML search query from the search box. //// - == Related resources -* Visual Embed SDK documentation xref:EmbedEvent.adoc[EmbedEvent] and xref:HostEvent.adoc[HostEvent] SDK documentation. +* See xref:EmbedEvent.adoc[EmbedEvent] and xref:HostEvent.adoc[HostEvent] SDK documentation. * For information about triggering events on React components, see xref:https://developers.thoughtspot.com/docs/tutorials/react-components/lesson-04[Event listeners for React components]. diff --git a/modules/ROOT/pages/embed-pinboard.adoc b/modules/ROOT/pages/embed-pinboard.adoc index 8a8c35d46..455283606 100644 --- a/modules/ROOT/pages/embed-pinboard.adoc +++ b/modules/ROOT/pages/embed-pinboard.adoc @@ -64,9 +64,9 @@ For more information about the Liveboard embed object, classes, methods, interfa == Customize Liveboard view -The second argument of the `LiveboardEmbed()` constructor is a `xref:LiveboardViewConfig.adoc[LiveboardViewConfig]` object. This object includes several attributes and properties that are frequently used to customize the `LiveboardEmbed` component to fit within the embedding app's UI experience. +The `LiveboardEmbed` component includes the `xref:LiveboardViewConfig.adoc[LiveboardViewConfig]` object. This object provides various attributes and properties to customize the xref:css-customization.adoc[look and feel of the Liveboard page], xref:embed-actions.adoc[control the visibility of menu actions] and features, and xref:embed-events.adoc[manage interactions between the host and embedded app]. -The most common customization is xref:embed-actions.adoc[controlling the visibility of menu items in the embedded view] by configuring the `disabledActions`, `hiddenActions`, and `visibleActions` properties with an array of xref:Action.adoc[Action] IDs. For information about the other frequently used properties, see xref:embed-pinboard.adoc#common-customizations[common customization options]. +The most common customization is controlling the visibility of menu items in the embedded view by configuring the `disabledActions`, `hiddenActions`, and `visibleActions` properties with an array of xref:Action.adoc[Action] IDs. For information about the other frequently used properties, see xref:embed-pinboard.adoc#common-customizations[common customization options]. == Register, handle, and trigger events @@ -501,12 +501,25 @@ liveboardEmbed.trigger(HostEvent.UpdateFilters, { //// -=== Liveboard grouping and styling [beta betaBackground]^Beta^ +=== Liveboard grouping and styling [earlyAccess eaBackground]#Early Access# You can now create a visual group of Answers and note tiles together in the Liveboard. You can select multiple Answers and notes in the Liveboard editor. You can also style parts of the Liveboard, groups and Answers with the new styling panel. -To enable this feature, set `isLiveboardStylingAndGroupingEnabled` to `true`. For more information, see link:https://docs.thoughtspot.com/cloud/latest/liveboard-grouping-styling[Liveboard grouping and styling, window=_blank]. +To enable this feature, set `isLiveboardStylingAndGroupingEnabled` to `true`. It is important to note the following changes which happen in the Liveboard UI and layout when this feature is active. -To understand about the CSS variables for this feature, see xref:customize-css-styles.adoc#grp-style[CSS variables reference]. +* All tiles on the Liveboard will now have a default border and an increased border-radius, resulting in more pronounced curved corners. This is part of the broader visualization tile customization options done to enhance the visual appearance of charts and tables. +* For Note tiles, the default scrollbar is now hidden for long content. Users must scroll within the tile area itself, and if the tile is not sized appropriately for its content, it may appear clipped due to the new container styles. This change emphasizes the importance of properly sizing Note tiles to avoid content being visually cut off. +* If a Liveboard is saved with Groups in the ThoughtSpot interface, but the embedding code does not have the grouping and styling feature enabled, the Liveboard will fail to load and throw an error. ++ +[.bordered] +[.widthAuto] +-- +image::./images/lb-grp-styling-error.png[Liveboard with groups styling error] +-- ++ +To embed a Liveboard that uses Groups, you must set `isLiveboardStylingAndGroupingEnabled` to `true` in your embedding configuration. This is required for compatibility with the new grouping and styling features; otherwise, the embedded Liveboard will not render correctly. + +For more information, see link:https://docs.thoughtspot.com/cloud/latest/liveboard-grouping-styling[Liveboard grouping and styling, window=_blank]. +To understand about the CSS variables for this feature, see xref:customize-css-styles.adoc#grp-style[CSS variables reference]. === Liveboard comments diff --git a/modules/ROOT/pages/embed-search.adoc b/modules/ROOT/pages/embed-search.adoc index 7e0cd2918..ffa6e9468 100644 --- a/modules/ROOT/pages/embed-search.adoc +++ b/modules/ROOT/pages/embed-search.adoc @@ -265,9 +265,7 @@ For more information about the search embed object, classes, methods, interface === Data panel experience in the embedded Search page -By default, the data panel on an embedded Search page is presented in the classic experience mode. You can enable the new data panel experience either via ThoughtSpot UI or by setting the `dataPanelV2` property to `true` in the SDK. - -Create an instance of the SearchEmbed object and customize your search page view with the new data panel experience. +The data panel on an embedded Search or Answer page can vary based on the data panel experience configured on your instance. If your instance is using classic experience, you can switch to the new data panel experience either via ThoughtSpot UI or by setting the `dataPanelV2` attribute to `true` in the SDK. [source,javascript] ---- @@ -284,12 +282,8 @@ const searchEmbed = new SearchEmbed(document.getElementById('ts-embed'), { }, }); ---- -[IMPORTANT] -==== -Some action enumerations and variables for custom styling are not supported in the new data panel experience. -==== -For more information about the new data panel experience, see link:https://docs.thoughtspot.com/cloud/latest/search-start[ThoughtSpot product documentation]. +For more information about the new data panel, see link:https://docs.thoughtspot.com/cloud/latest/search-start[ThoughtSpot product documentation]. == Register, handle, and trigger events diff --git a/modules/ROOT/pages/full-app-customize.adoc b/modules/ROOT/pages/full-app-customize.adoc index 9b21acf4b..8fb5f3670 100644 --- a/modules/ROOT/pages/full-app-customize.adoc +++ b/modules/ROOT/pages/full-app-customize.adoc @@ -1,507 +1,356 @@ -= Customize full application embed += Customize full application embedding :toc: true -:toclevels: 2 +:toclevels: 3 :page-title: Customize full application embedding :page-pageid: full-app-customize :page-description: Customize full application embedding - The Visual Embed SDK provides several controls to customize the embedded view, including setting the default landing page, navigation style, visibility of modules and menu items, and more. +[div announcementBlock] +-- +[IMPORTANT] +The classic (V1) experience and V2 experience modes will be deprecated in an upcoming release in 2026. Therefore, ThoughtSpot recommends upgrading the UI experience of your full application embedding to the V3 experience. +-- + == UI experience modes +ThoughtSpot application supports the following UI experience modes: -The ThoughtSpot application interface supports the following UI experience modes: +* xref:full-app-customize.adoc#_upgrade_to_the_v3_experience[V3 navigation and home page experience] (__Recommended__) +* xref:full-app-customize.adoc#_upgrade_from_the_v2_experience_to_v3_experience[V2 navigation and home page experience] +* Classic (V1) experience (__Default experience__) -* xref:full-app-customize.adoc#_v3_experience[V3 experience] [earlyAccess eaBackground]#Early Access# + -Includes a sliding left navigation panel that dynamically adjusts its menu based on the application context. In this experience mode, the home page includes the same customizable modules as the V2 experience. -* xref:full-app-customize.adoc#_v2_experience[V2 experience] + -Includes a modular home page with customizable components, an application selector menu, and a left navigation panel for each application context. -* V1 Classic experience (__Default experience__) + -Includes a standard top navigation and a static home page with limited customization options. +The key differences between these UI experience modes are listed in the following table: -=== V3 experience +[div boxAuto] +-- +[width="100%", cols="2,4,4,5"] +[options='header'] +|===== +|Feature component |Classic (V1) experience | V2 experience | V3 experience +|**UI experience**| Classic layout + -The V3 experience introduces the following changes: +Includes a standard top navigation, pages without a left navigation panel, and a static home page with limited customization options.| Improved look and feel + -* Navigation and UI layout: -** A redesigned top navigation bar with a modern and simplified layout. -** Persona-based navigation with app selector icons. The app selection icons are organized into contextual sections, each with its own left navigation. -** Admin settings in the user profile dropdown. -** A hamburger menu for toggling left navigation. -+ -To customize the navigation experience, use the xref:full-app-customize.adoc#_customize_navigation_experience[navigation attributes] in the SDK. +Includes a modular home page with customizable components, an application selector menu, and a left navigation panel for each application context. | Modern look and feel + -* Home page: + -The V3 experience includes a modular home page, similar to the V2 experience. You can xref:full-app-customize.adoc#_customize_home_page_experience[customize the visibility and order of the home page components] using the properties available in the SDK. +Includes a left navigation panel that dynamically adjusts its menu based on context and a modular home page with enhanced visual elements and customizable components. +|**Navigation experience**| Top navigation includes the application menu. + +Limited customization controls |Redesigned top navigation bar with an app selector and other icons + +Separate left navigation panel for each application context| Sliding left navigation panel with persona-based application icons + +A dynamic left navigation menu that adjusts its contents according to the application context. +|**Home page experience**| Static home page with limited customization control | Modular home page with customizable components |Modular home page with customizable components, enhanced styling, and visual elements. -The following figure shows the UI layout in the V3 experience: +|**Feature availability**| Enabled by default| Disabled by default | Disabled by default -[.bordered] -[.widthAuto] -image::./images/new-nav3.png[New home page] +|===== +-- +//// +[width="100%", cols="2,8,8,8"] +[options='header'] +|===== +||V1 (Legacy) |V2 experience |V3 experience + +|Navigation style a|* Top navigation bar for application menu. + +* Separate left navigation panels only for specific application context, such as *Data*, *Admin* and *Develop* modules a| +* Persona-based app selector on the top navigation bar + +* A separate left navigation panel for each persona-based application context a| +* Sliding left navigation panel +* Persona-based tabs on the left panel to switch between application context. +* Separate left navigation panel for each application context. +|Home page experience| Basic | Modular and customizable home page | Modular +|Enablement| The default, legacy ThoughtSpot UI. a| Disabled by default. + +Can be enabled by setting `modularHomeExperience: true` in the Visual Embed SDK a| Disabled by default. + +Can be enabled by setting the `discoveryExperience` properties in the Visual Embed SDK. +|Migration considerations| If you want to continue using the classic experience, no migration is required. +If you plan to switch to the new navigation and modular home page experience, ThoughtSpot recommends migrating to the new v3 experience. +| The v2 navigation experience can be enabled by setting `modularHomeExperience` to `true` in the Visual Embed SDK. However, the new v3 experience with left navigation panel provides an improved experience and more customizable components for home page, therefore, we recommend using the v3 experience. +If you are already on v2 experience and want to switch to the new v3 experience, contact ThoughtSpot Support to enable this feature on your instance. +Once enabled, configure the `discoveryExperience` properties and customize your home page experience as per your embedding requirements. +|Contact ThoughtSpot Support to enable the v3 experience on your ThoughtSpot instance. +Once enabled, configure the `discoveryExperience` properties and customize your home page experience as per your embedding application requirements. +|||| +|===== +//// + +== Customize the embedded application UI for your users + +Before updating the UI experience, review the xref:full-app-customize.adoc#_ui_experience_modes[key features, limitations], and available SDK controls for customizing xref:customize-nav-full-embed.adoc[navigation] and the xref:customize-homepage-full-embed.adoc[home page]. -==== Enable V3 experience -The V3 experience is an Early Access feature that ThoughtSpot administrators can enable at the instance level. It is disabled by default +For more information about the layout and UI elements in the V3 experience, refer to the link:https://docs.thoughtspot.com/cloud/latest/thoughtspot-homepage[ThoughtSpot Product Documentation, window=_blank]. -When it is enabled on your ThoughtSpot instance, you can upgrade the UI experience in your embed using the `discoveryExperience` object in the SDK. This object supports the following properties: +=== Upgrade to the V3 experience +If you are using the classic (V1) experience in your embed, ThoughtSpot recommends migrating directly to the V3 experience for an improved user interface, enhanced home page customization options, and navigation controls. + +Before you begin: + +* Verify if your ThoughtSpot instance has the V3 experience enabled at the cluster level. +* Ensure that your embedding environment has the latest version of the Visual Embed SDK. The minimum supported version for the V3 experience is v1.40.0. +* If you are using direct CSS selectors for style customization, test your customization in the Playground. +* If your embed uses action customization and the SDK events for app interactions, test your customizations for compatibility across different UI experiences to ensure seamless migration. + +==== V3 experience settings in the SDK + +To enable the V3 experience, you must use the `discoveryExperience` object in the SDK. This object supports the following properties: * `primaryNavbarVersion` + -Enables the V3 experience. The valid setting for the V3 experience is `PrimaryNavbarVersion.Sliding`. +Enables the V3 experience. The valid value for the V3 experience is `PrimaryNavbarVersion.Sliding`. + +If this attribute is not set, no changes will be applied, and the currently enabled UI experience in your app will be retained. + * `homePage` + -Enables a modular home page that is similar to the V2 modular home page experience. The supported value is `HomePage.Modular`. +Enables the modular home page experience. Valid values include: +** `HomePage.ModularWithStylingChanges` (__Recommended__) + +Enables the V3 modular home page experience. You must include `primaryNavbarVersion` to update the UI experience to the V3 home page. +** `HomePage.Modular` + +Enables the modular home page experience with customizable components. This experience does not include the styling options and visual changes available with the full V3 experience. We do not recommend using this option, as it will be deprecated in an upcoming 2026 release. + +[IMPORTANT] +==== +* To enable the full V3 experience, both `primaryNavbarVersion` and `homePage` attributes must be set in the SDK. Not setting `primaryNavbarVersion` will result in no changes to the UI experience. +* If you include only the `homePage: HomePage.ModularWithStylingChanges` attribute in `discoveryExperience`, it will be ignored. + +* If you include only the homePage attribute with its value as `HomePage.Modular`, the v2 modular home page experience will be enabled. + +For information about these configuration combinations and their effects, see xref:full-app-customize.adoc#_ui_customization_options_and_resulting_experience[UI customization options and resulting experience]. +==== + +==== Upgrade from classic (V1) experience to V3 experience +To enable the V3 experience, set the `primaryNavbarVersion` and `homePage` parameters in the `discoveryExperience` object as shown in the following example. + +Note that these attributes use the values from the xref:PrimaryNavbarVersion.adoc[PrimaryNavbarVersion] and xref:HomePage.adoc[HomePage] enumerations. [source,JavaScript] ---- - +// Import required components and enums for V3 experience import { AppEmbed, // Main class to embed the full ThoughtSpot app - PrimaryNavbarVersion // Enum for V3 navigation experience HomePage, // Enum for home page experience settings + PrimaryNavbarVersion // Enum for V3 navigation experience } from '@thoughtspot/visual-embed-sdk'; const embed = new AppEmbed("#embed", { // Enable V3 navigation and home page experience discoveryExperience: { - primaryNavbarVersion: PrimaryNavbarVersion.Sliding, // Enables V3 sliding navigation - homePage: HomePage.Modular, // modular home page + primaryNavbarVersion: PrimaryNavbarVersion.Sliding, // Enable V3 navigation + homePage: HomePage.ModularWithStylingChanges, // Enable V3 home page experience }, // Show navigation panels showPrimaryNavbar: true, - //... other view configuration attributes + //... other embed view configuration attributes }); ---- -//// -* A redesigned UI with a sliding navigation panel. -* The app selector icons for *Insights*, *Data workspace*, and *Develop* appear in the header section of the left navigation panel. This selector provides access to persona-based apps, replacing the old top navigation menu. The left navigation panel provides quick access to different modules and can be customized. -* The *Admin* module is available under the user settings section in the top right corner. -* The *Home* page is available in the *Insights* section. The Home page is customizable and includes features such as Natural Language Search, watchlist, favorites, a library of Answers and Liveboards, and trending charts. -* The *Insights* section in the left navigation panel provides quick access to the Home page, Answers, Liveboards, and more. The panel also includes a list of users' favorites. -* The top navigation panel includes the following components: -** A Hamburger icon to allow users to slide out or slide in the navigation panel. -** Object search bar with quick access to the library. -** An Alert icon that shows notifications -** Help icon to access documentation -** Org switcher to switch between Org contexts -** Access to *Profile*, *Admin settings* (if the user has administrator privilege), and *Sign out* options. -//// - -=== V2 experience - -The V2 experience provides the following features: - -* Navigation experience: + -** The top navigation includes an app selector menu, which consists of different persona-based menu elements to allow users to switch between different application contexts. -** Each application context has its own left navigation menu. -+ -You can customize the navigation experience using the xref:full-app-customize.adoc#_customize_navigation_controls[navigation controls] available in the SDK. -* Home page experience: + -The home page includes customizable modules such as watchlist, favorites, library, trending charts, and more. You can xref:full-app-customize.adoc#_customize_home_page_experience[customize the visibility and order of the home page components] using the properties available in the SDK. +==== Upgrade from the V2 experience to V3 experience +Both V2 and V3 experience modes support a modular home page with customizable components. The V3 modular home page experience includes additional improvements to the Watchlist, Trending, Learning, and Favorites panels. -//// -The following figure shows the UI layout in the V2 experience: +To upgrade your UI to the V3 experience, set `homePage` to `HomePage.ModularWithStylingChanges`: -[.bordered] -[.widthAuto] -image::./images/homepage.png[New home page] -//// - -==== Using the V2 experience -The V2 experience is disabled by default on ThoughtSpot embedding applications. -Setting `modularHomeExperience` to `true` in the SDK enables the V2 experience. - -[source,javascript] ----- -const embed = new AppEmbed("#embed", { - // Enable the V2 experience - modularHomeExperience: true, - //... other view config attributes -}); ----- - -[NOTE] -==== -The V2 experience will be deprecated in an upcoming release. ThoughtSpot strongly recommends upgrading to the V3 experience to ensure continued support and access to the latest features. -==== - - -//// -==== Enable AI Search -To set AI Search as the default search experience on the Home page, use the settings shown in the following examples. - -==== Enable AI Search with Spotter (Recommended) -To set Spotter as the default search experience on the Home page, use the settings shown in the following examples. - -===== New Home page experience - -[source,javascript] ----- -const embed = new AppEmbed("#embed", { - isUnifiedSearchExperienceEnabled: "false", - homePageSearchBarMode: "aiAnswer", -}); +[source,JavaScript] ---- +// Import required components and enums for V3 experience +import { + AppEmbed, // Main class to embed the full ThoughtSpot app + HomePage, // Enum for home page experience settings + PrimaryNavbarVersion // Enum for V3 navigation experience +} from '@thoughtspot/visual-embed-sdk'; -Home page search experience:: - - -Spotter page;; -[.bordered] -[.widthAuto] -image::./images/spotter-fullApp2.png[] - -===== Home page classic experience - -[source,javascript] ----- const embed = new AppEmbed("#embed", { - isUnifiedSearchExperienceEnabled: "false", - homePageSearchBarMode: "aiAnswer", + // Enable V3 navigation and home page experience + discoveryExperience: { + primaryNavbarVersion: PrimaryNavbarVersion.Sliding, // Enable V3 navigation experience + homePage: HomePage.ModularWithStylingChanges, // Enable V3 modular home page + }, + // Show navigation panels + showPrimaryNavbar: true, + //... other embed view configuration attributes }); ---- - - - -Spotter page;; -[.bordered] -[.widthAuto] -image::./images/spotter-fullApp2.png[] - -==== Enable AI Search (legacy) -To enable Natural Language Search (legacy), use the settings shown in these examples: - -===== New Home page experience - -[source,javascript] ----- -const embed = new AppEmbed("#embed", { - homePageSearchBarMode: "aiAnswer", -}); +//// +* `homePage: HomePage.Modular` for the V2 modular home page layout. This option doesn't include the customizable components available in the V3 experience. ++ +[source,JavaScript] ---- -Home page search experience:: -[.widthAuto] -[.bordered] -image::./images/sage-search-new-exp.png[] - -AI Search page:: - -[.widthAuto] -[.bordered] -image::./images/sage-search-home.png[] - -===== Home page classic experience +// Import required components and enums for V3 experience +import { + AppEmbed, // Main class to embed the full ThoughtSpot app + HomePage, // Enum for home page experience settings + PrimaryNavbarVersion // Enum for V3 navigation experience +} from '@thoughtspot/visual-embed-sdk'; -[source,javascript] ----- const embed = new AppEmbed("#embed", { - homePageSearchBarMode: "aiAnswer", + // Enable V3 navigation and home page experience + discoveryExperience: { + primaryNavbarVersion: PrimaryNavbarVersion.Sliding, // Enables V3 navigation + homePage: HomePage.ModularWithStylingChanges, // Enables V2 modular home page + }, + // Show navigation panels + showPrimaryNavbar: true, + //... other embed view configuration attributes }); ---- - -Home page search experience:: - -[.widthAuto] -[.bordered] -image::./images/sage_search-home-classic.png[] - -AI Search page:: - -[.widthAuto] -[.bordered] -image::./images/sage-search-home.png[] - //// +==== Post migration checks +After you enable the V3 experience: - -//// -New home page and navigation experience mode:: -By default, the Object Search bar is displayed in the Search module on the embedded **Home** page: +* Ensure the UI shows the V3 navigation and home page. + -[.bordered] -image::./images/objSearchNav_modularExp.png[] - -Classic experience mode:: -By default, the Object Search bar is displayed on the embedded **Home** page. - +The following figure shows the user interface with the V3 experience: + [.bordered] -image::./images/sageDisabledwithNav_classic.png[] -//// -//// -=== Home page search experience options +[.widthAuto] +image::./images/new-nav3.png[New home page] -Developers can customize the Search experience by setting the `homePageSearchBarMode` property in the SDK to a desired value: +* Verify that all the customization settings are applied correctly. +* If you have set up custom routes for navigation within your embedded app, verify navigation workflows and check for breaking changes. -** `objectSearch` (default) + -Displays Object Search bar on the **Home** page. -** `aiAnswer` + -Displays the search bar for Natural Language Search -** `none` + -Hides the Search bar on the **Home** page. Note that it only hides the Search bar on the **Home** page and doesn't affect the Object Search bar visibility on the top navigation bar. -==== Enable AI Search -To set AI Search as the default search experience on the Home page, use the settings shown in the following examples. +//// +* A sliding left navigation panel with the following components: +** The app selector icons for *Insights*, *Data workspace*, and *Develop* appear in the left navigation panel header. +** The *Liveboards*, *Answers*, *Search Data*, and *Spotter* menu options in the *Insights* section. The *Insights* panel also includes a list of users' favorites. +** The *Home* menu option in the *Insights* section. + +* A top navigation header with the following components: +** A hamburger icon to slide in or close the navigation overlay +** Object search bar +** The alert icon that shows notifications +** Help and user profile icons. The user profile menu includes the *Admin settings* menu. This option is visible only to users with administration privileges. +** Org switcher to switch between Org contexts -==== Enable AI Search with Spotter (Recommended) -To set Spotter as the default search experience on the Home page, use the settings shown in the following examples. +* Home page experience +** Modular home page with specific sections for Search, Watchlist, Favorites, and so on. +//// -===== New Home page experience +=== Upgrade from classic (V1) experience to V2 experience +Setting `modularHomeExperience` to `true` in the SDK enables the V2 experience. [source,javascript] ---- const embed = new AppEmbed("#embed", { + // Enable the V2 experience modularHomeExperience: true, - isUnifiedSearchExperienceEnabled: "false", - homePageSearchBarMode: "aiAnswer", + //... other view config attributes }); ---- -Home page search experience:: - -[.bordered] -[.widthAuto] -image::./images/spotter-fullApp.png[] +[NOTE] +==== +The V2 experience will be deprecated in an upcoming release. ThoughtSpot strongly recommends upgrading to the V3 experience to ensure continued support and access to the latest features. +==== +//// +The following figure shows the user interface with the V2 experience enabled: -Spotter page;; [.bordered] [.widthAuto] -image::./images/spotter-fullApp2.png[] - -===== Home page classic experience +image::./images/homepage.png[New home page] +//// -[source,javascript] ----- -const embed = new AppEmbed("#embed", { - isUnifiedSearchExperienceEnabled: "false", - homePageSearchBarMode: "aiAnswer", -}); ----- +=== UI customization options and resulting experience -Home page search experience;; -[.bordered] -[.widthAuto] -image::./images/spotter_search-home-classic.png[] +The following table summarizes the resulting UI experience for different configuration combinations: -Spotter page;; -[.bordered] -[.widthAuto] -image::./images/spotter-fullApp2.png[] +[div boxAuto] +-- +[width="100%", cols="6,7,6"] +[options='header'] +|=== +|If `modularHomeExperience` is | And `discoveryExperience` is| UI experience will be -==== Enable AI Search (legacy) -To enable Natural Language Search (legacy), use the settings shown in these examples: +|`true` / `false` + +Not set / Incorrect a| -===== New Home page experience -[source,javascript] +[source,JavaScript] ---- -const embed = new AppEmbed("#embed", { - modularHomeExperience: true, - homePageSearchBarMode: "aiAnswer", -}); +discoveryExperience: { + // V3 experience and navigation + primaryNavbarVersion: PrimaryNavbarVersion.Sliding, + // V3 modular home page + homePage: HomePage.ModularWithStylingChanges + } ---- -Home page search experience:: -[.widthAuto] -[.bordered] -image::./images/sage-search-new-exp.png[] - -AI Search page:: +| V3 navigation and V3 modular home page -[.widthAuto] -[.bordered] -image::./images/sage-search-home.png[] +|`true` / `false` + +Not set / Incorrect a| -===== Home page classic experience - -[source,javascript] +[source,JavaScript] ---- -const embed = new AppEmbed("#embed", { - homePageSearchBarMode: "aiAnswer", -}); +discoveryExperience: { + // V3 navigation + primaryNavbarVersion: PrimaryNavbarVersion.Sliding, + // modular home page + homePage: HomePage.Modular + }, ---- -Home page search experience:: - -[.widthAuto] -[.bordered] -image::./images/sage_search-home-classic.png[] - -AI Search page:: - -[.widthAuto] -[.bordered] -image::./images/sage-search-home.png[] -//// - -== Customize navigation experience -The Visual Embed SDK provides several parameters to hide or customize navigation controls. - -=== Customize top navigation -The top navigation menu bar (classic experience), app selector image:./images/app_switcher.png[the app switcher menu] (V2 experience), and left navigation panel on the home page (V3 experience) are hidden by default in the embedded view. To show these elements in the embedded view, set `showPrimaryNavbar` to `true`. - -If the navigation panel is visible in the embedded view, you can use the following customization settings in the SDK: - -* `hideOrgSwitcher` + -To show or hide the Orgs drop-down. -* `hideApplicationSwitcher` + -To show or hide the application switcher in V2 experience) and application selector icons in the V3 experience. In the V3 experience, it also hides the *Admin settings* menu in the user settings drop-down. -* `disableProfileAndHelp` + -To show or hide the help and profile icons. + -In V2 experience, this parameter also controls the visibility of *Help* menu in the left navigation panel of the home page. + -In the V3 experience, the profile icon includes the *Admin settings* menu, which is also hidden when the profile icon is disabled via `disableProfileAndHelp`. -* `hideObjectSearch` + -To show or hide the Object search bar in the top navigation in V2 and V3 experience modes. -* `hideNotification` + -To show or hide the alert icon in the V3 experience. -* `hideHamburger` + -To show or hide the hamburger icon in the V3 experience. - -The following example hides the icons in top navigation and the application selection menu: +| V3 navigation and a modular home page that is similar to the V2 experience +|`true` / `false` + +/ Not set / incorrect a| [source,JavaScript] ---- -const embed = new AppEmbed("#embed", { - //... other attributes - showPrimaryNavbar: true, // Show navigation bar - hideApplicationSwitcher: true, // Hide application selector - disableProfileAndHelp: true, // Hide Help and Profile icons in top navigation - hideObjectSearch: true, // Hide the object search bar in top navigation -}); +discoveryExperience: { + // V3 navigation + primaryNavbarVersion: PrimaryNavbarVersion.Sliding + }, ---- +|V3 navigation and a modular home page that is similar to the V2 experience -=== Customize the left navigation panel on home page - -In the V2 and V3 experience modes, the left navigation panel on the *Insights* > *Home* page includes menu items such as *Answers*, *Liveboards*, *SpotIQ Analysis*, *Monitor Subscriptions*, and more. You can hide this navigation panel by setting the `hideHomepageLeftNav` property to `true` in the SDK. Note that this attribute hides only the left navigation on the home page. - -If you want to include the left navigation, but hide only a specific section in the *Insights* panel, use the `hiddenHomeLeftNavItems` property and specify the menu items to hide: +|`true` / `false` + +/ Not set / incorrect a| [source,JavaScript] ---- -const embed = new AppEmbed("#embed", { - //... V2 or V3 experience attributes - //Show left navigation panel on the home page - hideHomepageLeftNav: false, - hiddenHomeLeftNavItems: [ - HomeLeftNavItem.MonitorSubscription, - HomeLeftNavItem.SpotIQAnalysis - ], // Hide SpotIQ analysis and Monitor subscriptions menu items -}); +discoveryExperience: { + // modular home page + homePage: HomePage.Modular + }, ---- -== Customize home page experience -The modular home in V2 and V3 experience include modules such as watchlist, favorites, a library of Answers and Liveboards, trending charts and more. - -To show or hide specific modules on the home page, use the xref:AppViewConfig.adoc#_hiddenhomepagemodules[`hiddenHomepageModules`] parameter. -To reorder the home page components, use the xref:AppViewConfig.adoc#_reorderedhomepagemodules[ `reorderedHomepageModules`] array. +| V2 navigation and V2 modular home page -The following example hides several home page components and specifies the order in which the remaining components appear on the home page: +a|`true` a| -[source,javascript] +[source,JavaScript] ---- -const embed = new AppEmbed("#embed", { - //... - // Hide modules from the home page - hiddenHomepageModules: [ - HomepageModule.Learning, - HomepageModule.Trending - ], - // Custom order for visible modules - reorderedHomepageModules: [ - HomepageModule.Search, - HomepageModule.Favorite, - HomepageModule.Watchlist, - HomepageModule.MyLibrary - ], - //...other view configuration properties -}); +discoveryExperience: { + // V3 modular home page + homePage: HomePage.ModularWithStylingChanges + }, ---- +| V2 navigation and V2 modular home page -[#_search_experience_on_home_page] -=== Customize the search experience on home page -You can set the search experience on the home page to function as an object search bar that allows finding popular objects, or as an AI search interface that allows natural language queries or Spotter sessions. You can also choose to hide it from the home page. -To configure your preference, specify the following values in the `homePageSearchBarMode` attribute. - -[width="100%", cols="4,8"] -[options='header'] -|===== -|Search bar mode|Description -|`HomePageSearchBarMode.AI_ANSWER` | -Sets the natural language search bar that allows queries in natural language. -If Spotter is enabled on your instance, you can use this setting to set the Spotter search bar on the home page. -|`HomePageSearchBarMode.OBJECT_SEARCH` |Enables object search that allows users to find objects from the library. -|`HomePageSearchBarMode.NONE` a| Hides the search bar on the home page. Note that it only hides the Search bar on the **Home** page and doesn't affect the Object Search bar visibility on the top navigation bar. -|| -|===== - - -[NOTE] -==== -If your instance is using the V1 classic experience and the `homePageSearchBarMode` parameter does not set the search context defined in your code, set `isUnifiedSearchExperienceEnabled` to `false`. -==== +a| `false` / Not set / incorrect a| -The following examples show the code snippets to set the home page search bar mode to Spotter or AI search in different experience modes: - -V3 experience:: - -[source,javascript] +[source,JavaScript] ---- -import { - AppEmbed, - PrimaryNavbarVersion // Enum for V3 navigation experience - HomePage, // Enum for home page experience settings - HomePageSearchBarMode // Import the enum for search bar mode options -} from '@thoughtspot/visual-embed-sdk'; - -const embed = new AppEmbed("#embed", { - discoveryExperience: { - primaryNavbarVersion: PrimaryNavbarVersion.Sliding, // Enable v3 experience - homePage: HomePage.Modular // modular home page experience - }, - // Set the home page search bar to show the Spotter / AI search bar - homePageSearchBarMode: HomePageSearchBarMode.AI_ANSWER - // Other view configuration attributes -}); +discoveryExperience: { + // V3 modular home page + homePage: HomePage.ModularWithStylingChanges + }, ---- +|Classic (V1) experience. -V2 experience:: -[source,javascript] ----- -import { - AppEmbed, - HomePageSearchBarMode // Import the enum for search bar mode options -} from '@thoughtspot/visual-embed-sdk'; +a|`true` a| Not set | V2 navigation and V2 modular home page -const embed = new AppEmbed("#embed", { - modularHomeExperience: true, // Enable v2 modular home page experience - // Set the home page search bar to show the Spotter / AI search bar - homePageSearchBarMode: HomePageSearchBarMode.AI_ANSWER - // Other view configuration attributes -}); ----- +a|`false` / Not set / incorrect a| Not set | Classic (V1) experience +|=== +-- -V1 classic experience:: +== Customize navigation experience -[source,javascript] ----- -import { - AppEmbed, - HomePageSearchBarMode // Import the enum for search bar mode options -} from '@thoughtspot/visual-embed-sdk'; +For information about the navigation elements in each UI experience mode and the related customization settings in the SDK, see xref:customize-nav-full-embed.adoc[Customize navigation experience]. -const embed = new AppEmbed("#embed", { - // Set the home page search bar to show the Spotter / AI search bar - homePageSearchBarMode: HomePageSearchBarMode.aiAnswer, - // Disable the unified search experience - isUnifiedSearchExperienceEnabled: false, - //... other view configuration attributes -}); ----- +== Customize home page experience +For information about the home page components and the related customization settings in the SDK, see xref:customize-homepage-full-embed.adoc[Customize home page experience]. +== Customize the default loading page and navigation routes +In full application embedding, the home page is set as the default landing page when the embedded app loads. You can xref:set-default-page.adoc[customize the default landing page settings] using the `pageId` or `path` attribute. == Customize list pages - A list page in ThoughtSpot refers to a page that displays a list of objects, such as Answers, Liveboards, and Liveboard schedules. The list pages include columns for sorting, filtering, tagging, and performing bulk actions such as marking favorites, sharing, or deleting objects. To customize the columns in list pages such as *Liveboards* and *Answers*, use the xref:AppViewConfig.adoc#_hiddenlistcolumns[hiddenListColumns] attribute. Valid values that correspond to the column names on the list pages are: @@ -537,254 +386,8 @@ const embed = new AppEmbed("#embed", { The `hiddenListColumns: [ListPageColumns.Share]` hides the *Share* column, but doesn't remove the *Share* button above the list. To hide both the column and the *Share* (xref:Action.adoc#_share[Action.Share]) button above the list, use the `hiddenActions` or `visibleActions` array. ==== -== Customize the default page and navigation routes -In full application embedding, the home page is set as the default landing page when the embedded app loads. + -To change the default settings, you can use either the `pageId` or `path` parameter in the Visual Embed SDK. If both `path` and `pageId` properties are specified, the `path` definition takes precedence. - -=== Set the default page using pageId -The `pageId` parameter in `AppEmbed` sets the default ThoughtSpot page to load using a value from the xref:Page.adoc[Page enumeration]. - -Valid values for this attribute are: - -* `Page.Home` for the ThoughtSpot *Home* page + -* `Page.Search` for the ThoughtSpot *Search* page + -* `Page.Answers` for the *Answers* page + -* `Page.Liveboards` for the *Liveboards* page + -* `Page.Data` for the *Data* page + -* `Page.SpotIQ` for the *SpotIQ* analyses page - -==== Example -[source,javascript] ----- -//Import Page enumeration -import { AppEmbed, Page } from '@thoughtspot/visual-embed-sdk'; - -const embed = new AppEmbed("#embed", { - // Set the initial page - pageId: Page.Liveboards, - //... other view configuration attributes -}); ----- - -=== Set the default page via path -The `path` parameter allows setting the default ThoughtSpot application page using a URL path. - -Valid strings for the `path` parameter are: - -[width="100%", cols="3,6,6"] -[options='header'] -|===== -|Page| Classic experience | V2 and v3 experience -|Home| `path: "home"` | `path: "home"` + -`path: "insights/home"` -|Insights| `path: "home"` | `path: "home"` + -`path: "insights/home"` -|Liveboards list page| `path: "pinboards"`| `path: "pinboards"` + -`path: "home/liveboards"` + -`path: "insights/liveboards"` -|Liveboard page| `path: "pinboard/"`| `path: "pinboard/"` -|Answers list page| `path: "answers"`| `path: "answers"` + -`path: "home/answers"` + -`path: "insights/answers"` -|Saved Answer page| `path: "saved-answer/"` |`path: "saved-answer/"` -|Spotter| `path: "conv-assist"` |`path: "conv-assist"` + -`path: "insights/conv-assist"` -|Search data| `path: "answer"` | `path: "answer"` + -`path: "insights/answer"` -|Data| `path: "data/tables/"`| `path: "data/tables/"` -|Model, tables, views|`path: "data/tables/"`| `path: "data/tables/"` -|SpotIQ analysis list page|`path: "insights"`| `path: "insights"` + -`path: "insights/spotiq-analysis"` -|SpotIQ analysis page | `path: "insight/"`| `path: "insight/"` -|Monitor| `path: "monitor"` a| Supported settings include: - -* `path: "monitor"` + -* `path: "home/monitor-alerts"` + -* `path: "insights/monitor-alerts"` -|===== - -==== Example - -[source,javascript] ----- -const embed = new AppEmbed("#embed", { - // Set the initial page - path: 'pinboard/96a1cf0b-a159-4cc8-8af4-1a297c492ff9', - //... other view configuration attributes -}); ----- - -=== Customize navigation between pages within the app -To programmatically control navigation between the pages within the embedded app, you can use the `navigateToPage()` method and custom actions. - - -==== Using navigateToPage() - -The `AppEmbed` object includes a `navigateToPage()` method that can switch the currently loaded page in the embedded view. - -The `navigateToPage()` method accepts the same string values used for the `pageId` or `path` attributes. When customizing the menu, use `navigateToPage` to create a route to the desired page. - -[source,JavaScript] ----- -// Navigate to the Answers page -embed.navigateToPage(Page.Answers); - -// Navigate to the Answers page without reloading the iframe (noReload = true) -embed.navigateToPage(Page.Answers, true); ----- - -==== Using navigateToPage() with a custom action -To add a custom action for in-app navigation, create a xref:custom-actions-callback.adoc[callback custom action] and define the navigation path. - -In this example, the **view-report ** action on a Liveboard page calls the `navigateTo` method to open a specific Answer page when the user clicks the **View report** button. - -[source,JavaScript] ----- -// Listen for the CustomAction event triggered from the embedded ThoughtSpot app -appEmbed.on(EmbedEvent.CustomAction, async (payload: any) => { - // Check if the custom action ID is 'view-report' - if (payload.payload.id === 'view-report') { - // Navigate to the specific saved Answer page using its GUID - appEmbed.navigateToPage( - 'saved-answer/3da14030-11e4-42b2-8e56-5ee042a8de9e' - ); - } -}); ----- - -To navigate to a specific application page without initiating a reload, you can set the `noReload` attribute to `true` as shown in this example: - -[source,javascript] ----- -// Listen for the CustomAction event triggered from the embedded ThoughtSpot app -appEmbed.on(EmbedEvent.CustomAction, async (payload: any) => { - // Check if the custom action ID is 'view-report' - if (payload.payload.id === 'view-report') { - // Navigate to the specific saved Answer page using its GUID, - // and set noReload to true to avoid reloading the iframe - appEmbed.navigateToPage('saved-answer/3da14030-11e4-42b2-8e56-5ee042a8de9e', true); - } -}); ----- - -==== Using history.back() -Page changes within the `AppEmbed` component register as part of the embedding app's history to the web browser. - -The standard JavaScript `history.back()` function will cause the `AppEmbed` component to go to the previously loaded page up until the very first ThoughtSpot page loaded within the component. - -=== Detect changes in the currently loaded page -Various actions the user takes within the embedded ThoughtSpot application may cause navigation within ThoughtSpot. - -The embedding web application can listen for the `EmbedEvent.RouteChange` event by attaching an event listener to the `AppEmbed` object. The response has a `currentPath` property which is the path after the ThoughtSpot domain, for example: ----- -pinboard/96a1cf0b-a159-4cc8-8af4-1a297c492ff9 ----- - -To parse the `currentPath` into varying useful components, you can include this `tsAppState` object code in the global scope for use by any other web application code: - -[source,JavaScript] ----- -// Simple global object to handle details about what is visible in the AppEmbed component at a given moment -let tsAppState = { - currentPath: startPath, - currentDatasources: [], // Can be set later when detected from TML or other events - // return what is being viewed at the moment, in the form that will translate to the pageId property if capitalized, or path property if not - get pageType() { - if (this.currentPath.includes('/saved-answer/')){ - return 'answer'; - } - else if (this.currentPath.includes('/pinboard/')){ - return 'liveboard'; - } - /* - * Others are meant to match the exact pageId from SDK - */ - else if(this.currentPath.includes('/answer/')){ - return 'Search'; - } - else if(this.currentPath.includes('/answers')){ - return 'Answers'; - } - else if (this.currentPath.includes('/pinboards')){ - return 'Liveboards'; - } - else if(this.currentPath.includes('/insights')){ - return 'SpotIQ'; - } - else if(this.currentPath.includes('/monitor')){ - return 'Monitor'; - } - else if(this.currentPath.includes('/data')){ - return 'Data'; - } - else { - return 'Home'; - } - }, - // If viewing an Answer or Liveboard, returns the GUID of that object from the parsed URL - get objectId() { - let pathParts = this.currentPath.split('/'); - // '/saved-answer/' is path for Answers (vs. /answer/) - if (this.currentPath.includes('/saved-answer/')){ - answerGUID = pathParts[2]; - return pathParts[2]; - } - // '/pinboard/' is path for saved Liveboards - else if (this.currentPath.includes('/pinboard/')){ - let pathParts = this.currentPath.split('/'); - // May need adjustment for tabbed views to add in current Tab - liveboardGUID = pathParts[2]; - return pathParts[2]; - } - else{ - return null; - } - } - -} ----- - -The following example shows the event listener code updating the global `tsAppState` object above whenever a change is detected within the embedded ThoughtSpot app: - -[source,JavaScript] ----- -embed.on(EmbedEvent.RouteChange, (response) => { - // console.log("RouteChange fires"); - // console.log(response); - // tsAppState object has currentPath property, which allows its other methods to parse out pageId, object type, GUIDs etc. - tsAppState.currentPath = response.data.currentPath; - console.log("TS App page is now: ", tsAppState.currentPath); - - // Update elements within your web application based on the new state of ThoughtSpot (adjust menu selections, etc.) - -}) ----- - - -== Customize Help menu -If you want to include the help menu and link:https://docs.thoughtspot.com/cloud/latest/customize-help[add custom links, window=_blank] to it, ensure that the top navigation bar is visible and `disableProfileAndHelp` is set to `false`. - -By default, the help menu in the embedded view shows the legacy information center controlled using Pendo. To enable the new information center and add custom links, set `enablePendoHelp` to `false`. - -To add custom links to the help menu, use the customization settings available on the **Admin settings** > **Help customization** page. For more information, see link:https://docs.thoughtspot.com/cloud/latest/customize-help[ThoughtSpot Product Documentation]. - -[source,JavaScript] ----- -const embed = new AppEmbed("#embed", { - // Display the top navigation bar - showPrimaryNavbar: true, - // Show the profile and help icons in the navigation bar. - disableProfileAndHelp: false, - // Use the new ThoughtSpot information center for help and support. - enablePendoHelp: false, - // ... other view config attributes -}); ----- - == Additional customization controls -xref:css-customization.adoc[CSS customization] allows overriding default styles in ThoughtSpot application pages. - -//You can also use xref:_theme_builder[Theme Builder] to explore the available CSS variables. +xref:css-customization.adoc[CSS customization] allows overriding default styles in ThoughtSpot application pages. You can also use xref:theme-builder.adoc[Theme Builder] to explore the available CSS variables. If there is a page element you cannot hide using ThoughtSpot or Visual Embed SDK options, you can use a CSS selector to target the element and apply CSS properties such as `display: none`;, `visibility: hidden`;, or `height: 0px` to hide it from the UI. To find the appropriate selector, use your browser’s *Inspect* tool to examine the style element in the *Elements* section of the browser's Developer Tools. @@ -798,7 +401,8 @@ If there is a page element you cannot hide using ThoughtSpot or Visual Embed SDK An example of using direct selectors in a file is available in the link:https://github.com/thoughtspot/custom-css-demo/blob/main/complete.css[complete.css sample, target=_blank] on the ThoughtSpot GitHub repository. -You can also declare direct selectors using the xref:css-customization.adoc#rules[rules] property in the Visual Embed SDK configuration. This is useful for real-time testing, especially in the Visual Embed SDK playground. Note the required format for encoding CSS rules as JavaScript objects. +You can also declare direct selectors using the xref:css-customization.adoc#_css_rules_using_selectors[rules] property in the Visual Embed SDK configuration. This is useful for real-time testing, especially in the Visual Embed SDK playground. Note the required format for encoding CSS rules as JavaScript objects. + == Additional resources diff --git a/modules/ROOT/pages/full-embed.adoc b/modules/ROOT/pages/full-embed.adoc index 47f726e05..9bee3e046 100644 --- a/modules/ROOT/pages/full-embed.adoc +++ b/modules/ROOT/pages/full-embed.adoc @@ -111,7 +111,7 @@ https://{ThoughtSpot-Host}/?embedApp=true&primaryNavHidden=true&profileAndHelpIn ---- //// -The `AppEmbed` component allows you to embed a specific application page or the entire application experience. If you are embedding full experience, you can xref:full-app-customize.adoc#_choose_the_page_to_load[set a specific application page as the default page when the embedded content loads] using the `pageId` or `path` property. +The `AppEmbed` component allows you to embed a specific application page or the entire application experience. If you are embedding full experience, you can xref:set-default-page.adoc[set a specific application page as the default page when the embedded content loads] using the `pageId` or `path` property. == Customize your embed view (Optional) diff --git a/modules/ROOT/pages/get-started-tse.adoc b/modules/ROOT/pages/get-started-tse.adoc index 6ae6aa288..f807366c6 100644 --- a/modules/ROOT/pages/get-started-tse.adoc +++ b/modules/ROOT/pages/get-started-tse.adoc @@ -38,7 +38,6 @@ The following figure illustrates these options and the steps required to get sta image:./images/license-workflow.png[ThoughtSpot Embed getting started workflow,link="./doc-images/images/license-workflow.png", width=auto] //// - [#live-playground] == Try out the embedding workflows, SDK, and APIs diff --git a/modules/ROOT/pages/getting-started.adoc b/modules/ROOT/pages/getting-started.adoc index 7be193d7c..803f62516 100644 --- a/modules/ROOT/pages/getting-started.adoc +++ b/modules/ROOT/pages/getting-started.adoc @@ -14,9 +14,7 @@ Based on your embedding requirements and integration setup, you can use one of t ThoughtSpot Visual Embed SDK offers a JavaScript library that allows you to embed ThoughtSpot components in web pages. This section helps you get started with embedding a ThoughtSpot component in your app. * xref:embed-without-sdk.adoc[iFrame embedding without SDK] -The following sections describe how to embed a ThoughtSpot component using Visual Embed SDK. - -There is also a xref:tse-fundamentals-intro.adoc[hands-on embedding fundamentals tutorial] available. +The following sections describe how to embed a ThoughtSpot component using Visual Embed SDK. For additional guidance refer to the xref:tse-fundamentals-intro.adoc[Embedding fundamentals tutorial]. == Before you begin diff --git a/modules/ROOT/pages/lazy-loading-fullheight.adoc b/modules/ROOT/pages/lazy-loading-fullheight.adoc index c25954828..0d09fafb2 100644 --- a/modules/ROOT/pages/lazy-loading-fullheight.adoc +++ b/modules/ROOT/pages/lazy-loading-fullheight.adoc @@ -18,15 +18,17 @@ The height of the Liveboard container dynamically adjusts to match the height of Only the visualizations currently visible in the viewport are loaded initially. Additional visualizations are fetched incrementally as users scroll the page. This reduces initial load time, minimizes unnecessary data API calls, and provides a smoother, faster experience for large dashboards. By default, the `fullHeight` parameter is set to `false`. -=== Full height with default height setting -In addition to `fullHeight`, the SDK also provides the `defaultHeight` parameter. The value defined for the `defaultHeight` attribute is applied only when `fullHeight` is set to true. When `fullHeight` is true, the embedded container resizes to fit the Liveboard content, and `defaultHeight` sets the minimum height (in pixels) for this container. This ensures that even if the Liveboard is empty or has little content, the container maintains at least the specified minimum height. If `fullHeight` is set to `false`, the `defaultHeight` attribute has no effect. +=== Full height with minimum height setting +In addition to `fullHeight`, the SDK also provides the `minimumHeight` parameter. The value defined for the `minimumHeight` attribute is applied only when `fullHeight` is set to `true`. +If `fullHeight` is `true`, the embedded container resizes according to the Liveboard content . and `minimumHeight` sets the minimum height (in pixels) for this container. +This ensures that even if the Liveboard is empty or has little content, the container maintains at least the specified minimum height. If `fullHeight` is set to `false`, the `minimumHeight` attribute is not applied. [source,JavaScript] ---- const embed = new LiveboardEmbed('#embed', { // other liveboard view config fullHeight: true, - defaultHeight: 600, + minimumHeight: 600, }); ---- diff --git a/modules/ROOT/pages/mobile-embed-android.adoc b/modules/ROOT/pages/mobile-embed-android.adoc index 48737c4ad..153fbc0c3 100644 --- a/modules/ROOT/pages/mobile-embed-android.adoc +++ b/modules/ROOT/pages/mobile-embed-android.adoc @@ -22,7 +22,7 @@ To download the Android Embed SDK from Maven Central to your project and install [source,kotlin] ---- -implementation("io.github.thoughtspot:android-embed-sdk:0.0.1-beta") +implementation("io.github.thoughtspot:android-embed-sdk:1.0.0") ---- * `implementation` + @@ -32,7 +32,7 @@ GitHub reference ID * `android-embed-sdk` + The GitHub repository of the Android Embed SDK package. * `Tag` + -Indicates the version of the SDK to use. Replace this with a specific release tag from the GitHub repository. For example,0.0.1-beta. +Indicates the version of the SDK to use. Replace this with a specific release tag from the GitHub repository. For example,1.0.0. The SDK may require network access to communicate with your ThoughtSpot instance. Ensure your app’s `AndroidManifest.xml` includes the following: diff --git a/modules/ROOT/pages/mobile-embed.adoc b/modules/ROOT/pages/mobile-embed.adoc index fe1dba115..dfcdfa3b1 100644 --- a/modules/ROOT/pages/mobile-embed.adoc +++ b/modules/ROOT/pages/mobile-embed.adoc @@ -8,13 +8,13 @@ ThoughtSpot provides the following SDK libraries to help developers embed ThoughtSpot in their mobile apps: -* xref:mobilesdk-quick-start.adoc[React Native Mobile Embed SDK] [beta betaBackground]^Beta^ + +* xref:mobilesdk-quick-start.adoc[React Native Mobile Embed SDK] + Allows developers to embed ThoughtSpot content in *iOS* and *Android* mobile apps using React Native resources and a single codebase. -* xref:mobile-embed-qs-flutter.adoc[Flutter Embed SDK] [beta betaBackground]^Beta^ + +* xref:mobile-embed-qs-flutter.adoc[Flutter Embed SDK] + Allows embedding ThoughtSpot components in Flutter apps. -* xref:mobile-embed-qs-swift.adoc[Swift Embed SDK] [beta betaBackground]^Beta^ + +* xref:mobile-embed-qs-swift.adoc[Swift Embed SDK] + Allows developers to embed ThoughtSpot content in an iOS native app. -* xref:mobile-embed-android.adoc[Android Embed SDK] [beta betaBackground]^Beta^ + +* xref:mobile-embed-android.adoc[Android Embed SDK] + Allows developers to embed ThoughtSpot content in an Android native app. == Authentication and security settings diff --git a/modules/ROOT/pages/mobile-sdk-changelog.adoc b/modules/ROOT/pages/mobile-sdk-changelog.adoc index 85828986a..c6175c068 100644 --- a/modules/ROOT/pages/mobile-sdk-changelog.adoc +++ b/modules/ROOT/pages/mobile-sdk-changelog.adoc @@ -10,6 +10,10 @@ This changelog lists only the changes introduced in the Mobile Embed SDK. For in == React Native Embed SDK +=== Version 1.0.0, December 2025 + +React Native Embed SDK is Generally Available (GA) with version 1.0.0. + === Version 0.0.2, April 2025 The React Native Embed SDK v0.0.2 [beta betaBackground]^Beta^ provides client libraries to embed a ThoughtSpot Liveboard in native mobile apps for both Android and iOS, using JavaScript and React. @@ -20,6 +24,10 @@ For more information, see xref:mobilesdk-quick-start.adoc[Embed ThoughtSpot usin == Flutter Embed SDK +=== Version 1.0.0, December 2025 + +Flutter Embed SDK is Generally Available (GA) with version 1.0.0. + === Version 0.0.2, June 2025 The Flutter Embed SDK v0.0.1 [beta betaBackground]^Beta^ provides client libraries to embed a ThoughtSpot Liveboard in a Flutter app. @@ -28,6 +36,10 @@ For information about how to install and use the SDK, see xref:mobile-embed-qs-f == Swift Embed SDK +=== Version 1.0.0, December 2025 + +Swift Embed SDK is Generally Available (GA) with version 1.0.0. + === Version 0.0.1, June 2025 The Swift Embed SDK v0.0.1 [beta betaBackground]^Beta^ provides client libraries to embed a ThoughtSpot Liveboard in an iOS native app. @@ -36,6 +48,10 @@ For information about how to install and use the SDK, see xref:mobile-embed-qs-s == Android Embed SDK +=== Version 1.0.0, December 2025 + +Swift Embed SDK is Generally Available (GA) with version 1.0.0. + === Version 0.0.1, June 2025 The Android Embed SDK v0.0.1 [beta betaBackground]^Beta^ provides client libraries to embed a ThoughtSpot Liveboard in an Android native app. diff --git a/modules/ROOT/pages/mobilesdk-quick-start.adoc b/modules/ROOT/pages/mobilesdk-quick-start.adoc index 668d5aee1..68508c237 100644 --- a/modules/ROOT/pages/mobilesdk-quick-start.adoc +++ b/modules/ROOT/pages/mobilesdk-quick-start.adoc @@ -6,7 +6,7 @@ :page-pageid: embed-ts-mobile-react-native :page-description: THe React Native embed SDK allows you to embed ThoughtSpot in your Andriod and iOS mobile apps -ThoughtSpot's React Native Mobile Embed SDK [beta betaBackground]^Beta^ enables developers to embed ThoughtSpot Analytics in their mobile apps. This SDK is designed for the React Native framework to allow developers to build their mobile apps that operate on *iOS* and *Android* platforms, using native resources and a single codebase. +ThoughtSpot's React Native Mobile Embed SDK enables developers to embed ThoughtSpot Analytics in their mobile apps. This SDK is designed for the React Native framework to allow developers to build their mobile apps that operate on *iOS* and *Android* platforms, using native resources and a single codebase. In its initial release, the React Native Embed SDK supports embedding a Liveboard component and customizing the embed view within the mobile app. @@ -46,17 +46,6 @@ npm install @thoughtspot/react-native-embed-sdk After you import, you can define the ThoughtSpot host URL from which you want to embed a Liveboard, authentication type and attributes, and Liveboard ID. -==== File structure in the Expo go sandbox - -A mobile embed project in link:https://snack.expo.dev/@git/github.com/thoughtspot/developer-examples:mobile/react-native-embed-sdk[Expo code sandbox, window=_blank] typically includes the following files: - -* `Auth.ts` - Includes the code required to get authentication token from ThoughtSpot via REST API SDK. -* `App.tsx` - Includes the code for expo app setup. -* `Home.tsx` - Includes the code for the main screen and the form to populate embed view configuration, the `init` function with the `tsHost` and `username`, Liveboard ID, and custom style specification. -* `LiveboardView.tsx` - Defines the interface configuration properties and event interaction settings for the Liveboard embed view. - -You can use similar files in your project setup or an index file for the ThoughtSpot mobile embed code. - === Initialize the SDK and set up authentication Define the following parameters: @@ -69,9 +58,17 @@ Authentication type. In the current version, mobile embedding supports only the [source,TypeScript] ---- init({ - thoughtSpotHost: 'ts-host-url', // Replace with your ThoughtSpot host URL - authType: AuthType.TrustedAuthTokenCookieless, - getAuthToken: async () => "full-auth-token" + thoughtSpotHost: 'ts-host-url', // Replace with your ThoughtSpot host URL + authType: AuthType.TrustedAuthTokenCookieless, + // Callback to fetch a login token from your backend token service + getAuthToken: () => { + // Call your backend endpoint to get a ThoughtSpot login token + return fetch('https://my-backend.app/ts-token') // Replace with your backend token endpoint + .then((response) => response.json()) // Parse JSON response + .then((data) => data.token); // Return the token value + } + // You can also use this code for testing with a custom time token: + // getAuthToken: async () => "full-auth-token" // Replace "full-auth-token" with logic to fetch the token from your backend. For more information, see https://developers.thoughtspot.com/docs/trusted-auth-sdk#_code_examples }); ---- @@ -90,33 +87,14 @@ const TsApp = () => { }; ---- -=== Build your app and preview the embedded content - -* Build your app: -+ -[,bash] ----- -$ npm run build ----- - -* If you are using an Expo project: -+ -. Build your project locally -+ -[,bash] ----- -expo start ----- -. Scan the QR code with the *Expo Go* app to see the app with the embedded content. - -== Customize your embed +=== Customize your embed Just like the Visual Embed SDK for web application embed, the Mobile Embed SDK provides the following customization options: * Control the xref:mobilesdk-quick-start.adoc#_customize_menu_actions[visibility of menu actions in the embedded view] * xref:mobilesdk-quick-start.adoc#_customize_app_interactions[Customize app interactions and workflows] using events. * xref:mobilesdk-quick-start.adoc#_customize_styles[Customize the styles and UI layout] of the embedded view -=== Customize menu actions +==== Customize menu actions By default, the SDK includes a xref:mobile-embed.adoc#actionsMobileEmbed[set of menu actions] in the embedded Liveboard view. @@ -149,7 +127,7 @@ disabledActionReason: "Contact your administrator to enable this feature", //visibleActions: [], /* Do not use if `hiddenActions` is enabled */ ---- -=== Customize app interactions +==== Customize app interactions To customize app interactions and enable custom workflows with xref:embed-events.adoc[Embed and Host events]. The following code shows how to register the `authInit` and `load` embed event and handle response to these events: @@ -230,7 +208,7 @@ const LiveboardEmbedView = () => { }; ---- -=== Customize styles +==== Customize styles You can use ThoughtSpot's xref:css-customization.adoc[CSS customization framework] to customize the text strings, icons, styles and the UI layout of the embedded view. [source,TypeScript] @@ -268,8 +246,26 @@ init({ }); ---- -=== Code samples +=== Build your app and preview the embedded content + +Build your app: + +[,bash] +---- +$ npm run build +---- + +If you are using an Expo project: + +. Build your project locally ++ +[,bash] +---- +expo start +---- +. Scan the QR code with the *Expo Go* app to see the app with the embedded content. +=== Code samples The following example shows the minimum code required to embed a Liveboard successfully in a mobile app: [source,TypeScript] @@ -282,8 +278,8 @@ import { AuthType, init, LiveboardEmbed } from '@thoughtspot/react-native-embed- // Initialize the ThoughtSpot SDK init({ thoughtSpotHost: 'ts-host-url', // Replace with your ThoughtSpot host URL - authType: AuthType.TrustedAuthTokenCookieless, //Using cookieless trusted token authentication - getAuthToken: async () => "full-auth-token", //fetch a valid authentication token + authType: AuthType.TrustedAuthTokenCookieless, //Cookieless trusted token authentication + getAuthToken: async () => "full-auth-token", //fetch a valid authentication token. See }); // Add Liveboard component @@ -390,7 +386,8 @@ const styles = StyleSheet.create({ export default TsApp; ---- -== Test your app + +=== Test your app * Connect your device to the app, authenticate, and load the Liveboard in your mobile app. + @@ -413,10 +410,21 @@ Additionally, you can add a listener for `EmbedEvent.Error` and verify the logs. * In case of rendering issues, adjust the frame size constraints and rerun your app. * Check if your custom CSS specifications are applied correctly. + == Known limitations For information about supported features and known limitations, see xref:mobile-embed.adoc#_known_limitations[Mobile embed limitations]. +== Expo go sandbox +If you are using Expo Go to develop and test your mobile app, you can use the ThoughtSpot mobile embed project in link:https://snack.expo.dev/@git/github.com/thoughtspot/developer-examples:mobile/react-native-embed-sdk[Expo code sandbox, window=_blank]. This project includes the following files: + +* `Auth.ts` - Includes the code required to get authentication token from ThoughtSpot via REST API SDK. +* `App.tsx` - Includes the code for expo app setup. +* `Home.tsx` - Includes the code for the main screen and the form to populate embed view configuration, the `init` function with the `tsHost` and `username`, Liveboard ID, and custom style specification. +* `LiveboardView.tsx` - Defines the interface configuration properties and event interaction settings for the Liveboard embed view. + +You can use similar files in your project setup or an index file for the ThoughtSpot mobile embed code. + == Additional resources * link:https://github.com/thoughtspot/react-native-mobile-sdk[React Native Mobile Embed SDK GitHub Repository, window=_blank] diff --git a/modules/ROOT/pages/onboarding-guide.adoc b/modules/ROOT/pages/onboarding-guide.adoc index 28345f500..42510ac4f 100644 --- a/modules/ROOT/pages/onboarding-guide.adoc +++ b/modules/ROOT/pages/onboarding-guide.adoc @@ -196,7 +196,7 @@ In addition to this quickstart guide, a comprehensive xref:tse-fundamentals-intr To explore the additional capabilities that would provide you more control over your embedded application, see the following pages: -* Leverage ThoughtSpot's AI-powered search and analytics capabilities with xref:embed-spotter.adoc[Spotter] and xref:embed-nls.adoc[Natural Langauge Search interface] . +* Leverage ThoughtSpot's AI-powered search and analytics capabilities with xref:embed-spotter.adoc[Spotter]. * Explore the other embedding options available with the SDK: ** xref:embed-a-viz.adoc[Visualization (a chart or table from a Liveboard)] ** xref:full-embed.adoc[Full ThoughtSpot experience] @@ -207,10 +207,10 @@ To explore the additional capabilities that would provide you more control over * Control the xref:embed-actions.adoc[visibility of menu actions on the embedded page]. * xref:embed-events.adoc[Register events] that your app can listen to and respond with appropriate actions. + Create custom workflows using xref:HostEvent.adoc[Host Events]. -* Whitelabel and customize your ThoughtSpot embedded experience using xref:style-customization.adoc[style customization framework] and xref:css-customization.adoc[custom CSS]. -* For performance optimization, refer to the xref:best-practices.adoc[best practices] recommended by ThoughtSpot. -* Explore the SDK and test your embedding in the xref:https://codesandbox.io/s/big-tse-react-demo-i4g9xi[Code sandbox]. -* To view the SDK files, visit the link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/README.md[Visual Embed SDK GitHub repository, window=_blank]. +* Customize your ThoughtSpot embedded experience using xref:css-customization.adoc[custom CSS]. +* For performance optimization, consider these xref:best-practices.adoc[best practices] recommended by ThoughtSpot. +* Explore the SDK and test your embed in the xref:https://codesandbox.io/s/big-tse-react-demo-i4g9xi[Code sandbox]. +* Use the resources available in the link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/README.md[Visual Embed SDK, window=_blank] and link:https://github.com/thoughtspot/developer-examples[Developer examples] GitHub repositories. == Help and support diff --git a/modules/ROOT/pages/page-navigation.adoc b/modules/ROOT/pages/page-navigation.adoc index 6bf27d87c..5110a2aa4 100644 --- a/modules/ROOT/pages/page-navigation.adoc +++ b/modules/ROOT/pages/page-navigation.adoc @@ -1,17 +1,20 @@ -= Create dynamic menus and navigation += Custom menu and navigation elements :toc: true :page-title: Create dynamic menus and navigation :page-pageid: in-app-navigation :page-description: Build dynamic menus and links to ThoughtSpot content from the embedding application -Rather than embedding the ThoughtSpot application's home or other pages, an embedding app can create dynamic menus or other navigation elements by requesting the content a user has access to via the ThoughtSpot REST API. +If you want to embed specific pages of ThoughtSpot application, you can individual embed components such as `LiveboardEmbed`, `SpotterEmbed`, or `SearchEmved` rather than full application embedding. The full application embed is a relatively fixed and unified application shell, while individual component embeds offer more granular and isolated control. -The embedding app will need xref:customize-links.adoc[routes for pages] that dynamically load the ThoughtSpot embed components. +If you choose to embed individual components with specific pages, your embedding app may require custom menus, navigation elements with xref:customize-links.adoc[routes for pages] and ThoughtSpot REST API integration to programmatically manage interaction and navigation between these pages. -If you are using the ThoughtSpot xref:full-embed.adoc[AppEmbed component] to embed any of the pages from the full ThoughtSpot application, please see the documentation for xref:full-app-customize.adoc[customizing navigation within the full app embed]. +[NOTE] +==== +Mixing full application embedding with other embed components, such as `SearchEmbed`, `SpotterEmbed`, and `LiveboardEmbed`, is not recommended, because each embed method is designed to manage its own navigation, layout, and application state. Combining them can create complicated workflows and make it harder to maintain and customize your embedded application. +==== -Please see the link:https://github.com/thoughtspot/ts_everywhere_resources/blob/master/examples/menus_and_other_navigation_components/rest_api_ui_navigation_v2.html[code example on GitHub, window=_blank] for a complete flow of REST API requests powering various navigation components to be rendered into an embedding application's page. +See the link:https://github.com/thoughtspot/ts_everywhere_resources/blob/master/examples/menus_and_other_navigation_components/rest_api_ui_navigation_v2.html[code example on GitHub repository, window=_blank] for a complete flow of REST API requests powering various navigation components rendered within an embedding application’s page. == Create menus to embedded ThoughtSpot pages Once you have the URL routes defined within the embedding application to load ThoughtSpot content, you can write code that generates links to these ThoughtSpot routes. diff --git a/modules/ROOT/pages/publishing-overview.adoc b/modules/ROOT/pages/publishing-overview.adoc index cb07aea32..b82b057f2 100644 --- a/modules/ROOT/pages/publishing-overview.adoc +++ b/modules/ROOT/pages/publishing-overview.adoc @@ -43,43 +43,24 @@ If a tenant Org requires unique customizations that cannot be handled by variabl |===== == Parameters and variables +ThoughtSpot provides predefined system variables such as `ts_username` and `ts_groups`, which can be used for data security. Additionally, you can configure the following types of variables: -The Connection and Table objects required for building analytics content can vary between data environments. To customize Connection and Table properties for each Org, you can use variables and parameterize object properties. - -You can create the following types of variables using the xref:variables.adoc[variable API] and use them to parameterize Connection or Table properties either through the xref:metadata-parameterization.adoc[metadata parameterization API] or by directly updating the TML for the Connection or Table. This approach ensures that the published metadata objects dynamically adapt to the configuration of each Org without the need for creating a copy of the object. - -[width="100%" cols="5,7"] -[options='header'] -|===== -|Variable type| Description -|`TABLE_MAPPING` a| The **TABLE_MAPPING** variable allow parameterizing the following Table properties: - -* `databaseName` + -* `schemaName` + -* `tableName` + - -|`CONNECTION_PROPERTY` a| - -The `CONNECTION_PROPERTY` variables allow parameterizing connection properties. For example, `accountName`, `warehouse`, `user`, `password`, `role` and so on. -| `CONNECTION_PROPERTY_PER_PRINCIPAL` a| - -This variable supports modifying connection properties per principal (user or user group). This means you can set different values for connection properties depending on the user or group accessing the connection. For example, `warehouse`, `role`, `user`, `password`. - -The `CONNECTION_PROPERTY_PER_PRINCIPAL` variable does not allow parameterizing core connection properties such as `accountName`, `host`, or `port`. These properties must be derived from the connection configuration and cannot be set per user or user group. - -[NOTE] -This feature is disabled by default. To enable this option, contact ThoughtSpot Support. -|| - -//`FORMULA_VARIABLE` a| `FORMULA_VARIABLE` refers can be used to create and manage formula variables. -| -|===== +* Table variables + +Can be used for table mapping properties such as schema name, database name, table name. +* Connection property variables + +Can be used for data connection properties such as `accountName`, `warehouse`, `user`, `password`, `role` and so on. +* Connection and principal mapping variables + +Can be used for modifying connection properties for a specific principal object such as a user or user group. This means you can set different values for connection properties, such as `warehouse`, `role`, `user`, and `password`,depending on the user or group accessing the connection. +* Formula variables + +Can be used in formulas when implementing Row Level Security (RLS) rules. Formula variables enable dynamic, context-aware security and personalization in data access. The following figure illustrates variable substitution in Connections and Tables: [.widthAuto] image::./images/variables.png[Variables] +For more information, see xref:variables.adoc[Variables] and xref:metadata-parameterization.adoc[Parameterize metadata objects]. + == Version control For the objects in the Primary Org, you can use the xref:git_integration_overview[Git integration] APIs for development, change tracking, and version control. However, Git integration for the objects published in the target Orgs is not supported. diff --git a/modules/ROOT/pages/query-stats-action-ref b/modules/ROOT/pages/query-stats-action-ref deleted file mode 100644 index a1c80c4fa..000000000 --- a/modules/ROOT/pages/query-stats-action-ref +++ /dev/null @@ -1,124 +0,0 @@ -== User Action to Query Task Mapping - -This document provides a comprehensive mapping between user actions in the ThoughtSpot application and the corresponding tasks that appear in query stats files. - -=== Overview - -Query stats in ThoughtSpot track different types of queries executed by the system, categorized by "Query Triggers" (also known as tasks). These triggers help identify what user action or system process initiated a particular query, which is crucial for billing, performance analysis, and usage tracking. - -=== Query Stats Fields - -Each query in the stats file contains relevant fields like: - -* *query_trigger*: The enum value indicating what triggered the query -* *context*: Additional context information (often empty for datamanager queries) -* *user_id*: GUID of the user who initiated the action -* *user_name*: Display name of the user -* *connection_name*: Data source connection used -* *query_string*: The actual SQL query executed -== TOC - -. ?tab=t.0#heading=h.z78te7szg375[User Action to Query Stats Mappings] -. ?tab=t.0#heading=h.2wim8q5ospox[Exceptions] -=== User Action to Query Stats Mappings - -==== 📊 Answer/Search Related Actions - -|=== -|User Action|Query Trigger|Description - -|Edit an existing saved answer|ANSWER_EDIT|User modifies a saved answer, triggering query to show updated results -|View/Load a saved answer|ANSWER_VIEW|User opens an existing saved answer -|Perform a new search|SEARCH_DATA|User types a search query in the search bar -|Add filter to answer/search|GET_FILTER_VALUES|User adds or modifies filters, requiring filter value lookup. It will have +ANSWER_EDIT +also in the query stats file as the answer is also modified. -|=== - -==== 📋 Liveboard (Pinboard) Related Actions - -|=== -|User Action|Query Trigger|Description - -|Edit a liveboard|LIVEBOARD_EDIT|User modifies a liveboard (adding/removing visualizations, filters, etc.) -|View/Load a liveboard|LIVEBOARD_VIEW|User opens an existing liveboard -|=== - -==== 🔍 Data Exploration Actions - -|=== -|User Action|Query Trigger|Description - -|Click "Explore" on a visualization|EXPLORE|User explores underlying data from a chart/table -|View underlying data|UNDERLYING_DATA|User clicks "View underlying data" option -|Drill down on data points|DRILL_DOWN|User drills down from context menu or chart elements -|=== - -==== 💾 Export/Download Actions - -|=== -|User Action|Query Trigger|Description - -|Download data (CSV, Excel, PDF)|DOWNLOAD|User exports data in various formats -|=== - -==== 🤖 SpotIQ and Analytics Actions - -|=== -|User Action|Query Trigger|Description - -|Run SpotIQ auto analysis|SPOTIQ_AUTO_ANALYZE|User initiates automated insights analysis -|Run SpotIQ change analysis|SPOTIQ_CHANGE_ANALYSIS|User analyzes changes in data over time -|Set up KPI monitoring|KPI_MONITOR|User creates or views KPI monitors -|=== -==== 📱 Mobile and API Access - -|=== -|User Action|Query Trigger|Description - -|Access via mobile app|MOBILE|User performs actions through ThoughtSpot mobile app -|Access via REST API|APIS|Programmatic access via ThoughtSpot APIs -|=== -==== 📊 Others - -|=== -|User Action|Query Trigger|Description - -|Scheduled liveboard execution|SCHEDULED_PINBOARDS|Automated execution of scheduled liveboards -|ThoughtSpot Sync operations|TS_SYNC|Data synchronization triggered by user through Seekwell -|Report book generation|REPORTBOOK|User generates report books -|Use Cortex features|CORTEX|User interacts with AI-powered features -|Use Spotter search|SPOTTER|User performs natural language searches -|Custom calendar|CUSTOM_CALENDAR|custom calendar -|=== - -|=== -|System Process|Query Trigger|Description - -|Connection setup/testing|CDW_CONNECTION|Connection Creation -|Sample data|DATA_WORKSPACE_SAMPLE|samples data for tables -|SQL Editor operations|SQL_EDITOR|SQL editor -|dbt integration|DBT|dbt-related system queries -|Search indexing|SAGE_INDEXING|System builds search indexes -|Data sampling for search|SAGE_SAMPLING|System samples data for search optimization -|SpotApps operations|SPOT_APPS|SpotApps operations -|Row count statistics|ROW_COUNT_STATS|System collects table statistics -|Caffeine operations|CAFFEINE|Internal caching system queries -|Seed questions|SEED_QUESTIONS|System-generated example questions -|Unknown/Default|UNKNOWN|Queries that don't match other categories -|=== - -== 💾 Exceptions - -These are some cases where the Query Trigger differs from the intuitive expectation - -|=== -|User Action|Query Trigger|Description - -|LIVEBOARD DOWNLOAD PDF|LIVEBOARD_VIEW|User downloads liveboard -|SCHEDULED PINBOARD WITH PDF TYPE|+LIVEBOARD_VIEW+|User schedules liveboard with pdf type -|GET_FILTER_VALUES ON LIVEBOARD|+LIVEBOARD_EDIT+|User applies filter on liveboard -|GET_FILTER_VALUES ON ANSWER|+ANSWER_EDIT+|User applies filter on liveboard -|=== - - - - diff --git a/modules/ROOT/pages/rest-api-java-sdk.adoc b/modules/ROOT/pages/rest-api-java-sdk.adoc index 484a255ba..fc8e94be3 100644 --- a/modules/ROOT/pages/rest-api-java-sdk.adoc +++ b/modules/ROOT/pages/rest-api-java-sdk.adoc @@ -281,6 +281,7 @@ Note the recommendation of Java SDK: [options='header'] |==== |ThoughtSpot release version|Supported SDK version +a|ThoughtSpot Cloud: 10.15.0.cl | v2.20.0 or later a|ThoughtSpot Cloud: 10.14.0.cl | v2.19.0 or later a|ThoughtSpot Cloud: 10.13.0.cl | v2.18.0 or later a|ThoughtSpot Cloud: 10.12.0.cl | v2.17.0 or later diff --git a/modules/ROOT/pages/rest-api-sdk-typescript.adoc b/modules/ROOT/pages/rest-api-sdk-typescript.adoc index c721ac791..ce057f24b 100644 --- a/modules/ROOT/pages/rest-api-sdk-typescript.adoc +++ b/modules/ROOT/pages/rest-api-sdk-typescript.adoc @@ -203,6 +203,7 @@ Note the version recommendations for your ThoughtSpot instances: [options='header'] |==== |ThoughtSpot release version|Recommended SDK version +a|ThoughtSpot Cloud: 10.15.0.cl | v2.20.0 or later a|ThoughtSpot Cloud: 10.14.0.cl | v2.19.0 or later a|ThoughtSpot Cloud: 10.13.0.cl | v2.18.0 or later a|ThoughtSpot Cloud: 10.12.0.cl | v2.17.0 or later diff --git a/modules/ROOT/pages/rest-api-v2-reference.adoc b/modules/ROOT/pages/rest-api-v2-reference.adoc index 486b90876..ab61008f9 100644 --- a/modules/ROOT/pages/rest-api-v2-reference.adoc +++ b/modules/ROOT/pages/rest-api-v2-reference.adoc @@ -55,10 +55,24 @@ a|`POST /api/rest/2.0/ai/answer/create` + Generates an Answer for a Natural Language Search query. |ThoughtSpot Cloud: __10.4.0.cl or later__ + ThoughtSpot Software: __Not available__ a| +++Try it out+++ + +a|`POST /api/rest/2.0/ai/agent/{conversation_identifier}/converse` + +Allows sending a query to an ongoing conversation session with Spotter agent and generate response. +|ThoughtSpot Cloud: __10.15.0.cl or later__ + +ThoughtSpot Software: __Not available__ a| +++Try it out+++ + +a|`POST /api/rest/2.0/ai/instructions/set` + +Sets NL instructions on a data model. +|ThoughtSpot Cloud: __10.15.0.cl or later__ + +ThoughtSpot Software: __Not available__ a| +++Try it out+++ + +a|`POST /api/rest/2.0/ai/instructions/get` + +Retrieves NL instructions from a data model. +|ThoughtSpot Cloud: __10.15.0.cl or later__ + +ThoughtSpot Software: __Not available__ a| +++Try it out+++ |===== -- - == Authentication [div boxAuto] diff --git a/modules/ROOT/pages/rest-apiv1-changelog.adoc b/modules/ROOT/pages/rest-apiv1-changelog.adoc index 864811c14..9b90bf3c3 100644 --- a/modules/ROOT/pages/rest-apiv1-changelog.adoc +++ b/modules/ROOT/pages/rest-apiv1-changelog.adoc @@ -8,6 +8,8 @@ This changelog lists only the changes introduced in REST API v1. For information about new embedding features and enhancements, see xref:whats-new.adoc[What's New]. + + == Version 10.4.0.cl, November 2024 TML import:: diff --git a/modules/ROOT/pages/rest-apiv2-changelog.adoc b/modules/ROOT/pages/rest-apiv2-changelog.adoc index a3499af91..b6e1c54e0 100644 --- a/modules/ROOT/pages/rest-apiv2-changelog.adoc +++ b/modules/ROOT/pages/rest-apiv2-changelog.adoc @@ -8,8 +8,31 @@ This changelog lists the features and enhancements introduced in REST API v2.0. For information about new features and enhancements available for embedded analytics, see xref:whats-new.adoc[What's New]. -== Version 10.15.0.cl, January 2026 -For information about the new features and enhancements introduced in this release, see the link:https://developers.thoughtspot.com/docs/10.15.0.cl?pageid=rest-v2-changelog[10.15.0.cl Developer Documentation]. +== Version 10.15.0.cl, December 2025 + +=== Spotter APIs + +This release introduces the following Spotter APIs + +* `POST /api/rest/2.0/ai/instructions/set` + +Allows configuring natural language (NL) instructions on a Model to coach the Spotter on how to interpret queries, handle data nuances, and improve responses. +* `POST /api/rest/2.0/ai/instructions/get` + +Gets NL instructions that are currently assigned to a Model. +* `POST /api/rest/2.0/ai/data-source-suggestions` + +Retrieves a list of recommended data sources based on the specified query string. + +For more information, see xref:spotter-apis.adoc[Spotter AI APIs]. + +=== Variable APIs + +You can now create formula variables using the `/api/rest/2.0/template/variables/create` API endpoint, and assign values and scope to these variables using the `/api/rest/2.0/template/variables/update-values` API endpoint. + +For more information, see xref:variables.adoc[Configure variables]. + +=== ABAC tokens with formula variable attributes +The `/api/rest/2.0/auth/token/custom` API endpoint allows creating a token request with formula variables for ABAC via RLS implementation. + +For more information, see xref:abac-user-parameters.adoc[ABAC via tokens]. == Version 10.14.0.cl, November 2025 diff --git a/modules/ROOT/pages/rls-rules.adoc b/modules/ROOT/pages/rls-rules.adoc index 678ba17d6..60bcc32a1 100644 --- a/modules/ROOT/pages/rls-rules.adoc +++ b/modules/ROOT/pages/rls-rules.adoc @@ -6,26 +6,35 @@ :page-pageid: rls-rules :page-description: RLS rules define data security directly on ThoughtSpot table objects -ThoughtSpot link:https://docs.thoughtspot.com/cloud/latest/security-rls[Row Level Security Rules, window=_blank] define how the user's username or the names of the groups they belong into WHERE clauses on the SQL queries generated. +In ThoughtSpot, the link:https://docs.thoughtspot.com/cloud/latest/security-rls[Row Level Security Rules, window=_blank] are applied on Tables to restrict access to specific rows of data based on user or user group context. These rules ensure users only see the data they are permitted to access. -The two basic patterns for RLS Rules are *direct RLS rules* that reference a column on the table the rule is placed on and *ACL table rules* that reference a separate table of entitlements within the same database. +== Overview -If neither of these patterns is easily implemented, please consider the xref:abac-user-parameters.adoc[ABAC via tokens] method of RLS, available starting in ThoughtSpot 9.11. +RLS rules are link:https://docs.thoughtspot.com/cloud/latest/security-rls-implement[defined within ThoughtSpot, target=_blank] on Table objects, and automatically extend to all Models, saved answers, and Liveboards based on that Table. -== RLS rules overview -*RLS rules* are link:https://docs.thoughtspot.com/cloud/latest/security-rls-implement[defined within ThoughtSpot, target=_blank] on table objects, and automatically extend to all Models, saved answers, and Liveboards based on that table, every time. +The two basic patterns for RLS Rules are: -RLS rules are defined using either the *ts_username* variable or *ts_groups* variable. The RLS rules translate into WHERE clauses in any SQL query generated from that table object, with the variables expanding into the details of the signed-in user. *ts_groups* turns into the set of *group name* properties of the ThoughtSpot groups the user belongs to. +* xref:rls-rules.adoc#_direct_rls_rules[Direct RLS rules] that reference a column on the table the rule is placed on. +* xref:rls-rules.adoc#_acl_table_rules[Access control list (ACL) table rules] that reference a separate table of entitlements within the same database. -The `ts_username` special value translates to `t1.fieldName = 'users-username'` within the generated queries. +If neither of these patterns can be implemented or if you want a fine-grained access control with dynamic attributes, consider implementing xref:abac_rls-variables.adoc[ABAC via RLS rules with variables]. -The `ts_groups` special value translates to `t1.fieldName IN ('group a', 'group b', ...)`. The name property of every ThoughtSpot group that a user belongs to will be added to the list after the `IN`. +=== System variables in RLS rules +Rules are typically written using the system variables such as *ts_username* and *ts_groups* to specify how the user's username or group memberships are translated into WHERE clauses in the SQL queries generated from the Table. -Both *ts_username* and *ts_groups* are string values, so the RLS rule may require using casting functions on the columns within the database if those columns are not also string types. The xref:abac-user-parameters.adoc[ABAC via tokens] method allows for specifying the data type of the attributes sent in. +* *ts_username* - To apply rules to the signed-in user. + +The *ts_username* special value translates to `t1.fieldName = 'users-username'` within the generated queries. The variable is replaced with the signed-in user's username. +* *ts_groups* - To apply rules to the groups that the user belongs to. The `ts_groups` special value translates to `t1.fieldName IN ('group a', 'group b', ...)`. The name property of every ThoughtSpot group that a user belongs to will be added to the list after the `IN`. The variable is replaced with the list of group names the user belongs to, ensuring that only permitted rows are returned in query results. -The username or ThoughtSpot group name property must be an exact match to the values within the database column. ThoughtSpot usernames and group names cannot be changed once they have been created, but their values can be any valid string. +The username or ThoughtSpot group name property must be an exact match to the values within the database column. ThoughtSpot usernames and group names cannot be changed once they have been created, but their values can be any valid string. To programmatically create and assign the appropriate groups to be used within RLS rules, you can use the user and group creation REST APIs. -The user and group creation REST APIs can be utilized to programmatically create and assign the appropriate groups to be used within RLS rules +For more information about the system variables and how RLS rules are applied using these variables, see the link:https://docs.thoughtspot.com/cloud/latest/security-rls-concept#_examples_of_rls_rules[RLS rules documentation, window=_blank]. + +=== Supported data types + +Both *ts_username* and *ts_groups* are string values, so the RLS rule may require using casting functions on the columns within the database if those columns are not also string types. + +To implement rules for different data types and attributes, you can use link:https://docs.thoughtspot.com/cloud/latest/rls-variables-reference[custom variables]. === RLS groups Many different features tie into ThoughtSpot groups: access control, roles, permissions, and row-level security. @@ -35,9 +44,9 @@ Because the `name` property of the ThoughtSpot group is used within the generate You also must consider that the names of any other ThoughtSpot groups, used for access control or granting roles and permissions, *must not* have names that *accidentally match* with values in the database columns. == Direct RLS rules -A direct RLS rule directly filters on column within the table that the RLS rule is defined on. +A direct RLS rule directly filters on columns within the Table on which the RLS rule is defined.. -A common RLS rule type pattern for a multi-tenanted data warehouse involves each user belonging to a *ThoughtSpot group* match the values in a 'customer name' or 'tenant name' column on every table. Alternatively, *username* can be used if the data is stored at an individual rather than tenant level. +A common RLS rule type pattern for a multi-tenanted data warehouse involves each user belonging to a *ThoughtSpot group* matches the values in a 'customer name' or 'tenant name' column on every table. Alternatively, *username* can be used if the data is stored at an individual rather than the tenant level. === Direct RLS rule example Imagine a table in ThoughtSpot that looks like: @@ -65,9 +74,11 @@ Imagine a table in ThoughtSpot that looks like: A direct RLS rule would look like `customer_id = ts_groups`. -If the signed-in user belongs to a ThoughtSpot group named `cust_1`, ThoughtSpot will add a filtering clause to any SQL generated on this table like: +If the signed-in user belongs to a ThoughtSpot group named `cust_1`, ThoughtSpot will add a filtering clause to any SQL generated on this table as shown here: -`WHERE t1.customer_id IN ('cust_1', ...)` +---- +WHERE t1.customer_id IN ('cust_1', ...) +---- This will filter the table down to the following rows, after which all other aggregations and other parts of the query will be processed by the data warehouse: @@ -86,22 +97,22 @@ This will filter the table down to the following rows, after which all other agg |=== -== Access control list (ACL) table rules +== ACL table rules Rules that reference a separate Access Control List (ACL) table of 'entitlements' for that user or the groups they belong to, which is then JOINed to other tables. RLS rules on one table object can reference other table objects that are joined within a given connection. This allows a more complex RLS pattern to be used, where an "access control list" or "entitlements" table (*ACL table*) exists in the database, with a JOIN in ThoughtSpot to the fact or dimension tables. -The RLS rule is defined on the fact or dimension table, but will reference the ACL table, typically by comparing *ts_username* variable against a column in the ACL table, which filters the ACL table's rows to only those defined for the user. The JOIN defined between the ACL table and the other tables then reduces the rows to only those that match the remaining rows in the ACL table. +The RLS rule is defined on the fact or dimension table, but will reference the ACL table, typically by comparing the *ts_username* variable against a column in the ACL table, which filters the ACL table's rows to only those defined for the user. The JOIN defined between the ACL table and the other tables then reduces the rows to only those that match the remaining rows in the ACL table. ACL table pattern is two-step logically: -1. The ACL table of entitlements filters down to just the appropriate rows for the user, by comparing the username or the user's group membership to one column of the ACL table -2. Any number of the columns in the now reduced ACL table are INNER JOINed to other tables within the data model. This serves to filter the rows on the other tables to only those that match the rows in the ACL table for the user +1. The ACL table of entitlements filters down to just the appropriate rows for the user by comparing the username or the user's group membership to one column of the ACL table. +2. Any number of the columns in the now reduced ACL table are INNER JOINed to other tables within the data model. This serves to filter the rows on the other tables to only those that match the rows in the ACL table for the user. The description above is entirely logical - each data warehouse will process the query in its own optimized way. === ACL table example -Let's take our direct RLS table example from above. What if each user might be filtered on any combination of the three columns? You could do this directly with ThoughtSpot groups but you would end up with a large number of groups to manage and assign appropriately: +Let's take our direct RLS table example from above. What if each user might be filtered on any combination of the three columns? You could do this directly with ThoughtSpot groups. However, you would end up with a large number of groups to manage and assign appropriately: [cols="1,1,1"] |=== @@ -164,6 +175,7 @@ This will cause queries that reference the fact or dimension to include the INNE In the ACL table pattern, the embedding web application must define a process for updating the ACL table in the data warehouse with the correct entitlement rows for each user. This is a separate process that does not involve ThoughtSpot, although it can be combined with the xref:trusted-authentication#authenticator-service-back-end[authenticator service] used for Trusted Authentication. == Additional resources -A link:https://community.thoughtspot.com/customers/s/article/How-to-secure-your-data-in-ThoughtSpot[comprehensive examples and best practices guide to RLS, window=_blank] data model setup is available on the ThoughtSpot Community. - +See the link:https://community.thoughtspot.com/customers/s/article/How-to-secure-your-data-in-ThoughtSpot[RLS best practices guide, window=_blank] for a comprehensive guide with RLS examples. A data model setup is also available on the ThoughtSpot Community. + + diff --git a/modules/ROOT/pages/roles.adoc b/modules/ROOT/pages/roles.adoc index e503f86a2..68a8727f7 100644 --- a/modules/ROOT/pages/roles.adoc +++ b/modules/ROOT/pages/roles.adoc @@ -42,23 +42,25 @@ For a complete list of Roles and privileges, see xref:roles.adoc#_role_privilege == Role assignment Administrators can create a Role with a specific set of privileges and assign this Role to a group via UI or REST API calls. Users inherit Role privileges from the groups to which they are assigned. To assign a Role to a user, administrators must assign the Role to a group and ensure that the intended users are added to this group. -The following figure illustrates the Role and Group assignment in ThoughtSpot: - -[.widthAuto] -image::./images/role-group.png[Roles] - [NOTE] ==== Roles are unique to an Org and can be created only within the context of an Org. ==== +For more information about Role and Group assignment, see link:https://docs.thoughtspot.com/cloud/latest/rbac#_data_download_control_privileges[ThoughtSpot Product Documentation]. +//// +[.widthAuto] +image::./images/role-group.png[Roles] +//// + + == Role categories and privileges The RBAC feature groups access privileges under specific categories for granular access control and ease of use. You can create a role with a specific privilege from any role category and assign it to a group. [IMPORTANT] ==== -All ThoughtSpot instances include a *Super Admin* role with `ADMINISTRATION` privilege by default. The Super admin user can access and modify users, Groups, and Roles, and has all other privileges. If the Orgs feature is enabled on your instance, the `Super admin` user can create and manage Orgs and configure multi-tenancy. The `Super admin` role cannot be assigned, modified, or deleted. +All ThoughtSpot instances include a *Super Admin* role that provides cluster-wide administration privileges by default. The Super admin user can access all data, create and manage users, Orgs, Groups, and Roles. This privilege should only be granted in exceptional circumstances. ==== === Admin control @@ -90,15 +92,16 @@ UI: *Can enable or disable trusted authentication* | Allows users with super adm UI: *Can manage tags* | Allows users to create and edit tags. |Version control with Git| API: `CAN_SETUP_VERSION_CONTROL` + UI: *Can set up version control* | Allows users to enable version control for a ThoughtSpot instance or Org. -|Analyst studio| API: `CAN_MANAGE_ANALYST_STUDIO` + -UI: *Can manage Analyst Studio* a| Allows users to manage Analyst Studio for ThoughtSpot users. + +.2+|Analyst studio | API: `CAN_MANAGE_ANALYST_STUDIO` + +UI: *Can manage Analyst Studio* a| Allows users to manage Analyst Studio for ThoughtSpot users. +| API: `CAN_ACCESS_ANALYST_STUDIO` + +UI: *Can use Analyst Studio* a| Allows access to Analyst Studio features. + +|=== [NOTE] ==== -The link:https://docs.thoughtspot.com/cloud/latest/analyst-studio-getting-started[Analyst Studio, window=_blank] option is not available in the ThoughtSpot embedded application. +link:https://docs.thoughtspot.com/cloud/latest/analyst-studio-getting-started[Analyst Studio, window=_blank] is not supported in ThoughtSpot embedded instances. ==== -|=== - === Application control @@ -123,25 +126,20 @@ UI: *Has developer privilege* a| Allows users to access the following features UI: *Can schedule for others* |Allows users to schedule, edit, and delete Liveboard jobs. |ThoughtSpot Sync|API: `SYNCMANAGEMENT` + UI: *Can manage sync settings* | Allows setting up secure pipelines to external business apps and sync data using ThoughtSpot Sync. -|ThoughtSpot Sage|API: `PREVIEW_THOUGHTSPOT_SAGE` + -UI: *Can use sage* | Allows access to ThoughtSpot Sage features such as AI-assisted search and AI-generated answers. +|ThoughtSpot Spotter|API: `PREVIEW_THOUGHTSPOT_SAGE` + +UI: *Can use Spotter* | Allows access to ThoughtSpot Spotter and natural language query and answer generation. |Catalog management|API: `CAN_CREATE_CATALOG` + UI: *Can manage catalog*| Allows users to create, edit, and manage a link:https://docs.thoughtspot.com/cloud/latest/catalog-integration[data connection to Alation, window=_blank], and import metadata. -|R Analysis|API: `RANALYSIS` + -UI: *Can invoke custom R analysis* |Allows invoking R scripts to explore search answers and share custom scripts. + +//|R Analysis|API: `RANALYSIS` + +//UI: *Can invoke custom R analysis* |Allows invoking R scripts to explore search answers and share custom scripts. |Liveboard verification|API: `LIVEBOARD_VERIFIER` + UI: *Can verify Liveboards* | Allows Liveboard users to verify Liveboard access requests and mark a Liveboard as verified. +|Webhook management| API: `CAN_MANAGE_WEBHOOKS` + +UI: *Can manage webhooks* | Allows users to xref:webhooks.adoc#[create and manage a webhook]. |Version control with Git | API: `CAN_MANAGE_VERSION_CONTROL` + UI: *Can toggle version control for objects* | Allows users to enable version control on a Liveboard or Answer. -|Analyst studio| API: `CAN_ACCESS_ANALYST_STUDIO` + -UI: *Can use Analyst Studio* a| Allows access to Analyst Studio features. + - -[NOTE] -==== -The link:https://docs.thoughtspot.com/cloud/latest/analyst-studio-getting-started[Analyst Studio, window=_blank] option is not available in the ThoughtSpot embedded application. -==== - |=== @@ -171,12 +169,26 @@ UI: *Can manage custom calendars* | Allows creating, editing, and deleting link: UI: *Can create/edit Connections*| Allows creating, editing, and managing link:https://docs.thoughtspot.com/cloud/latest/connections[connections to external data warehouses, window=_blank]. |Data objects|API: `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` + UI: *Can manage data models* |Allows users to create, edit, delete, and manage Models, Tables, and Views. +|Custom variables| API: `CAN_MANAGE_VARIABLES` + +UI: *Can manage variables* | Allows users to xref:variables.adoc[create and manage custom variables]. |=== === Data download control The `DATADOWNLOADING` (**Can download Data**) Role privilege allows users to download data from objects such as Liveboards and Answers. +[width="100%" cols="2,4,4"] +[options='header'] +|=== +|Role type|Privilege|Description +|Data download | API: `DATADOWNLOADING` + +UI: **Can download Data**| Allows users to download data from objects such as Liveboards and Answers. +|Download visuals |API: `CAN_DOWNLOAD_VISUALS` + +UI: *Can download visuals* |Allows users to download data in the PDF or PNG file format. This is an early access feature and is not enabled by default on ThoughtSpot instances. +|Data export |API: `CAN_DOWNLOAD_DETAILED_DATA` + +UI: *Can download detailed data* | Allows users to export data in XLSX/CSV format. This is an early access feature and is not enabled by default on ThoughtSpot instances. +|=== + == How to create and assign Roles You can create and assign Roles to a group on the link:https://docs.thoughtspot.com/cloud/latest/rbac[Admin page of the UI, window=_blank] or by using the REST API v1 and v2 endpoints. diff --git a/modules/ROOT/pages/runtime-filters.adoc b/modules/ROOT/pages/runtime-filters.adoc index a9faf922c..e04394214 100644 --- a/modules/ROOT/pages/runtime-filters.adoc +++ b/modules/ROOT/pages/runtime-filters.adoc @@ -25,6 +25,7 @@ Pass filter properties as query parameters in the URL. * The runtime filters operation returns an error if the URL exceeds 2000 characters. * Attempting to override existing filter values with runtime filters while exporting a Liveboard will result in an error. * If a Model has a column alias, do not use the alias in runtime filters. Instead, use the underlying base column name. +* Runtime filters is not a security feature. To implement data security rules in ThoughtSpot, please use xref:rls-rules.adoc[Row Level Security (RLS rules)]. ==== === Runtime filter properties diff --git a/modules/ROOT/pages/runtime-parameters.adoc b/modules/ROOT/pages/runtime-parameters.adoc index 2ea1a9a03..ca32d4642 100644 --- a/modules/ROOT/pages/runtime-parameters.adoc +++ b/modules/ROOT/pages/runtime-parameters.adoc @@ -8,6 +8,11 @@ Parameters in ThoughtSpot are typically used for "what-if" analysis, scenario planning, or to personalize data views without modifying the underlying data object. You can link:https://docs.thoughtspot.com/cloud/latest/parameters-create[create Parameters^] in a Model and integrate them into formulas, filters, data queries, and Liveboards. You can also link:https://docs.thoughtspot.com/cloud/latest/parameters-use[use Parameters^] within formulas when querying your data via Search, Liveboards, Answers, or Spotter sessions. +[NOTE] +==== +Runtime Parameters is not a security feature. To implement data security rules in ThoughtSpot, please use xref:rls-rules.adoc[Row Level Security (RLS rules)]. +==== + == Overview Runtime parameters in ThoughtSpot are dynamic values that can be set or overridden at the time of accessing a Liveboard, Answer, visualization, or Spotter session. diff --git a/modules/ROOT/pages/set-default-page.adoc b/modules/ROOT/pages/set-default-page.adoc new file mode 100644 index 000000000..e6f30bb98 --- /dev/null +++ b/modules/ROOT/pages/set-default-page.adoc @@ -0,0 +1,239 @@ += Customize default page and navigation path +:toc: true +:toclevels: 2 + +:page-title: Customize the default page and navigation path +:page-pageid: set-default-page +:page-description: Set a page as the default embedded view + +In full application embedding, the home page is set as the default landing page when the embedded app loads. +To change the default settings, you can use either the `pageId` or `path` parameter in the Visual Embed SDK. If both `path` and `pageId` properties are specified, the `path` definition takes precedence. + +== Set the default page using pageId +The `pageId` parameter in `AppEmbed` sets the default ThoughtSpot page to load using a value from the xref:Page.adoc[Page enumeration]. Valid values for this attribute are: + +* `Page.Home` for the ThoughtSpot *Home* page + +* `Page.Search` for the ThoughtSpot *Search* page + +* `Page.Answers` for the *Answers* page + +* `Page.Liveboards` for the *Liveboards* page + +* `Page.Data` for the *Data* page + +* `Page.SpotIQ` for the *SpotIQ* analyses page + +=== Example + +[source,javascript] +---- +//Import Page enumeration +import { AppEmbed, Page } from '@thoughtspot/visual-embed-sdk'; + +const embed = new AppEmbed("#embed", { + // Set the initial page + pageId: Page.Liveboards, + //... other embed view configuration attributes +}); +---- + +== Set the default page via path +The `path` parameter allows setting the default ThoughtSpot application page using a URL path. Valid strings for the `path` parameter are: + +[width="100%", cols="3,6,6"] +[options='header'] +|===== +|Page| Classic experience | V2 and v3 experience +|Home| `path: "home"` | `path: "home"` + +`path: "insights/home"` +|Insights| `path: "home"` | `path: "home"` + +`path: "insights/home"` +|Liveboards list page| `path: "pinboards"`| `path: "pinboards"` + +`path: "home/liveboards"` + +`path: "insights/liveboards"` +|Liveboard page| `path: "pinboard/"`| `path: "pinboard/"` +|Answers list page| `path: "answers"`| `path: "answers"` + +`path: "home/answers"` + +`path: "insights/answers"` +|Saved Answer page| `path: "saved-answer/"` |`path: "saved-answer/"` +|Spotter| `path: "conv-assist"` |`path: "conv-assist"` + +`path: "insights/conv-assist"` +|Search data| `path: "answer"` | `path: "answer" + +`path: "insights/answer"` +|Data| `path: "data/tables/"`| `path: "data/tables/"` +|Model, tables, views|`path: "data/tables/"`| `path: "data/tables/"` +|SpotIQ analysis list page|`path: "insights"`| `path: "insights"` + +`path: "insights/spotiq-analysis"` +|SpotIQ analysis page | `path: "insight/"`| `path: "insight/"` +|Monitor| `path: "monitor"` a| Supported settings include: + +* `path: "monitor"` + +* `path: "home/monitor-alerts"` + +* `path: "insights/monitor-alerts"` +|===== + +=== Example + +[source,javascript] +---- +const embed = new AppEmbed("#embed", { + // Set the initial page + path: 'pinboard/96a1cf0b-a159-4cc8-8af4-1a297c492ff9', + //... other embed view configuration attributes +}); +---- + +== Customize navigation between pages within the app +To programmatically control navigation between the pages within the embedded app, you can use the `navigateToPage()` method and custom actions. + +=== Using navigateToPage() + +The `AppEmbed` object includes a `navigateToPage()` method that can switch the currently loaded page in the embedded view. + +The `navigateToPage()` method accepts the same string values that work for `pageId` or `path` attributes. If you are customizing the menu, the new navigation menu should call `navigateToPage` for the various pages you want to provide access to: + +[source,JavaScript] +---- +// Navigate to the Answers page +embed.navigateToPage(Page.Answers); + +// Navigate to the Answers page without reloading the iframe (noReload = true) +embed.navigateToPage(Page.Answers, true); +---- + +=== Using navigateToPage() with a custom action +To add a custom action for in-app navigation, create a xref:custom-actions-callback.adoc[callback custom action] and define the navigation path. + +In this example, the **view-report ** action on a Liveboard page calls the `navigateTo` method to open a specific Answer page when the user clicks the **View report** button. + +[source,JavaScript] +---- +// Listen for the CustomAction event triggered from the embedded ThoughtSpot app +appEmbed.on(EmbedEvent.CustomAction, async (payload: any) => { + // Check if the custom action ID is 'view-report' + if (payload.payload.id === 'view-report') { + // Navigate to the specific saved Answer page using its GUID + appEmbed.navigateToPage( + 'saved-answer/3da14030-11e4-42b2-8e56-5ee042a8de9e' + ); + } +}); +---- + +To navigate to a specific application page without initiating a reload, you can set the `noReload` attribute to `true` as shown in this example: + +[source,javascript] +---- +// Listen for the CustomAction event triggered from the embedded ThoughtSpot app +appEmbed.on(EmbedEvent.CustomAction, async (payload: any) => { + // Check if the custom action ID is 'view-report' + if (payload.payload.id === 'view-report') { + // Navigate to the specific saved Answer page using its GUID, + // and set noReload to true to avoid reloading the iframe + appEmbed.navigateToPage('saved-answer/3da14030-11e4-42b2-8e56-5ee042a8de9e', true); + } +}); +---- + +=== Using history.back() +Page changes within the `AppEmbed` component register as part of the embedding app's history to the web browser. + +The standard JavaScript `history.back()` function will cause the `AppEmbed` component to go to the previously loaded page up until the very first ThoughtSpot page loaded within the component. + +== Detect changes in the currently loaded page +Various actions the user takes within the embedded ThoughtSpot application may cause navigation within ThoughtSpot. + +User actions within the embedded ThoughtSpot application can trigger navigation events within ThoughtSpot. The embedding application can listen for these navigation changes via `EmbedEvent.RouteChange` and handle the event response. + +The response can include a `currentPath` property, which is the path after the ThoughtSpot domain, for example: + +---- +pinboard/96a1cf0b-a159-4cc8-8af4-1a297c492ff9 +---- + +To parse the `currentPath` into varying useful components, you can include this `tsAppState` object code in the global scope for use by other web application code: + +[source,JavaScript] +---- +// Simple global object to handle details about what is visible in the AppEmbed component at a given moment +let tsAppState = { + currentPath: startPath, + currentDatasources: [], // Can be set later when detected from TML or other events + // return to what is being viewed at the moment, in the form that will translate to the pageId property if captialized, or path property if not + get pageType() { + if (this.currentPath.includes('/saved-answer/')){ + return 'answer'; + } + else if (this.currentPath.includes('/pinboard/')){ + return 'liveboard'; + } + /* + * Others are meant to match the exact pageId from SDK + */ + else if(this.currentPath.includes('/answer/')){ + return 'Search'; + } + else if(this.currentPath.includes('/answers')){ + return 'Answers'; + } + else if (this.currentPath.includes('/pinboards')){ + return 'Liveboards'; + } + else if(this.currentPath.includes('/insights')){ + return 'SpotIQ'; + } + else if(this.currentPath.includes('/monitor')){ + return 'Monitor'; + } + else if(this.currentPath.includes('/data')){ + return 'Data'; + } + else { + return 'Home'; + } + }, + // If viewing an Answer or Liveboard, returns the GUID of that object from the parsed URL + get objectId() { + let pathParts = this.currentPath.split('/'); + // '/saved-answer/' is path for Answers (vs. /answer/) + if (this.currentPath.includes('/saved-answer/')){ + answerGUID = pathParts[2]; + return pathParts[2]; + } + // '/pinboard/' is path for saved Liveboards + else if (this.currentPath.includes('/pinboard/')){ + let pathParts = this.currentPath.split('/'); + // May need adjustment for tabbed views to add in current Tab + liveboardGUID = pathParts[2]; + return pathParts[2]; + } + else{ + return null; + } + } + +} +---- + +The following example shows the event listener code updating the global `tsAppState` object whenever a change is detected within the embedded ThoughtSpot app: + +[source,JavaScript] +---- +embed.on(EmbedEvent.RouteChange, (response) => { + // console.log("RouteChange fires"); + // console.log(response); + // tsAppState object has currentPath property, which allows its other methods to parse out pageId, object type, GUIDs etc. + tsAppState.currentPath = response.data.currentPath; + console.log("TS App page is now: ", tsAppState.currentPath); + + // Update elements within your web application based on the new state of ThoughtSpot (adjust menu selections, etc.) + +}) +---- + +== Additional resources + +See also: + +* xref:full-embed.adoc[Embed full application] +* xref:full-app-customize.adoc[Customizing a full application embed] +* xref:page-navigation.adoc[Creating dynamic menus and navigation] +* xref:AppViewConfig.adoc[AppViewConfig reference page] +* xref:HostEvent.adoc[Host events] +* xref:EmbedEvent.adoc[Embed Events] diff --git a/modules/ROOT/pages/sf-integration.adoc b/modules/ROOT/pages/sf-integration.adoc index 888d4bf98..9c1614f25 100644 --- a/modules/ROOT/pages/sf-integration.adoc +++ b/modules/ROOT/pages/sf-integration.adoc @@ -152,7 +152,7 @@ To embed ThoughtSpot content, complete the steps described in the following sect * xref:sf-integration.adoc#_use_iframe_to_embed[Use iFrame to embed] === Embed using ThoughtSpot LWC plugin -For information about the LWC plug-in installation and setup, see link:https://docs.thoughtspot.com/cloud/10.13.0.cl/salesforce-plugin[Integration Guide, window=_blank]. +For information about the LWC plug-in installation and setup, see link:https://docs.thoughtspot.com/cloud/latest/salesforce-plugin[Integration Guide, window=_blank]. === Custom LWC with Visual Embed SDK The Salesforce lightning platform moved developers away from Visualforce to *Lightning Web Components (LWC)*. If you are considering using the SDK, we will assume your Salesforce instance is running on Lightning. diff --git a/modules/ROOT/pages/spotter-apis.adoc b/modules/ROOT/pages/spotter-apis.adoc index 06d67ff92..5485baa23 100644 --- a/modules/ROOT/pages/spotter-apis.adoc +++ b/modules/ROOT/pages/spotter-apis.adoc @@ -61,11 +61,11 @@ __Available on ThoughtSpot Cloud instances from 10.13.0.cl onwards__. xref:spotter-apis.adoc#_send_a_question_and_generate_streaming_responses[Streams responses], including tokens and visualizations, for a specific conversation context. This API endpoint can be used for real-time agentic interactions and orchestrated experiences. + __Available on ThoughtSpot Cloud instances from 10.13.0.cl onwards__. -//* `POST /api/rest/2.0/ai/agent/{conversation_identifier}/converse` + -//xref:spotter-apis.adoc#_create_a_conversation_session_with_spotter_agent[Sends a message] to an ongoing conversation session with Spotter agent. + -//__Available on ThoughtSpot Cloud instances from 10.15.0.cl onwards__. +* `POST /api/rest/2.0/ai/agent/{conversation_identifier}/converse` + +xref:spotter-apis.adoc#_create_a_conversation_session_with_spotter_agent[Sends a message] to an ongoing conversation session with Spotter agent. + +__Available on ThoughtSpot Cloud instances from 10.15.0.cl onwards__. -|Guided analysis a| +|Data literacy and guided analysis a| //* `POST /api/rest/2.0/ai/data-source-suggestions` + //xref:spotter-apis.adoc#_get_data_source_suggestions[Returns a list of relevant data sources], such as Models, based on a query and thus helping users and agents choose the most appropriate data source for analytics. + //__Available on ThoughtSpot Cloud instances from 10.15.0.cl onwards__. @@ -73,8 +73,35 @@ __Available on ThoughtSpot Cloud instances from 10.13.0.cl onwards__. * `POST /api/rest/2.0/ai/relevant-questions/`] + xref:spotter-apis.adoc#_get_relevant_questions[Decomposes a user query] into relevant sub-questions. Guides users to explore data more deeply for a comprehensive analysis. + __Available on ThoughtSpot Cloud instances from 10.13.0.cl onwards__. + +|NL instructions to coach Spotter a| * `POST /api/rest/2.0/ai/instructions/set` + +xref:spotter-apis.adoc#_set_nl_instructions[Sets natural language instructions] on a specific data model to guide Spotter and enhance the quality of Spotter-generated responses. + +__Available on ThoughtSpot Cloud instances from 10.15.0.cl onwards__. + +* `POST /api/rest/2.0/ai/instructions/get` + +xref:spotter-apis.adoc#_retrieve_nl_instructions_assigned_to_a_model[Retrieves NL instructions assigned to a Model] + +__Available on ThoughtSpot Cloud instances from 10.15.0.cl onwards__. +|===== + +== Per-user API rate limits + +The following rate limits apply to xref:spotter-apis.adoc#_conversational_analytics_with_spotter_agent[Spotter agent APIs] per user: + +* A maximum of 10 conversation creation requests per minute. +* A maximum of 30 query messages to a conversation session per minute. + +[width="100%" cols="2,2"] +[options='header'] +|===== +|API endpoint| Rate Limit (per user, per minute) +|`/api/rest/2.0/ai/agent/conversation/create` | 10 +|`/api/rest/2.0/ai/agent/{conversation_identifier}/converse`| 30 +|`/api/rest/2.0/ai/agent/converse/sse` | 30 +|| |===== +If you are integrating these APIs in your environment, consider implementing a retry logic to handle the rate limit errors. + == Conversational analytics with Spotter (Classic) In the Spotter classic mode, the conversation session and context will be managed by Spotter. The APIs allow users to interact directly with Spotter with no specific agentic capabilities or framework. @@ -133,6 +160,43 @@ If the API request is successful, a conversation identifier is created. Note the ---- +//// +The following AI API endpoints allow you to initiate a conversation session with Spotter: + +If the API request is successful, the following data is sent in the API response: + +* `session_identifier` + +GUID of the Answer session. +* `generation_number` + +Number assigned to the Answer session. +* `message_type` +Type of response received for the query. For example, `TSAnswer` (ThoughtSpot Answer). +* `visualization_type` + +The data format of the generated Answer; for example, a chart or table. When you download this Answer, the data will be exported in the format indicated by the `visualization_type`. +* `tokens` + +Tokens generated from the natural language search query specified in the API request. These tokens can be used as input to the `/api/rest/2.0/ai/conversation/create` endpoint to set the context for a conversation session. + +[NOTE] +==== +Note the session ID and generation number. To export the result generated from this API call, send these attributes in the `POST` request body to the `/api/rest/2.0/report/answer` endpoint. +==== + +[source,JSON] +---- +[{ + "session_identifier": "57784fa1-10fa-431d-8d82-a1657d627bbe", + "generation_number": 2, + "message_type": "TSAnswer", + "visualization_type": "Undefined", + "tokens": "[product], [region] = [region].'west', sort by [sales] descending" +}] +---- + +== Conversational analytics with Spotter agent +Spotter agent is an advanced, agentic version of Spotter, which supports context-aware interactions, data literacy features, and follow-up conversations for deeper analytics. Spotter agent can be used for complex reasoning and agentic interactions in an orchestrated framework. + +//// + === Send a query to a conversation session To send a question to an ongoing conversation session or ask follow-up questions to , send a `POST` request body with conversation ID and query text to the `POST /api/rest/2.0/ai/conversation/{conversation_identifier}/converse` API endpoint. @@ -844,7 +908,123 @@ The session ID and generation number serve as the data context for the Answer. Y * The tokens and TML phrases returned in the response can be used as inputs for the search data API call to get an Answer. //// +=== Send queries to a conversation session with Spotter agent + +To send queries to an ongoing conversation session with the Spotter agent, use the `/api/rest/2.0/ai/agent/{conversation_identifier}/converse` API endpoint. +To use this API, the user must have access to the relevant conversational session and include its ID in the API request URL. The API request body must include at least one message in natural language format. + +==== Request parameters + +[width="100%" cols="2,2,4"] +[options='header'] +|===== +|Parameter|Type| Description +|`conversation_identifier`|Path parameter|__String__. Required. Specify the conversation ID received from the xref:spotter-apis.adoc#_create_a_conversation_session_with_spotter_agent[POST /api/rest/2.0/ai/agent/conversation/create] API call. +|`message`|Form parameter|_String_. Required. Specify a natural language query string. For example, `total sales of jackets last month`. +|===== + + +//// +|`settings` |__Optional__. Defines additional parameters for the conversation context. You can set any of the following attributes as needed: + +* `enable_contextual_change_analysis` + +__Boolean__. When enabled, Spotter analyzes how the context changes over time, that is comparing results from different queries. +* `enable_natural_language_answer_generation` + +__Boolean__. Allows sending natural language queries to the conversation session. +* `enable_reasoning` + +__Boolean__. Allows Spotter to use reasoning for deep analysis and precise responses. +//// + +==== Example request +The following example shows the request body with the query text and the conversation ID. + +[source,cURL] +---- +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/ai/agent/-1XZmqqMcbtm/converse' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer {AUTH_TOKEN}' \ + --data-raw '{ + "messages": [ + "total sales of jackets" + ] +}' +---- + +==== API response + +If the request is successful, the API returns an array of objects in the response. The messages in the API response include the following parts: + +* `type` + +Type of the message, such as text, answer, or error. +* `message` + +Response message generated for the query. +* `metadata` + +Additional information based on the message type. + +The following example shows the response text contents for the `answer` message type. + +[source,JSON] +---- +{ + "messages":[ + { + "metadata":{ + }, + "internal":{ + }, + "type":"text", + "text":"Let me retrieve the total sales of jackets from the dataset.", + "agent_context":"" + }, + { + "metadata":{ + "output":"{metadata-output}", + "worksheet_id":"cd252e5c-b552-49a8-821d-3eadaa049cca", + "assumptions":"You want to know the total sales amount for jackets specifically.", + "chart_type":"KPI", + "data_awareness_enabled":true + }, + "internal":{ + }, + "type":"answer", + "title":"total sales of jackets", + "description":"", + "session_id":"19a5da20-28c5-4266-a3be-e1c61f122b5d", + "gen_no":1, + "sage_query":"sum [sales] [item type] = [item type].'jackets'", + "tml_tokens":[ + "sum [sales]", + "[item type] = [item type].'jackets'" + ], + "formulas":[ + ], + "subqueries":[ + ], + "viz_suggestion":"CAAQIBomEiQzNGRmZjA2ZS0yNTViLTQ3NjUtYmJmYi00M2EwOGEzYmI4MjkoATIA", + "ac_state":null + }, + { + "metadata":{ + }, + "internal":{ + }, + "type":"text", + "text":"The total sales of jackets has already been visualized for you.\n\n**Summary & Insights:**\n- The result represents the overall sales amount specifically for the item type \"jackets\".\n- This metric is useful for understanding the revenue contribution of jackets within your apparel product portfolio.\n- You can use this figure to benchmark jacket performance against other item types, evaluate promotional effectiveness, or inform inventory decisions.\n\nIf you’d like a breakdown by region, store, or time period, just let me know!", + "agent_context":"" + } + ], + "__args":{ + "conversation_identifier":"IrnWPL1NFc6H", + "messages":[ + "total sales of jackets" + ] + } +} +---- + +The session ID and generation number serve as the data context for the Answer. You can use this information to create a new conversation session using `/api/rest/2.0/ai/agent/conversation/create`, or download the answer via the `/api/rest/2.0/report/answer` API endpoint. [#process_results] == Process results generated from Spotter APIs @@ -858,6 +1038,95 @@ Using tokens generated by the Spotter API in a xref:data-report-v2-api.adoc#_sea == Data literacy and query assistance The query assistance APIs help users who may need assistance with exploring and analyzing data effectively. +//// +The query assistance APIs help users find the appropriate dataset for a given query string, suggest what questions can be asked, and return example questions. These APIs are specifically designed to improve data literacy for users who may not be familiar with the underlying data, making it easier for them to explore and analyze data effectively. + +=== Get data source suggestions + +The `POST /api/rest/2.0/ai/data-source-suggestions` API provides relevant data source recommendations for a user-submitted natural language query. To use this API, you must have at least view access to the underlying metadata object referenced in the response. + +==== Request parameters + +[width="100%" cols="2,4"] +[options='header'] +|===== +|Parameter| Description +|`metadata_context` a| Required. Specify one of the following attributes to set the metadata context: + +* `data_source_identifiers` + +__Array of strings__. IDs of the data source object such as Models. +* `answer_identifiers` + +__Array of strings__. GUIDs of the Answer objects that you want to use as metadata. +* `conversation_identifier` + +__String__. ID of the conversation session. +* `liveboard_identifiers` + +__Array of strings__. GUIDs of the Liveboards that you want to use as metadata. + +| `query` |__String__. Required parameter. Specify the query string that needs to be decomposed into smaller, analytical sub-questions. +|`limit_relevant_questions` + +__Optional__ | __Integer__. Sets a limit on the number of sub-questions to return in the response. Default is 5. +|`bypass_cache` + +__Optional__| __Boolean__. When set to `true`, disables cache and forces fresh computation. +|`ai_context` + +__Optional__. a| Additional context to guide the response. Define the following attributes as needed: + +==== Example request + +[source,cURL] +---- +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/ai/relevant-questions/' \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer {AUTH_TOKEN}' + --data-raw '{ + "metadata_context": { + "data_source_identifiers": [ + "cd252e5c-b552-49a8-821d-3eadaa049cca" + ] + }, + "query": "Net sales of Jackets in west coast", + "limit_relevant_questions": 3 +}' +---- + +==== API response +If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. + +[source,JSON] +---- +{ + "relevant_questions": [ + { + "query": "What is the trend of sales by type over time?", + "data_source_identifier": "cd252e5c-b552-49a8-821d-3eadaa049cca", + "data_source_name": "(Sample) Retail - Apparel" + }, + { + "query": "Sales by item", + "data_source_identifier": "cd252e5c-b552-49a8-821d-3eadaa049cca", + "data_source_name": "(Sample) Retail - Apparel" + }, + { + "query": "Sales across regions", + "data_source_identifier": "cd252e5c-b552-49a8-821d-3eadaa049cca", + "data_source_name": "(Sample) Retail - Apparel" + } + ] +} +---- + +The returned results include metadata such as: + +* `confidence` + +A float indicating the Model's confidence in the relevance of each recommendation. +* `details` + +The data source ID, name, and description for each recommended data source. +* `reasoning` + +Reason provided by the LLM to explain why each data source was recommended. + +//// + === Get relevant questions The `/api/rest/2.0/ai/relevant-questions/` API endpoint breaks down a user-submitted query into relevant sub-questions. It accepts the original query and optional additional context, then generates a set of related questions to help users explore their data comprehensively. @@ -946,6 +1215,110 @@ Name of the associated data source object. } ---- +== NL instructions to coach Spotter +Administrators and data owners can guide and refine how Spotter interprets and answers user questions. The natural language (NL) instructions API allows setting instructions at the data model level. The API provides business context and preferred interpretations for specific queries or terminology to coach Spotter, but it does not train or change the underlying LLM. + +=== Set NL instructions +To coach and instruct the Spotter system on how to interpret queries, apply filters, select columns, handle data nuances, and present answers using the data from a specific model, you can set global rules in natural language format. Setting instructions helps Spotter generate precise and consistent responses for user queries. + +To set instructions for a Model, send a `POST` request to the `/api/rest/2.0/ai/instructions/set` API endpoint. + +[NOTE] +==== +To set NL instructions, you'll need administration or data management privileges, or at least edit access to the data Model. +==== + +==== Request parameters + +[width="100%" cols="2,4"] +[options='header'] +|===== +|Form parameter| Description +|`data_source_identifier`|__String__. ID of the Model. +|`nl_instructions_info` a|Instructions in the natural language format. + +* `instructions` + +_Array of strings_. Include the rules that you want to add in the `ìnstructions` array. Ensure that the instructions do not exceed 3000 characters. +* `scope` +Sets the scope for the rules. By default, the rules are applied globally for all Spotter users who can access the Model specified in the request. +|===== + +==== Example request + +The following example defines instructions to coach Spotter on how to interpret the query: + +[source,cURL] +---- +curl -X POST \ + --url 'https://https://{ThoughtSpot-Host}/api/rest/2.0/ai/instructions/set' \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer {AUTH_TOKEN} \ + --data-raw '{ + "data_source_identifier": "71311827-31bb-48b2-8465-9a215adbc05d", + "nl_instructions_info": [ + { + "instructions": [ + "When I ask for last month, use ‘last 30 days’ as a filter.", + "Exclude orders where order_status = '\''CANCELLED-USER'\'' when calculating total revenue" + ], + "scope": "GLOBAL" + } + ] +}' +---- + +==== Example response +If the API request is successful, ThoughtSpot returns the `{"success":true}` response. + +=== Retrieve NL instructions assigned to a Model + +To view the NL instructions assigned for a Model, send a `POST` request to the `/api/rest/2.0/ai/instructions/get` API endpoint. + +Only Spotter users with view access to the data model can retrieve instructions via API requests. + +==== Request parameters + +[width="100%" cols="2,4"] +[options='header'] +|===== +|Form parameter| Description +|`data_source_identifier`|__String__. ID of the Model from which you want to fetch instructions. +|===== + +==== Example request +The following example shows the request body for retrieving NL instructions configured on a Model: + +[source,cURL] +---- +curl -X POST \ + --url 'https://https://{ThoughtSpot-Host}/api/rest/2.0/ai/instructions/set' \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer {AUTH_TOKEN} \ + --data-raw '{ + "data_source_identifier": "3bbeac16-a723-4886-9eba-c4779d07fd83" +}' +---- + +==== Example response +If the instructions are configured on the Model specified in the API request, ThoughtSpot returns an array of instructions in the API response. + +[source,JSON] +---- +{ + "nl_instructions_info": [ + { + "instructions": [ + "When I ask for last month, use ‘last 30 days’ as a filter.", + "Exclude orders where order_status = 'CANCELLED-USER' when calculating total revenue" + ], + "scope": "GLOBAL" + } + ] +} +---- + == Additional resources * Visit the +++REST API v2.0 Playground+++ to view the API endpoints and verify the request and response workflows. diff --git a/modules/ROOT/pages/theme-builder.adoc b/modules/ROOT/pages/theme-builder.adoc index 349f05820..ea3e101a5 100644 --- a/modules/ROOT/pages/theme-builder.adoc +++ b/modules/ROOT/pages/theme-builder.adoc @@ -1,23 +1,22 @@ -= Theme builder += Theme Builder :toc: true :toclevels: 2 -:page-title: Theme builder +:page-title: Theme Builder :page-pageid: theme-builder-doc -:page-description: Understanding how to use the theme builder +:page-description: Understanding how to use the Theme Builder -Theme Builder provides a graphical interface to explore the CSS customization options that are currently available for various ThoughtSpot components. You can try out these style customization options and get a preview of the desired look and feel before applying these changes to the ThoughtSpot components in your application environment. +Theme Builder provides a graphical interface to explore and preview CSS customization options for various ThoughtSpot components. You can adjust style settings and view the changes in real time before applying them to embedded ThoughtSpot components, such as Liveboard, Visualization, Search, Spotter, and full application experience. Theme Builder also allows you to import and export CSS variables with custom values in JSON format. -In the current version, Theme Builder supports style customization options for embed components such as Liveboard, visualization, Search data page, Spotter and full ThoughtSpot app experience. The Theme Builder playground also provides an option to import and export CSS variables with custom values in JSON format. - -//To access Theme Builder, go to *Develop* tab > *Customisations* and click *Theme Builder*. -Click *Live Playgrounds* > *Theme Builder* on this documentation site, or go to link:https://developers.thoughtspot.com/docs/theme-builder[https://developers.thoughtspot.com/docs/theme-builder, window=_blank]. +When Theme Builder is enabled on your ThoughtSpot instance, you can access it by navigating to *Develop* > *Customizations* > *Theme Builder*. +You can also access it from in-product help by clicking *Guides* > *Live Playgrounds* > *Theme Builder* in the ThoughtSpot UI. +//documentation site, or go to link:https://developers.thoughtspot.com/docs/theme-builder[https://developers.thoughtspot.com/docs/theme-builder, window=_blank]. == Try out styles and load changes To try out the customization options: -. Go to link:https://developers.thoughtspot.com/docs/theme-builder[*Theme Builder*, window=_blank]. +. Go to *Develop* > *Customisations* > *Theme Builder*. . Choose the desired embed component from the dropdown on the left panel. + [.bordered] @@ -46,7 +45,7 @@ You can use this exported JSON to implement the style in your embedded ThoughtSp == Import CSS variables with custom specifications -To upload CSS variables JSON: +Theme Builder also lets you iterate on existing themes that were previously created. You can use an existing style in Theme Builder, and add to it by importing the theme in JSON. To upload a set of CSS variables in JSON format: . In the Theme Builder Playground, click *Import JSON* on the bottom of the left panel. + @@ -55,10 +54,12 @@ The Import JSON modal opens. [.bordered] [.widthAuto] image::./images/json.png[Import JSON button] -. Paste the JSON with your custom specifications. Currently, the Theme builder supports only the JSON styling variables. +. Paste the JSON with your custom specifications. Currently, the Theme Builder supports only the JSON styling variables. . Click *Import*. + If there are no errors, a success message appears at the bottom left and the iframe refreshes with the applied JSON. +If there are no errors, a success message appears at the bottom left, the iframe refreshes with the applied JSON, and the variable values are displayed on the left panel. + == Additional resources * xref:css-customization.adoc[CSS customization framework] diff --git a/modules/ROOT/pages/variables.adoc b/modules/ROOT/pages/variables.adoc index a0dc0f6c9..0cd67412f 100644 --- a/modules/ROOT/pages/variables.adoc +++ b/modules/ROOT/pages/variables.adoc @@ -6,17 +6,13 @@ :page-pageid: variables :page-description: Use the variables REST API to create and update variables for publishing content across Orgs -Variables allow you to substitute values for specific properties of a metadata object and enable dynamic data propagation across Orgs in ThoughtSpot. Using variables, you can parameterize the properties of data connections and table references per Org without changing the underlying data or creating duplicate objects. Variable values are assigned at runtime to ensure that customized configuration is available to users of different Orgs in ThoughtSpot. - -[NOTE] -==== -Variable operations through the REST API are in beta. To enable this feature on your instance, contact ThoughtSpot Support. -==== +Variables allow you to substitute values for specific properties of a metadata object and enable dynamic data propagation across Orgs in ThoughtSpot. Using variables, you can parameterize the properties of data connections, table references, and formulas per Org without changing the underlying data or creating duplicate objects. Variable values are assigned at runtime to ensure that customized configuration is available to users of different Orgs in ThoughtSpot. == Overview -You can configure variables programmatically via REST APIs, and use these variables for the following purposes: +ThoughtSpot provides predefined system variables such as `ts_username` and `ts_groups`, which can be used in formulas for data security. Additionally, you can configure variables programmatically via REST APIs, and later use these variables for the following purposes: * To xref:metadata-parameterization.adoc[parameterize metadata object properties] and xref:publishing-overview.adoc[publish artifacts across Orgs]. +* To implement xref:rls-rules.adoc[Row Level Security (RLS) rules] using formula variables and customize data for a specific Org, Model, or user. You can also pass variable attributes as security entitlements in JWT tokens for xref:abac-user-parameters.adoc#_abac_via_rls_with_formula_variables[ABAC implementation]. * To update properties of a Connection or Table directly in the TML. === Variable types @@ -33,6 +29,12 @@ Can be used for modifying connection properties for a specific principal object, ==== This feature is disabled by default. To enable this option, contact ThoughtSpot Support. ==== +* `FORMULA_VARIABLE` + +Formula variables allow you to parameterize logic in formulas and rules, and can be used in different contexts to dynamically populate values. +Formula variables can be set for an Org, user, or Model and can be used in RLS rules with the `ts_var` function. + +The Variable API allows administrators to define formula variables for the `VARCHAR`, `BIGINT`, `INT`, `FLOAT`, `DOUBLE`, `BOOLEAN`, `DATE`, `DATE_TIME`, and `TIME` data types. + === APIs for Variable creation and management The following REST API endpoints are available for variable creation and management: @@ -49,35 +51,20 @@ xref:variables.adoc#_get_details_of_variables[Retrieves the variables available xref:variables.adoc#_delete_a_variable[Deletes the variable] specified in the API request. -[IMPORTANT] +[NOTE] ==== -Note the following enhancements and breaking changes introduced in ThoughtSpot Cloud 10.14.l0.cl release: - -* Variable creation + - -** The variable creation endpoint `/api/rest/2.0/template/variables/create` doesn't support assigning values to a variable. To assign values to a variable, use the `/api/rest/2.0/template/variables/update-values` endpoint. -** The `sensitive` parameter is renamed as `is_sensitive`. - -* Variables update and value assignment + -The `/api/rest/2.0/template/variables/update` endpoint is deprecated and is replaced with `/api/rest/2.0/template/variables/update-values`. + -To update the properties of a specific variable, use the `/api/rest/2.0/template/variables/{identifier}/update` endpoint and to assign values to one or several variables, use the `POST /api/rest/2.0/template/variables/update-values` endpoint. - -* Variable search + - -** The variables search API endpoint `/api/rest/2.0/template/variables/search` now includes the `value_scope` parameter that allows you to filter the API response by the objects to which the variable is mapped. -** Filtering API response by `EDITABLE_METADATA_AND_VALUES` output format is no longer supported. - -ThoughtSpot recommends updating your application setup and workflows to avoid operational issues in your environment. +Variable operations through the REST API are in beta. To enable this feature on your instance, contact ThoughtSpot Support. ==== == Before you begin +* Ensure that you have administration privileges to create and manage variables. If creating variables within a specific Org context, ensure your ThoughtSpot account has Org administration permissions or the `CAN_MANAGE_VARIABLES` (*Can manage variables*) privilege to create and manage variables. * Ensure that you have edit access to the metadata objects to which you want to assign variables. -* Ensure that you have administration privileges to create, edit, or delete a variable. == Create a variable To create a variable, send a `POST` request to the +++/api/rest/2.0/template/variables/create +++ API endpoint, with the following parameters in the request body. +[#data_type] === Request parameters In your `POST` request body, include the following parameters: @@ -88,39 +75,39 @@ In your `POST` request body, include the following parameters: |`type` a| __String__. Type of the variable. The API supports the following types of variables: * `TABLE_MAPPING` + -To map Tables properties to variables. +To create variables for Table properties such as `databaseName`, `schemaName`, and `tableName`. * `CONNECTION_PROPERTY` + -To define variables for connection properties. This variable allows editing connection properties such as `accountName`, `warehouse`, `user`, `password`, `role` and so on. +To define variables for connection properties. This variable allows editing connection properties such as `accountName`, `warehouse`, `user`, `password`, `role`, and so on. * `CONNECTION_PROPERTY_PER_PRINCIPAL` + -To define variables for connection properties per user or user group. This variable allows modifying connection properties such as `warehouse`, `role`, `user`, `password`. The `CONNECTION_PROPERTY_PER_PRINCIPAL` variable does not support modifying core connection properties such as `accountName`, `host`, or `port`. These properties must be derived from the connection configuration and cannot be set per user or user group. -//* `FORMULA_VARIABLE` + -//Formula variables. +To define variables for connection properties per user or user group. This variable allows modifying connection properties such as `warehouse`, `role`, `user`, and `password`. The `CONNECTION_PROPERTY_PER_PRINCIPAL` variable does not support modifying core connection properties such as `accountName`, `host`, or `port`. These properties must be derived from the connection configuration and cannot be set per user or user group. +* `FORMULA_VARIABLE` + +For formula variables. For formula variables, you must specify the data type. |`name`| __String__. Name of the variable. For example, `schema_var`. Note that the name must be unique across all Orgs within the instance. |`is_sensitive` __Optional__ |__Boolean__. Indicates if the variable contains sensitive values such as passwords. -|`data_type` + -Available from 10.15.0.cl onwards a|__String__. Variable data type. +| +`data_type` a|__String__. Variable data type. It's a required parameter for formula variables. The data type defined during variable creation determines the format of the variable values. For example, if you specify the `data_type` as `DATE`, the value for this variable must be in epoch format. -Supported data types are: -//Required parameter for formula variables. +Supported data types for formula variable values are: * `VARCHAR` + -String. For example, "East", "Administrator", "Secure", "2025-10-23" +String. For example, if you are creating variables for different regions, set the data type as `VARCHAR` to allow string values such as `EAST`, `WEST`, and so on. * `INT32` + -32-bit integer data type. For example, 100,-42 +32-bit integer. If you are creating a formula variable to specify a threshold for the quantity of the products purchased, or for columns such as customer or product IDs, set the type as `INT32` to allow numbers within the 32-bit range. For example, 100, 123456, 3005. * `INT64` + -32-bit integer data type. For example, 0, 2147483647 +64-bit integer. For variable values that exceed the 32-bit range, set the data type as `INT64`. For example, transaction numbers, sales IDs, or discount values. * `DOUBLE` + -The Double data type refers to a floating point numeric type that is recommended for storing decimal values. For example, 3.14, -0.001, 100.0, 1.7E+308. In ThoughtSpot, DOUBLE is used for columns that require floating point arithmetic or need to store decimal numbers, such as latitude and longitude or financial amounts. +In ThoughtSpot, the DOUBLE data type is used for columns that require floating-point arithmetic or need to store numbers such as latitude, longitude, percentages, monetary values, margin threshold, measurements, and so on. * `DATE` + -Date format. For example, 2025-10-20. +Date in the epoch format. If you are creating a formula variable for a specific start date, set the data type as `DATE` and configure the date value in epoch format. For example, `1711933200` for 1 April 2024 (GMT). * `DATE_TIME` + -Date with time stamp. For example, 2025-10-20 14:30:00. +Date with time stamp. If you are creating a formula variable for specific timestamp, specify the data type as `DATE_TIME` and assign a timestanp in epoch format as variable value. For example, `1711933200000` for 1 April 2024 01:00:00 (GMT). + [NOTE] -The API doesn't support setting data type for the `TABLE_MAPPING`, `CONNECTION_PROPERTY`, and `CONNECTION_PROPERTY_PER_PRINCIPAL` variable types. +The `data_type` is required only for formula variables and is not supported for other variable types. |===== + //// |`values` __Optional__ a|__Array of strings__. Define the variable attributes. Although it's optional, make sure that you set the value for an Org before publishing content to that Org. @@ -140,8 +127,11 @@ Applicable if the variable type is set as `CONNECTION_PROPERTY_PER_PRINCIPAL`. T //// + === Example request +The following example shows the request body for the table mapping variable type: + [source,cURL] ---- curl -X POST \ @@ -151,59 +141,101 @@ curl -X POST \ -H 'Authorization: Bearer {AUTH_TOKEN}' \ --data-raw '{ "type": "TABLE_MAPPING", - "name": "TableVar", + "name": "schema_var", "is_sensitive": true, }' ---- +The following example shows the request body for the formula variable creation: + +[source,cURL] +---- +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/template/variables/create' \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer {AUTH_TOKEN}' \ + --data-raw '{ + "type": "FORMULA_VARIABLE", + "name": "region_var", + "is_sensitive": false, + "data_type": "VARCHAR" +}' +---- + +The following example shows the request body for the connection property variable: + +[source,cURL] +---- +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/]api/rest/2.0/template/variables/create' \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer {AUTH_TOKEN}' \ + --data-raw '{ + "type": "CONNECTION_PROPERTY", + "name": "accountNameVar", + "is_sensitive": false, +}' +---- + === Example response -If the API request is successful, the following response is returned: +If the API request is successful, ThoughtSpot returns the variable details in the response. [source,JSON] ---- { "id": "3242b54c-69bc-4ff0-97cf-f99a2216b616", - "name": "TableVar", + "name": "schema_var", "variable_type": "TABLE_MAPPING", "sensitive": true, "values": [] } ---- -Note the variable ID. - - -== Update variable values - -To update a variable or properties of a variable, use the following REST APIs: - -* +++POST /api/rest/2.0/template/variables/{identifier}/update+++ -+ -Allows updating the properties of a variable. - -//* `+++POST /api/rest/2.0/template/variables/{identifier}/update+++` +[source,JSON] +---- +{ + "id": "a033c855-dc49-4936-a82f-7fd29e57ab6b", + "name": "country", + "variable_type": "FORMULA_VARIABLE", + "sensitive": false, + "values": [] +} +---- -* +++POST /api/rest/2.0/template/variables/update-values+++ -+ +[source,JSON] +---- +{ + "id": "a033c855-dc49-4936-a82f-7fd29e57ab6b", + "name": "accountNameVar", + "variable_type": "CONNECTION_PROPERTY", + "sensitive": false, + "values": [] +} +---- -Allows adding, removing, or replacing values of one or more variables configured in ThoughtSpot. +Note the variable ID and name for variable edits. +The API returns an empty array for values because the values are not assigned to the variable. +* To assign values, use the `POST /api/rest/2.0/template/variables/update-values` API endpoint. +* To include formula variables in a JSON Web Token (JWT) token for xref:abac_rls-variables.adoc[ABAC implementation], use the `/api/rest/2.0/auth/token/custom` API endpoint. -=== Update properties of a variable +== Update properties of a variable -To update the properties of a variable, send a `POST` request to `/api/rest/2.0/template/variables/{identifier}/update` with the following parameters in the request body. Specify the variable ID in the `{identifier}` path parameter. +To update the properties of a variable, send a `POST` request to the `api/rest/2.0/template/variables/{identifier}/update` API endpoint with the following parameters in the request body. In your API request, specify the variable ID in the `{identifier}` path parameter. === Request parameters -In your `POST` request body, you can include the following parameters: +In your `POST` request body, include the following parameters: -[width="100%" cols="1,4"] +[width="100%" cols="1,1,4"] [options='header'] |===== |Parameter|Type|Description |`identifier` |Path |__String__. Name or ID of the variable to update. -|`name`|Form parameter|__String__. Name of the variable. +|`name` |Form parameter|__String__. Name of the variable. |===== //// @@ -231,6 +263,7 @@ The priority assigned to this value. Applicable to the `CONNECTION_PROPERTY_PER_ |===== //// === Example request +The following example shows the request body for updating the name of a variable: [source,cURL] ---- @@ -239,21 +272,24 @@ curl -X POST \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {AUTH_TOKEN}' \ --data-raw '{ - "name": "TableVar" + "name": "demo_schema_var" }' ---- If the update operation is successful, the API returns a 204 response to indicate that the variable was updated successfully. -=== Update properties of multiple variables +== Define values and scope for variables + +To assign values to variables, use the `/api/rest/2.0/template/variables/update-values` API endpoint. -To update properties of multiple variables in a single API call, send a `POST` request to the `POST /api/rest/2.0/template/variables/update-values` API endpoint. +The API allows you to configure variable properties based on the type of variable you are trying to edit. For example, you can assign formula variables for a specific Org, Model, or user context. Similarly, for the `CONNECTION_PROPERTY_PER_PRINCIPAL` variable type, you can specify the principal type as user or user group and the ID of the principal object. -The API endpoint allows: +The API also allows you to edit, replace, or reset the values and scope assigned to a variable. -* Adding new values to variables -* Replacing existing values -* Resetting values +[NOTE] +==== +In ABAC implementation, you can assign the variable values during token generation. Before configuring the token properties and variable values, verify the variables and their assignment status using the xref:variables.adoc#_get_variables[variable search API request]. +==== === Request parameters @@ -263,14 +299,13 @@ In your `POST` request body, you can include the following parameters: [options='header'] |===== |Parameter|Properties|Description -.4+|`variable_assignment` 2+| Properties for setting values for a variable at a specific entity level, such as Org, user, or user group. This allows the same variable to have different values depending on which entity is being referenced. - -|`variable_identifier` a| __Array of strings__. Specify the variable identifiers to which you want to assign values. +.4+|`variable_assignment` 2+| Includes parameters for setting values for a variable . This allows the same variable to have different values depending on which entity is being referenced. +|`variable_identifier` a| __Array of strings__. Specify the name or ID of the variable to which you want to assign values. |`variable_values` a|__Array of strings__. Specify the values to assign. For example, `staging1`. |`operation` a| Specify the update operation type. The following values are available: * `ADD` + -Adds new values. Use this operation type if you want to add new attributes to the variable. +Adds new values. Use this operation type to assign values to the variable. * `REPLACE` + Replaces the existing attributes with new values. * `REMOVE` + @@ -278,21 +313,68 @@ Removes the values assigned to the variable. For example, you can remove the val * `RESET + Resets all values at the variable level. For example, if a variable is assigned to multiple entities such as Org, user, or user group, the reset operation clears the values assigned to the variable for all entities. -.5+|`variable_value_scope` 2+| Set the scope for variable values. +.5+|`variable_value_scope` 2+| Set the scope for variable values. These properties determine the entity level, such as Org, user, or user-group, for which the values will apply. | `org_identifier` a|__String__ + -ID or name of the Org. For primary Org, specify `primaryOrg` or Org 0. +ID or name of the Org. For primary Org, specify `primaryOrg` or Org 0. Applicable to `TABLE_MAPPING`, `FORMULA_VARIABLE`, and `CONNECTION_PROPERTY` variable types. |`principal_type` and `principal_identifier` + __Optional__ a|__String__. Principal attributes such as user and user group. These attributes are applicable to the `CONNECTION_PROPERTY_PER_PRINCIPAL` variable type. -|`model_identifier` a| ID or name of the Model. +|`model_identifier` a| ID or name of the Model to which the variables configuration must be applied. Applicable to formula variables. | `priority` + __Optional__ a| The priority assigned to this value. Applicable to the `CONNECTION_PROPERTY_PER_PRINCIPAL` variable type. + -Priority refers to the order of precedence when updating variable values for multiple entities in a single operation. If more than one entity matches the conditions during variable resolution, based on the value assigned to the priority, the system determines which entity’s value takes effect. -For example, if both a user and their group have values assigned for the same variable, the system uses the assigned priority to decide which value to apply. +Priority refers to the order of precedence when updating variable values for multiple entities in a single operation. If more than one entity matches the conditions during variable resolution,the system determines which entity’s value takes effect based on the value assigned to the `priority` parameter. +For example, if a variable is configured for both the user and their group, the system determines which value to based on the assigned priority. || |===== -=== Request example +=== Example request +The following sections show the examples for assigning values to different types of variables and configuring the Org scope. Note that the variable values and Org identifiers are case-sensitive. + +==== Table mapping variables +The following example shows the request parameters to assign values to `TABLE_MAPPING` variables and set the variable scope to specific Orgs: + +[source,cURL] +---- +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/template/variables/update-values' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer {AUTH_TOKEN}' \ + --data-raw '{ + "variable_assignment": [ + { + "variable_identifier": "schema_var", + "variable_values": [ + "SALES_SCHEMA_A" + ], + "operation": "ADD" + }, + { + "variable_identifier": "db_var", + "variable_values": [ + "SALES_DB_A" + ], + "operation": "ADD" + }, + { + "variable_identifier": "table_var", + "variable_values": [ + "SALES_TABLE_A" + ], + "operation": "ADD" + } + ], + "variable_value_scope": [ + { + "org_identifier": "OrgA" + } + ] +}' +---- + +If the variable update operation is successful, you can use these variables in the Table TML or to xref:metadata-parameterization.adoc[parameterize Table properties]. + +==== Connection property variables +The following example shows the request parameters to assign values to the `CONNECTION_PROPERTY` variables and set the variable scope to a specific Org: [source,cURL] ---- @@ -303,25 +385,121 @@ curl -X POST \ --data-raw '{ "variable_assignment": [ { - "variable_identifier": "e61ace04-6651-4725-9174-90ce33423ef9", + "variable_identifier": "account_name_var", + "variable_values": [ + "orgA_account" + ], + "operation": "ADD" + }, + { + "variable_identifier": "warehouse_var", "variable_values": [ - "prod1" + "WH_A" ], - "operation": "REPLACE" + "operation": "ADD" + }, + { + "variable_identifier": "role_var", + "variable_values": [ + "analyst" + ], + "operation": "ADD" + }, + ], + "variable_value_scope": [ + { + "org_identifier": "OrgA" } + ] +}' +---- + +If the variable update operation is successful, you can use these variables in the Connection TML or to xref:metadata-parameterization.adoc[parameterize connection properties]. + +==== Formula variables +The following example shows the request parameters to assign values to formula variables and set their scope to a specific Org and data Model: + +[source,cURL] +---- +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/template/variables/update-values' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer {AUTH_TOKEN}' \ + --data-raw '{ + "variable_assignment": [ + { + "variable_identifier": "region_var", + "variable_values": [ + "West" + ], + "operation": "ADD" + }, + { + "variable_identifier": "state_var", + "variable_values": [ + "california", + "nevada" + ], + "operation": "ADD" + }, + { + "variable_identifier": "category_var", + "variable_values": [ + "all" + ], + "operation": "ADD" + }, + { + "variable_identifier": "min_quantity_var", + "variable_values": [ + "10" + ], + "operation": "ADD" + }, + { + "variable_identifier": "start_date_var", + "variable_values": [ + "1711933200" + ], + "operation": "ADD" + }, + { + "variable_identifier": "end_date_var", + "variable_values": [ + "1743469200" + ], + "operation": "ADD" + }, ], "variable_value_scope": [ { - "org_identifier": "prodOrg", - "model_identifier": "Sample retail sales" + "org_identifier": "Org_NA", + "model_identifier": "80c969e7-3a36-48b7-923e-e2fb5c3fe88f", + "principal_type": "USER", + "principal_identifier": "tsuser" + + }, + { + "org_identifier": "Org_Sales", + "model_identifier": "cd252e5c-b552-49a8-821d-3eadaa049cca" + "principal_type": "USER", + "principal_identifier": "tsuser" } ] }' ---- +To avoid invalid data type errors, ensure that the values you assign to formula variables match the data type configured during variable creation. + +Formula variables assigned to Primary Org can be used across all Orgs. + +If the formula variable update is successful, you can use these variables in link:https://docs.thoughtspot.com/cloud/latest/rls-variables-reference[RLS rules, window=_blank] and xref:abac_rls-variables.adoc[ABAC via RLS with variables]. + +=== Example response + If the update operation is successful, the API returns a 204 response to indicate that the variable was updated successfully. -== Get details of variables +== Get variables To get a list of variables or the details of a specific variable, send a `POST` request to the `+++/api/rest/2.0/template/variables/search+++` API endpoint. To search for a variable, specify the following parameters in your API request: @@ -329,19 +507,20 @@ To search for a variable, specify the following parameters in your API request: * variable details + Details such as variable type, ID, and name pattern. For name pattern search, specify the partial name of the variable. For wildcard search, use `%`. * variable value + -Variable parameters such as Org ID, Model ID, ID and type of Principal object. +Variable parameters such as Org ID, Model ID, and ID and type of Principal object. * output format for response content + Specify one of the following values for output format: ** `METADATA_ONLY` (default) + Returns only the variable metadata ** `METADATA_AND_VALUES` + -Returns variable metadata and values +Returns the variable metadata along with the values assigned to each variable. //// ** `EDITABLE_METADATA_AND_VALUES` + Returns metadata details, such as name, type, default value, and whether the variable is editable, and the current values of variables that can be edited. //// +=== Example request [source,cURL] ---- curl -X POST \ @@ -351,8 +530,8 @@ curl -X POST \ -H 'Authorization: Bearer {AUTH_TOKEN}' \ --data-raw '{ "record_offset": 0, - "record_size": 10, - "output_format": "METADATA_AND_VALUES", + "record_size": -10, + "output_format": "METADATA", "variable_details": [ { "type": "TABLE_MAPPING" @@ -361,51 +540,39 @@ curl -X POST \ }' ---- +=== Example response + If the request is successful, the API returns the variable data in the response: [source,JSON] ---- [ - { - "id":"180a9cd3-8605-445b-8b70-aa0bcef5dfb0", - "name":"schema_var", - "variable_type": "TABLE_MAPPING", - "sensitive":null, - "values":[ - { - "value":"primaryOrg", - "org_identifier":"Primary", - "principal_type":null, - "principal_identifier":null, - "priority":null - }, - { - "value":"MyOrg1", - "org_identifier":"MyOrg1", - "principal_type":null, - "principal_identifier":null, - "priority":null - }, - { - "value":"MyOrg2", - "org_identifier":"MyOrg2", - "principal_type":null, - "principal_identifier":null, - "priority":null - } - ] - } + { + "id": "f658cfd5-fa6f-4c33-a12f-ea46fa799666", + "name": "Table_var", + "variable_type": "TABLE_MAPPING", + "sensitive": false, + "values": null + }, + { + "id": "7f52d7b1-38f1-4127-ad5a-a2a7f58064df", + "name": "Schema_var", + "variable_type": "TABLE_MAPPING", + "sensitive": false, + "values": null + } ] ---- == Delete a variable -To delete a variable, send a `POST` request to the `+++/api/rest/2.0/template/variables/{identifier}/delete+++` API endpoint, with the variable ID in the path parameter. +To delete a variable, send a `POST` request to the `/api/rest/2.0/template/variables/{identifier}/delete` API endpoint, with the variable ID in the path parameter. Note that you can delete only one variable at a time. -If the variable is used by other objects, make sure to update or remove those references before deleting the variable. +The API does not allow deleting formula variables if they are used in Models, RLS rules, user properties, or ABAC tokens. If the variable is used by an object in ThoughtSpot, make sure to remove the variable assignments and references before deleting it from ThoughtSpot. +=== Example request [source,cURL] ---- curl -X POST \ @@ -414,3 +581,10 @@ curl -X POST \ ---- If the API request is successful, ThoughtSpot returns a 204 response code. + +== Additional resources + +* For more information about using formula variables in RLS rules, see link:https://docs.thoughtspot.com/cloud/latest/rls-variables-reference[Formula variables, window=_blank]. +* For information about assigning security entitlements via ABAC tokens, see xref:abac_rls-variables.adoc[ABAC via RLS with formula variables]. +* For information about RLS rules, see link:https://docs.thoughtspot.com/cloud/latest/security-rls[RLS rules documentation, window=_blank]. + diff --git a/modules/ROOT/pages/whats-new.adoc b/modules/ROOT/pages/whats-new.adoc index ba4c57c0f..1bbd50faa 100644 --- a/modules/ROOT/pages/whats-new.adoc +++ b/modules/ROOT/pages/whats-new.adoc @@ -10,7 +10,49 @@ This page lists new features, enhancements, and deprecated functionality in Thou == Version 10.15.0.cl -For information about the new features and enhancements introduced 10.15.0.cl, see the link:https://developers.thoughtspot.com/docs/10.15.0.cl?pageid=whats-new[10.15.0.cl Developer Documentation]. +=== Theme Builder +Theme Builder is now generally available (GA) and will be rolled out to all ThoughtSpot instances in customer deployments over the next few weeks. + +When this feature is enabled on your instance, you can access it from the *Develop* page on your ThoughtSpot and use it to customize styles and UX themes directly within the product. + +For more information, see xref:theme-builder.adoc[Theme Builder]. + +=== V3 navigation and home page experience +The new V3 navigation and home page experience is now generally available (GA) and can be enabled on ThoughtSpot embedded instances. + +The default UI experience in full application embedding remains classic (V1) experience until further notice. Developers embedding the full ThoughtSpot application can enable the V3 experience in their applications by setting the appropriate configuration options in their embed code. + +For more information, see xref:full-app-customize.adoc[Customizing full application embedding]. + +=== Formula variables in RLS rules + +You can now create formula variables using the Variable REST API and use these variables in RLS rules for a specific data context and in ABAC token requests to dynamically assign security attributes to users. + +For more information, see xref:abac_rls-variables.adoc[ABAC via RLS with variables]. + +=== Spotter APIs +ThoughtSpot introduces new REST APIs for the following Spotter workflows: +//* To get data source suggestions based on a user's query +* To send queries to a conversation session with Spotter agent +* To set natural language (NL) instructions on a Model to coach the Spotter system +* To fetch NL instructions configured on a Model + +For more information, see xref:spotter-apis.adoc[Spotter APIs]. + +=== Embed events and parameters to intercept API calls + +You can now intercept API calls from the embedded ThoughtSpot application using the `interceptUrls` attribute in the Visual Embed SDK. This feature lets you control API requests in your embedding application and use embed events to modify, block, or handle requests before they are sent to the backend. For more information, see xref:api-intercept.adoc[Intercept API calls and search requests]. + +=== Mobile Embed SDK +The SDKs for embedding ThoughtSpot components in mobile apps are now Generally Available (GA). For more information about the SDKs and how to embed a ThoughtSpot component in a mobile app, see xref:mobile-embed.adoc[Mobile embed documentation]. + +=== Visual Embed SDK + +For information about the new features and enhancements introduced in Visual Embed SDK version 1.44.0, see xref:api-changelog.adoc[Visual Embed changelog]. + +=== REST API +For information about REST API v2 enhancements, see xref:rest-apiv2-changelog.adoc[REST API v2.0 changelog]. + == Version 10.14.0.cl @@ -63,7 +105,9 @@ For information about REST API v2 enhancements, see xref:rest-apiv2-changelog.ad == Version 10.13.0.cl -=== Spotter AI APIs +.Spotter AI APIs +[%collapsible] +==== ThoughtSpot introduces the following new xref:spotter-apis.adoc[Spotter AI APIs] [beta betaBackground]^Beta^, to provide contextual and agentic capabilities for integration with external clients and custom AI applications: * `/api/rest/2.0/ai/agent/conversation/create` @@ -84,43 +128,57 @@ With the introduction of these APIs, the following legacy API endpoints will be The above-listed AI endpoints will be available in the Playground until further notice. However, we recommend using the new APIs for better context management, extensibility, and integration options. //// +==== -=== Support for runtime overrides in Spotter embed +.Support for runtime overrides in Spotter embed +[%collapsible] +==== You can apply runtime filters and parameter overrides to Spotter sessions and interactions using the Visual Embed SDK. When these overrides are configured in the SDK, they are applied to the data used for Spotter queries, and the generated answers in these sessions will reflect the applied overrides. The Visual Embed SDK Playground for Spotter embedding includes an option to set runtime overrides. You can test and preview the results before updating your embed code. For more information, see xref:runtime-filters.adoc[Runtime filters] and xref:runtime-parameters.adoc[Runtime Parameters]. +==== -=== Full application embed experience - +.Full application embed experience +[%collapsible] +==== * The new experience with a sliding navigation panel and modular home page is now available as an Early Access feature for ThoughtSpot embedded application users. + -The new experience introduces an enhanced navigation experience with a persona-based app selector and a modular home page with customizable components. This feature is turned off by default on ThoughtSpot. If this feature is enabled on your instance, you can enable it in full application embed using the `discoveryExperience` SDK property. +The new experience introduces a left navigation panel with a persona-based app selector and a modular home page with customizable components. This feature is turned off by default on ThoughtSpot. If this feature is enabled on your instance, you can enable it in full application embed using the `discoveryExperience` SDK property. + For more information, see xref:full-app-customize.adoc[V3 navigation and home page experience]. * List pages, such as Answers and Liveboards, now include enhanced sorting and filtering capabilities. These pages also allow users to organize, find, and personalize content. Developers can customize the visibility of columns in their embeds by configuring the xref:AppViewConfig.adoc#_hiddenlistcolumns[`hiddenListColumns`] property in the SDK. + -For more information, see xref:full-app-customize.adoc#_customize_list_pages[Hide columns on List pages]. - -=== Worksheet deprecation and removal +For more information, see xref:full-app-customize.adoc#_hide_columns_on_list_pages_new_experience[Hide columns on List pages]. +==== +.Worksheet deprecation and removal +[%collapsible] +==== Worksheets are replaced with Models, and all application workflows will require you to use Models. If you are importing worksheet TMLs, the import operation may fail with an error, requiring users to convert Worksheets to Models. Please update your CI/CD and Git workflows to use Model TMLs instead of Worksheets. For more information, see xref:deprecated-features.adoc#_worksheet_deprecation_and_removal[Worksheet deprecation]. +==== -=== Visual Embed SDK - +.Visual Embed SDK +[%collapsible] +==== For information about the new features and enhancements introduced in Visual Embed SDK version 1.42.0, see xref:api-changelog.adoc[Visual Embed changelog]. +==== -=== REST API +.REST API +[%collapsible] +==== For information about REST API v2 enhancements, see xref:rest-apiv2-changelog.adoc[REST API v2.0 changelog]. +==== == Version 10.12.0.cl -=== Liveboard grouping and styling [beta betaBackground]^Beta^ - +.Liveboard grouping and styling [beta betaBackground]^Beta^ +[%collapsible] +==== You can now create a visual group of Answers and note tiles on an embedded Liveboard and customize the look and feel of the Liveboard, groups, and visualizations using the new styling panel. The Liveboard styling and grouping feature is disabled by default on embedded apps. To enable this feature on your embed, set `isLiveboardStylingAndGroupingEnabled` to `true` in the SDK and contact ThoughtSpot Support. @@ -136,13 +194,16 @@ When this feature is enabled, you can use the following CSS variables in the Vis * `--ts-var-liveboard-group-tile-description-font-color` For more information, see xref:customize-css-styles.adoc#grp-style[CSS variables reference]. - -=== Lazy loading of visualizations on a Liveboard - +==== +.Lazy loading of visualizations on a Liveboard +[%collapsible] +==== To optimize initial load time, you can now enable lazy loading of Liveboard visualizations using the `lazyLoadingForFullHeight` parameter. When both `fullHeight` and `lazyLoadingForFullHeight` attributes are set to `true`, visualizations in the embedded Liveboard are loaded incrementally as the user scrolls, rather than all at once on initial load. For more information, see xref:lazy-loading-fullheight.adoc[Lazy loading of Liveboard visualizations]. +==== -=== Spotter embed enhancements - +.Spotter embed enhancements +[%collapsible] +==== Spotter coaching:: Your application users can now coach Spotter based on an ongoing conversation. The *Add to coaching* feature is turned off by default on ThoughtSpot instances. To enable this feature, contact your administrator. @@ -151,34 +212,46 @@ Spotter Agent embedding:: To embed Spotter Agent in a React app, the SDK provides a React component and the `useSpotterAgent` custom React hook. For more information, see xref:embed-ts-react-app.adoc#_embed_spotter_agent_in_your_own_app[Embed Spotter Agent in your React app]. For information about the other SDK enhancements, see xref:_visual_embed_changelog[Visual Embed Changelog]. +==== -=== Full application embed +.Full application embed +[%collapsible] +==== In full application embed, developers can now enable the new navigation panel and home page experience. The new experience also organizes the application menu into separate persona-based contextual sections. The new interface also provides a slider to allow users to view or hide the left navigation panel. The new navigation experience is disabled by default and is available for Early Access. To enable this feature on your instance, contact your ThoughtSpot administrator and then configure the xref:AppViewConfig.adoc#_discoveryexperience[`discovery experience`] property in the SDK. +==== -=== REST API - +.REST API +[%collapsible] +==== +[discrete] ==== Connection configuration APIs ThoughtSpot now supports multiple configurations per data Connection. This feature allows data engineers to define and manage several distinct Connection configurations under a single data Connection object in ThoughtSpot. This feature is available only for Snowflake, Databricks, and BigQuery Cloud Data Warehouses (CDW) connections. For more information, see xref:connection-config.adoc[Connection Configuration]. +[discrete] ==== Custom calendar APIs You can now create and manage custom calendars for a given Connection object. For more information, see the API documentation in the REST API v2 Playground. For information about REST API v2 enhancements, see xref:rest-apiv2-changelog.adoc[REST API v2.0 changelog]. +[discrete] ==== Other enhancements For information about other REST API v2 enhancements, see xref:rest-apiv2-changelog.adoc[REST API v2.0 changelog]. +==== -=== Visual Embed SDK - +.Visual Embed SDK +[%collapsible] +==== For information about the new features and enhancements introduced in Visual Embed SDK version 1.41.0, see xref:api-changelog.adoc[Visual Embed changelog]. +==== == Version 10.11.0.cl -=== Spotter embed enhancements - +.Spotter embed enhancements +[%collapsible] +==== Spotter embed now supports a comprehensive set of embed and host events that enable interaction between the embedded Spotter component and the host application. Developers can use these events to: @@ -191,56 +264,72 @@ For a complete list of events, see the following pages: * xref:api-changelog.adoc[Visual Embed SDK changelog] * xref:EmbedEvent.adoc[EmbedEvent] * xref:HostEvent.adoc[HostEvent] +==== -=== Primary action configuration for Liveboard visualizations - +.Primary action configuration for Liveboard visualizations +[%collapsible] +==== You can now override the action assigned to the primary button that appears on visualization tiles of an embedded Liveboard. The `primaryAction` parameter in the Visual Embed SDK allows developers to set that primary action for the embedded Liveboard visualizations. For more information, see xref:embed-actions.adoc#_override_default_primary_actions[Override default primary action]. +==== -=== Enhancements to the API response format for Liveboards - +.Enhancements to the API response format for Liveboards +[%collapsible] +==== The `liveboard_reponse_version` parameter in search metadata (`/api/rest/2.0/metadata/search`) REST API request now allows you to retrieve details of Liveboard tabs, visualizations, and filters in a structured format. For more information, see xref:rest-api-v2-metadata-search.adoc#_response_format_for_liveboards[Response format for Liveboard objects]. +==== -=== Visual Embed SDK - +.Visual Embed SDK +[%collapsible] +==== For information about the new features and enhancements introduced in Visual Embed SDK version 1.40.0, see xref:api-changelog.adoc[Visual Embed changelog]. +==== -=== REST API +.REST API +[%collapsible] +==== For information about REST API v2 enhancements, see xref:rest-apiv2-changelog.adoc[REST API v2.0 changelog]. +==== == Version 10.10.0.cl -=== Email customization per Org [beta betaBackground]^Beta^ +.Email customization per Org [beta betaBackground]^Beta^ +[%collapsible] +==== ThoughtSpot embedded users can now customize their automated email notifications for each Org through REST APIs v2. You can customize features such as the company logo, style, and fonts, visibility of components in the template, and ThoughtSpot-specific content in notification emails, thus ensuring a consistent brand experience. For more information, see xref:customize-email-apis.adoc[Customize email template]. [NOTE] -==== These APIs are currently in beta and turned off by default on ThoughtSpot instances. To enable this feature on your instance, contact ThoughtSpot Support. ==== -=== Publishing content to Orgs [beta betaBackground]^Beta^ +.Publishing content to Orgs [beta betaBackground]^Beta^ +[%collapsible] +==== The publishing feature enables administrators to publish objects from the Primary Org to other Orgs within a multi-tenant instance. This feature simplifies the deployment process for ThoughtSpot administrators, especially when the same object needs to be made available to multiple Orgs within an instance. It also eliminates the need to create duplicate copies of the object, thereby optimizing memory usage. The publishing feature includes a set of REST APIs that ThoughtSpot administrators can use to create and assign variables, parameterize properties of underlying data objects such as Connections and Tables per Org, and publish objects from the Primary Org to other Orgs on their instance. For more information, see xref:publishing-overview.adoc[Publishing content to Orgs]. [NOTE] -==== The publishing feature is in beta and turned off by default on ThoughtSpot instances. To enable this feature on your instance, contact ThoughtSpot Support. ==== - -=== Visual Embed SDK - +.Visual Embed SDK +[%collapsible] +==== For information about the new features and enhancements introduced in Visual Embed SDK version 1.39.x, see xref:api-changelog.adoc[Visual Embed changelog]. +==== -=== REST API +.REST API +[%collapsible] +==== For information about REST API v2 enhancements, see xref:rest-apiv2-changelog.adoc[REST API v2.0 changelog]. +==== == Version 10.9.0.cl diff --git a/src/assets/icons/favicon.svg b/src/assets/icons/favicon.svg index 6e40eb14a..afaaef01a 100644 --- a/src/assets/icons/favicon.svg +++ b/src/assets/icons/favicon.svg @@ -1,3 +1,7 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 37989f177..f65951de8 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -232,8 +232,16 @@ button { color: $tag-font-color; } .tag.tick.greyBackground { - background-color: var(--body-background-color); + background-color: #cccdcd; color: var(--primary-color); + border-radius: $tag-border-radius; + display: inline-flex; + font-size: 13px !important; + font-weight: $tag-font-weight !important; + min-height: 16px; + margin-right: $tag-margin-right; + align-items: center; + padding: 9px 5px; } .version { @@ -362,7 +370,7 @@ button { border-radius: 10px; height: auto; width: 100%; - padding: $padding-sm $padding-sm $padding-sm $padding-md; + padding: 0 $padding-md $padding-md $padding-md; background-color: var(--announcement-block-color); } diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index 4b286002f..8147c15a1 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -168,7 +168,7 @@ $tag-color-light: $lightgrey; --header-link-color: #404040; --nav-bar-color: #f6f8fa; --breadcrums-font-color: #5f6368; - --announcement-block-color: #f1f1f1; + --announcement-block-color: #e1e1e1; --admonition-background: #fff; --code-block-color: #283142; --code-text-color: #eceff1; diff --git a/src/configs/doc-configs.js b/src/configs/doc-configs.js index 4a7ea3d7d..8dbb29f35 100644 --- a/src/configs/doc-configs.js +++ b/src/configs/doc-configs.js @@ -35,7 +35,7 @@ module.exports = { }, VERSION_DROPDOWN: [ { - label: '10.14.0.cl', + label: '10.15.0.cl', link: ' ', subLabel: 'Cloud', }, @@ -45,54 +45,6 @@ module.exports = { subLabel: 'Cloud (Now available)', iframeUrl: 'https://developer-docs-10-15-0-cl.vercel.app/docs/', }, - { - label: '10.13.0.cl', - link: '10.13.0.cl', - subLabel: 'Cloud', - iframeUrl: 'https://developer-docs-10-13-0-cl.vercel.app/docs/', - }, - { - label: '10.12.0.cl', - link: '10.12.0.cl', - subLabel: 'Cloud', - iframeUrl: 'https://developer-docs-10-12-0-cl.vercel.app/docs/', - }, - { - label: '10.10.0.sw', - link: '10.10.0.sw', - subLabel: 'Software (Latest)', - iframeUrl: 'https://visual-embed-sdk-10-10.vercel.app/docs/', - }, - { - label: '10.1.0.sw', - link: '10.1.0.sw', - subLabel: 'Software', - iframeUrl: 'https://visual-embed-sdk-10-1.vercel.app/docs/', - }, - //{ - // label: '10.11.0.cl', - // link: '10.11.0.cl', - // subLabel: 'Cloud', - // iframeUrl: 'https://developer-docs-10-11-0-cl.vercel.app/docs/', - //}, - //{ - // label: '10.10.0.cl', - // link: '10.10.0.cl', - // subLabel: 'Cloud', - // iframeUrl: 'https://developer-docs-10-10-0-cl.vercel.app/docs/', - //}, - //{ - // label: '10.9.0.cl', - // link: '10.9.0.cl', - // subLabel: 'Cloud', - // iframeUrl: 'https://developer-docs-10-9-0-cl.vercel.app/docs/', - //}, - //{ - // label: '10.8.0.cl', - // link: '10.8.0.cl', - // subLabel: 'Cloud', - // iframeUrl: 'https://developer-docs-10-8-0-cl.vercel.app/docs', - //}, ], CUSTOM_PAGE_ID: { API_PLAYGROUND: 'restV2-playground', diff --git a/static/doc-images/images/formula-variable-error.png b/static/doc-images/images/formula-variable-error.png new file mode 100644 index 000000000..1d70b0e0c Binary files /dev/null and b/static/doc-images/images/formula-variable-error.png differ diff --git a/static/doc-images/images/lb-grp-styling-error.png b/static/doc-images/images/lb-grp-styling-error.png new file mode 100644 index 000000000..70a9423e1 Binary files /dev/null and b/static/doc-images/images/lb-grp-styling-error.png differ diff --git a/static/doc-images/images/megaphone_ts.png b/static/doc-images/images/megaphone_ts.png new file mode 100644 index 000000000..dd7cd007f Binary files /dev/null and b/static/doc-images/images/megaphone_ts.png differ diff --git a/static/doc-images/images/new-nav3.png b/static/doc-images/images/new-nav3.png index 6b314561d..aa643a070 100644 Binary files a/static/doc-images/images/new-nav3.png and b/static/doc-images/images/new-nav3.png differ