From 02f6f932ef0cfe8fa617c9798789fcd84c9b923e Mon Sep 17 00:00:00 2001 From: Rani Gangwar Date: Sat, 14 Nov 2026 17:59:23 +0530 Subject: [PATCH 1/3] SCAL-326843 --- modules/ROOT/pages/abac_rls-variables.adoc | 4 ++-- modules/ROOT/pages/variables.adoc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/abac_rls-variables.adoc b/modules/ROOT/pages/abac_rls-variables.adoc index af397f454..2c03b484d 100644 --- a/modules/ROOT/pages/abac_rls-variables.adoc +++ b/modules/ROOT/pages/abac_rls-variables.adoc @@ -16,7 +16,7 @@ RLS rules are defined on table objects, which bind dynamically generated `WHERE` RLS rules have a defined set of system variables such as `ts_username` or `ts_groups`. Once ABAC via RLS is enabled, the `ts_var()` formula is available within the RLS rule editor to refer to any defined Formula variable within ThoughtSpot. -Formula variables are custom variables defined within ThoughtSpot that enable dynamic and context-aware logic in RLS rules. They are assigned at the user level during session creation for the ABAC pattern, although they can be set at Org and data model levels as well. +Formula variables are custom variables defined within ThoughtSpot that enable dynamic and context-aware logic in RLS rules. They are assigned at the user level during session creation for the ABAC pattern, although they can also be set at the Org level and at the user + Model level. Setting values for a user group (`principal_type` set to `USER_GROUP`) is not supported and results in an error. === Supported operators @@ -273,7 +273,7 @@ To change formula variable attributes of a user, especially to set entitlements The `RESET` operation erases all variable value settings for all users for a variable, regardless of any `variable_value_scope` provided. Use with caution; it is a complete reset. ==== -A formula variable exists across all Orgs in ThoughtSpot, but the values are recorded on a per Org and per Principal basis. To use the Update Variable Values REST API, you'll need to provide the `org_identifier` as well as the username as `principal_identifier` and set `principal_type` to `USER` as seen below: +A formula variable exists across all Orgs in ThoughtSpot, but the values are recorded on a per Org and per user basis. The `USER_GROUP` principal type is not supported for formula variables. To use the Update Variable Values REST API, you'll need to provide the `org_identifier` as well as the username as `principal_identifier` and set `principal_type` to `USER` as seen below: [,json] ---- diff --git a/modules/ROOT/pages/variables.adoc b/modules/ROOT/pages/variables.adoc index 388cbd6f8..0dd930c2d 100644 --- a/modules/ROOT/pages/variables.adoc +++ b/modules/ROOT/pages/variables.adoc @@ -32,7 +32,7 @@ This feature is disabled by default. To enable this option, contact ThoughtSpot ==== * `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. +Formula variables can be set for an Org, user, or user + Model and can be used in RLS rules with the `ts_var` function. Formula variable values cannot be set for a user group. Setting `principal_type` to `USER_GROUP` for a formula variable is not supported and results in an error. + The Variable API allows administrators to define formula variables for the `VARCHAR`, `INT32`, `INT64`, `DOUBLE`, `DATE`, and `DATE_TIME` data types. Formula variables for `BOOLEAN` and `TIME` data types are not supported. @@ -239,7 +239,7 @@ If the update operation is successful, the API returns a 204 response to indicat == Assign or update variable values -To assign values to a variable, use the +++ /api/rest/2.0/template/variables/{identifier}/update-values +++ API endpoint. For example, you can assign values for a formula variable and limit its scope to a specific Org, Model, or user context. Similarly, for the `CONNECTION_PROPERTY_PER_PRINCIPAL` variable type, you can define the principal type as user or user group, and specify the ID of the principal object. +To assign values to a variable, use the +++ /api/rest/2.0/template/variables/{identifier}/update-values +++ API endpoint. For example, you can assign values for a formula variable and limit its scope to a specific Org, user, or user + Model context. Formula variable values cannot be assigned to a user group. For the `CONNECTION_PROPERTY_PER_PRINCIPAL` variable type, you can define the principal type as user or user group, and specify the ID of the principal object. The API also allows you to edit, replace, or reset the values and scope assigned to a variable. @@ -278,7 +278,7 @@ To set the scope for these variable values, define the following properties. The 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__. Principal attributes such as user and user group. -Applicable to the `CONNECTION_PROPERTY_PER_PRINCIPAL` variable type. +Applicable to the `FORMULA_VARIABLE` and `CONNECTION_PROPERTY_PER_PRINCIPAL` variable types. For formula variables, only the `USER` principal type is supported. Setting `principal_type` to `USER_GROUP` for a formula variable results in an error. * `model_identifier`: __Optional__. ID or name of the Model to which the variables configuration must be applied. Applicable to formula variables. From 7f6b789b91da11b0f919405df01d3aa4573848dc Mon Sep 17 00:00:00 2001 From: Rani Gangwar Date: Sat, 14 Nov 2026 18:08:13 +0530 Subject: [PATCH 2/3] SCAL-326843 --- modules/ROOT/pages/abac_rls-variables.adoc | 4 ++-- modules/ROOT/pages/variables.adoc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/abac_rls-variables.adoc b/modules/ROOT/pages/abac_rls-variables.adoc index 2c03b484d..71420c641 100644 --- a/modules/ROOT/pages/abac_rls-variables.adoc +++ b/modules/ROOT/pages/abac_rls-variables.adoc @@ -16,7 +16,7 @@ RLS rules are defined on table objects, which bind dynamically generated `WHERE` RLS rules have a defined set of system variables such as `ts_username` or `ts_groups`. Once ABAC via RLS is enabled, the `ts_var()` formula is available within the RLS rule editor to refer to any defined Formula variable within ThoughtSpot. -Formula variables are custom variables defined within ThoughtSpot that enable dynamic and context-aware logic in RLS rules. They are assigned at the user level during session creation for the ABAC pattern, although they can also be set at the Org level and at the user + Model level. Setting values for a user group (`principal_type` set to `USER_GROUP`) is not supported and results in an error. +Formula variables are custom variables defined within ThoughtSpot that enable dynamic and context-aware logic in RLS rules. They are assigned at the user level during session creation for the ABAC pattern, although they can #also be set at the Org level and at the user + Model level. Setting values for a user group (`principal_type` set to `USER_GROUP`) is not supported and results in an error.# === Supported operators @@ -273,7 +273,7 @@ To change formula variable attributes of a user, especially to set entitlements The `RESET` operation erases all variable value settings for all users for a variable, regardless of any `variable_value_scope` provided. Use with caution; it is a complete reset. ==== -A formula variable exists across all Orgs in ThoughtSpot, but the values are recorded on a per Org and per user basis. The `USER_GROUP` principal type is not supported for formula variables. To use the Update Variable Values REST API, you'll need to provide the `org_identifier` as well as the username as `principal_identifier` and set `principal_type` to `USER` as seen below: +A formula variable exists across all Orgs in ThoughtSpot, but the values are recorded on a per Org and per #user# basis. #The `USER_GROUP` principal type is not supported for formula variables.# To use the Update Variable Values REST API, you'll need to provide the `org_identifier` as well as the username as `principal_identifier` and set `principal_type` to `USER` as seen below: [,json] ---- diff --git a/modules/ROOT/pages/variables.adoc b/modules/ROOT/pages/variables.adoc index 0dd930c2d..0fe1599af 100644 --- a/modules/ROOT/pages/variables.adoc +++ b/modules/ROOT/pages/variables.adoc @@ -32,7 +32,7 @@ This feature is disabled by default. To enable this option, contact ThoughtSpot ==== * `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 user + Model and can be used in RLS rules with the `ts_var` function. Formula variable values cannot be set for a user group. Setting `principal_type` to `USER_GROUP` for a formula variable is not supported and results in an error. +Formula variables can be set for an Org, user, or #user + Model# and can be used in RLS rules with the `ts_var` function. #Formula variable values cannot be set for a user group. Setting `principal_type` to `USER_GROUP` for a formula variable is not supported and results in an error.# + The Variable API allows administrators to define formula variables for the `VARCHAR`, `INT32`, `INT64`, `DOUBLE`, `DATE`, and `DATE_TIME` data types. Formula variables for `BOOLEAN` and `TIME` data types are not supported. @@ -239,7 +239,7 @@ If the update operation is successful, the API returns a 204 response to indicat == Assign or update variable values -To assign values to a variable, use the +++ /api/rest/2.0/template/variables/{identifier}/update-values +++ API endpoint. For example, you can assign values for a formula variable and limit its scope to a specific Org, user, or user + Model context. Formula variable values cannot be assigned to a user group. For the `CONNECTION_PROPERTY_PER_PRINCIPAL` variable type, you can define the principal type as user or user group, and specify the ID of the principal object. +To assign values to a variable, use the +++ /api/rest/2.0/template/variables/{identifier}/update-values +++ API endpoint. For example, you can assign values for a formula variable and limit its scope to a specific Org, #user, or user + Model# context. #Formula variable values cannot be assigned to a user group.# For the `CONNECTION_PROPERTY_PER_PRINCIPAL` variable type, you can define the principal type as user or user group, and specify the ID of the principal object. The API also allows you to edit, replace, or reset the values and scope assigned to a variable. @@ -278,7 +278,7 @@ To set the scope for these variable values, define the following properties. The 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__. Principal attributes such as user and user group. -Applicable to the `FORMULA_VARIABLE` and `CONNECTION_PROPERTY_PER_PRINCIPAL` variable types. For formula variables, only the `USER` principal type is supported. Setting `principal_type` to `USER_GROUP` for a formula variable results in an error. +Applicable to the #`FORMULA_VARIABLE` and# `CONNECTION_PROPERTY_PER_PRINCIPAL` variable #types#. #For formula variables, only the `USER` principal type is supported. Setting `principal_type` to `USER_GROUP` for a formula variable results in an error.# * `model_identifier`: __Optional__. ID or name of the Model to which the variables configuration must be applied. Applicable to formula variables. From c8d169c6e255e7246e998aa5cacdc01f9e3ac9df Mon Sep 17 00:00:00 2001 From: Rani Gangwar Date: Sat, 14 Nov 2026 18:38:51 +0530 Subject: [PATCH 3/3] SCAL-326843-1 --- modules/ROOT/pages/abac_rls-variables.adoc | 2 +- modules/ROOT/pages/variables.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/abac_rls-variables.adoc b/modules/ROOT/pages/abac_rls-variables.adoc index 71420c641..cbd2ea5c5 100644 --- a/modules/ROOT/pages/abac_rls-variables.adoc +++ b/modules/ROOT/pages/abac_rls-variables.adoc @@ -16,7 +16,7 @@ RLS rules are defined on table objects, which bind dynamically generated `WHERE` RLS rules have a defined set of system variables such as `ts_username` or `ts_groups`. Once ABAC via RLS is enabled, the `ts_var()` formula is available within the RLS rule editor to refer to any defined Formula variable within ThoughtSpot. -Formula variables are custom variables defined within ThoughtSpot that enable dynamic and context-aware logic in RLS rules. They are assigned at the user level during session creation for the ABAC pattern, although they can #also be set at the Org level and at the user + Model level. Setting values for a user group (`principal_type` set to `USER_GROUP`) is not supported and results in an error.# +Formula variables are custom variables defined within ThoughtSpot that enable dynamic and context-aware logic in RLS rules. They are assigned at the user level during session creation for the ABAC pattern, although they can #also be set at the Org level, the user level, or at the user + Model level. Setting values for a user group (`principal_type` set to `USER_GROUP`) is not supported and results in an error.# === Supported operators diff --git a/modules/ROOT/pages/variables.adoc b/modules/ROOT/pages/variables.adoc index 0fe1599af..afc4014da 100644 --- a/modules/ROOT/pages/variables.adoc +++ b/modules/ROOT/pages/variables.adoc @@ -272,7 +272,7 @@ Assign values:: To assign variable values, specify the values in the `assigned_values` array. Define scope:: -To set the scope for these variable values, define the following properties. These properties determine the entity level, such as Org, user, or user-group, for which the values will apply. +To set the scope for these variable values, define the following properties. These properties determine the entity level, such as Org or user, for which the values will apply. For formula variables, `user-group` scope is not supported. * `org_identifier`: __Optional__. 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.