diff --git a/gatsby-node.js b/gatsby-node.js
index 2b1ace902..3e82ad911 100644
--- a/gatsby-node.js
+++ b/gatsby-node.js
@@ -3,6 +3,7 @@ const {
DOC_NAV_PAGE_ID,
NOT_FOUND_PAGE_ID,
} = require('./src/configs/doc-configs');
+const { getDocLinkFromEdge } = require('./src/utils/gatsby-utils.js');
exports.onPostBuild = () => {
fsExtra.copyFileSync(
@@ -30,7 +31,6 @@ exports.createPages = async function ({ actions, graphql }) {
relativePath
}
}
-
}
}
}
@@ -39,24 +39,24 @@ exports.createPages = async function ({ actions, graphql }) {
const namePageIdMap = {};
data.allAsciidoc.edges.forEach((e) => {
- const { sourceInstanceName: sourceName, relativePath : relPath } = e.node.parent;
+ const {
+ sourceInstanceName: sourceName,
+ relativePath: relPath,
+ } = e.node.parent;
const pageId = e.node.pageAttributes.pageid;
- if (sourceName === 'tutorials'){
- const relPathSplit = relPath.split('/');
- const pageIdSplit = pageId.split('__');
- let finalPageId = pageId;
- if( pageIdSplit.length > 1) {
+ if (sourceName === 'tutorials') {
+ const relPathSplit = relPath.split('/');
+ const pageIdSplit = pageId.split('__');
+ let finalPageId = pageId;
+ if (pageIdSplit.length > 1) {
finalPageId = pageIdSplit[1];
- }
- let mapPageId = `tutorials/` + finalPageId;
- if(relPathSplit.length > 1) {
- mapPageId = `tutorials/${relPathSplit[0]}/` + finalPageId;
- }
- namePageIdMap[e.node.parent.name] =
- mapPageId || NOT_FOUND_PAGE_ID;
- }
-
- else {
+ }
+ let mapPageId = `tutorials/${finalPageId}`;
+ if (relPathSplit.length > 1) {
+ mapPageId = `tutorials/${relPathSplit[0]}/${finalPageId}`;
+ }
+ namePageIdMap[e.node.parent.name] = mapPageId || NOT_FOUND_PAGE_ID;
+ } else {
namePageIdMap[e.node.parent.name] =
e.node.pageAttributes.pageid || NOT_FOUND_PAGE_ID;
}
@@ -64,41 +64,15 @@ exports.createPages = async function ({ actions, graphql }) {
data.allAsciidoc.edges.forEach((edge) => {
const { pageid: pageId } = edge.node.pageAttributes;
- const { sourceInstanceName: sourceName, relativePath : relPath } = edge.node.parent;
-
- // Tutorials module pageids follow pattern {subdirectory}_{final_url_stub} to give unique IDs in system but allow directory structure in URL
- if (sourceName === 'tutorials'){
- // One-level of subdirectory part of stub
- const relPathSplit = relPath.split('/');
- const pageIdSplit = pageId.split('__');
- let finalPageId = pageId;
- if( pageIdSplit.length > 1) {
- finalPageId = pageIdSplit[1];
- }
-
- let finalPath = `/tutorials/${finalPageId}`;
- if(relPathSplit.length > 1) {
- finalPath = `/tutorials/${relPathSplit[0]}/${finalPageId}`;
- }
-
- actions.createPage({
- path: finalPath,
- component: require.resolve(
- './src/components/DevDocTemplate/index.tsx',
- ),
- context: { pageId, navId: DOC_NAV_PAGE_ID, namePageIdMap },
- });
- }
- else {
- actions.createPage({
- path: `/${pageId}`,
- component: require.resolve(
- './src/components/DevDocTemplate/index.tsx',
- ),
- context: { pageId, navId: DOC_NAV_PAGE_ID, namePageIdMap },
- });
- }
+ const docPath = getDocLinkFromEdge(edge);
+ actions.createPage({
+ path: docPath,
+ component: require.resolve(
+ './src/components/DevDocTemplate/index.tsx',
+ ),
+ context: { pageId, navId: DOC_NAV_PAGE_ID, namePageIdMap },
+ });
if (pageId === 'introduction') {
actions.createPage({
diff --git a/modules/ROOT/pages/abac-user-parameters.adoc b/modules/ROOT/pages/abac-user-parameters.adoc
index 18d5d06d7..1025304e4 100644
--- a/modules/ROOT/pages/abac-user-parameters.adoc
+++ b/modules/ROOT/pages/abac-user-parameters.adoc
@@ -91,7 +91,7 @@ An example of setting both `filter_rules` and `parameter_values` without any per
----
=== Apply to specific objects
-By default, any specified filter or parameter will bind to *any content* with an exact match for the column or Parameter name.
+By default, any specified filter or parameter will bind to any content with an exact match for the column or Parameter name.
You can choose the filter or Parameter to apply only to specific ThoughtSpot objects by including an `objects` array in the following format:
@@ -104,13 +104,17 @@ You can choose the filter or Parameter to apply only to specific ThoughtSpot obj
"identifier": "{id or name of the object}"
},
{
- "type":"LIVEBOARD",
- "identifier": "9bd202f5-d431-44bf-9a07-b4f7be372125"
-
+ "type": "LOGICAL_TABLE",
+ "identifier": "9b751df2-d344-4850-9756-18535797378c"
}
]
----
+[NOTE]
+====
+The only supported object types for data security are logical tables.
+====s
+
[#persistForUser]
=== Token-based override versus persisting values
When using a `persist_option` other than `NONE`, the *filter_rules* and *parameter_values* defined in the token request using the `auth/token/custom` API endpoint are stored in the `user` > `access_control_properties` object.
diff --git a/modules/ROOT/pages/rest-api-v2-reference.adoc b/modules/ROOT/pages/rest-api-v2-reference.adoc
index d60176c6c..660c7f367 100644
--- a/modules/ROOT/pages/rest-api-v2-reference.adoc
+++ b/modules/ROOT/pages/rest-api-v2-reference.adoc
@@ -12,6 +12,32 @@ This API Reference page lists the REST API v2.0 endpoints and provides basic inf
Access to ThoughtSpot data is controlled based on xref:api-user-management.adoc#group-privileges[user privileges] and xref:configure-user-access.adoc#_object_level_permissions[object-level permissions]. Some operations are available to all users and may require at least view access to the metadata object. ThoughtSpot users are assigned access privileges based on the group to which they belong. Additionally, object owners can control access to a metadata object using `MODIFY` (*Can edit*), `READ_ONLY` (*Can view*), or `NO_ACCESS` permission when sharing an object with other users and groups.
====
+== AI [beta betaBackground]^Beta^
+
+[div boxAuto]
+--
+[width="100%" cols="6,4,2"]
+[options='header']
+|=====
+|API endpoint| Release version | Playground link
+
+a|`POST /api/rest/2.0/ai/conversation/create` +
+Creates a conversation session with ThoughtSpot Spotter, your AI Analyst.
+|ThoughtSpot Cloud: __10.4.0.cl or later__ +
+ThoughtSpot Software: __Not available__ a| +++Try it out+++
+a| `POST /api/rest/2.0/ai/conversation/{conversation_identifier}/converse` +
+Generates responses to user queries and follow-up questions sent in the specified conversation session.
+|ThoughtSpot Cloud: __10.4.0.cl or later__ +
+ThoughtSpot Software: __Not available__ a| +++Try it out+++
+
+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+++
+
+|=====
+--
+
== Authentication
[div boxAuto]
@@ -72,7 +98,7 @@ ThoughtSpot Software: __10.7.0.sw or later__ a| +++Try it out+++
-
-a|`POST /api/rest/2.0/users/create` +
-Creates a user.
-
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
-
-a|`POST /api/rest/2.0/users/{user_identifier}/update` +
-Updates the properties of a user object.
-
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out +++
-
-a| `POST /api/rest/2.0/users/{user_identifier}/delete` +
+a|`POST /api/rest/2.0/connection/search` +
-Deletes a user object from ThoughtSpot.
+Gets connection objects from ThoughtSpot.
-a|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a|
-+++Try it out +++
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
-a|`POST /api/rest/2.0/users/import` +
-Gets an authentication token from ThoughtSpot that grants access to a full application session.
+a|`POST /api/rest/2.0/connection/create`
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a|
-+++Try it out +++
+Creates a connection to the data warehouse specified in the API request.
-a|`POST /api/rest/2.0/users/change-password` +
-Allows ThoughtSpot users to change the password of their account.
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a|
-+++Try it out +++
+a|`POST /api/rest/2.0/connection/update` [tag redBackground]#DEPRECATED# +
-a|`POST /api/rest/2.0/users/reset-password` +
-Resets the password of a user account.
+Updates a connection object.
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a|
-+++Try it out +++
+__Note: This API endpoint is deprecated in ThoughtSpot 10.4.0.cl and later versions. To update a connection, use `/api/rest/2.0/connections/update/{connection_identifier}`. __
-a|`POST /api/rest/2.0/users/force-logout` +
-Logs out a users from their current sessions.
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
+a| `POST /api/rest/2.0/connections/{connection_identifier}/update` +
+Updates a connection object.
+a|ThoughtSpot Cloud: __10.4.0.cl or later__ +
+ThoughtSpot Software: __10.7.0.sw or later__ a|
++++Try it out +++
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out +++
-a|`POST /api/rest/2.0/users/activate` +
+a|`POST /api/rest/2.0/connection/delete` [tag redBackground]#DEPRECATED# +
+Deletes a connection object.
-Activates a deactivated user account.
+__Note: This API endpoint is deprecated in ThoughtSpot 10.4.0.cl and later versions. To delete a connection, use `api/rest/2.0/connections/delete/{connection_identifier}`. __
-|ThoughtSpot Cloud: __9.7.0.cl or later__ +
-ThoughtSpot Software: __9.8.0.sw or later__ a| +++Try it out +++
+a|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
-|`POST /api/rest/2.0/users/deactivate` +
-Deactivates a user account.
+a| `POST /api/rest/2.0/connections/{connection_identifier}/delete` +
+Deletes a connection
+a|ThoughtSpot Cloud: __10.4.0.cl or later__ +
+ThoughtSpot Software: __10.7.0.sw or later__ a|
++++Try it out +++
-|ThoughtSpot Cloud: __9.7.0.cl or later__ +
-ThoughtSpot Software: __9.8.0.sw or later__ a| +++Try it out +++
+a|
+`POST /api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}` +
+Validates the connection metadata differences between Cloud Data Warehouse and ThoughtSpot.
+|ThoughtSpot Cloud: __9.10.5.cl or later__ +
+ThoughtSpot Software: __10.0.0.sw or later__
+a|+++Try it out +++
+a|
+`POST /api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}` +
+Downloads connection metadata differences between Cloud Data Warehouse and ThoughtSpot.
+|ThoughtSpot Cloud: __9.10.5.cl or later__ +
+ThoughtSpot Software: __10.0.0.sw or later__
+a|
++++Try it out +++
|=====
--
-== System
+== Custom actions
[div boxAuto]
--
[width="100%" cols="6,4,2"]
[options='header']
|=====
-|API endpoint| Release version| Playground link
-a|`Get System Information` +
-Gets system information of your current logged-in cluster.
+|API endpoint| Release version | Playground link
+a|`POST /api/rest/2.0/customization/custom-actions/search` +
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
+Gets custom action objects.
-a|`GET /api/rest/2.0/system` +
-Gets details of the current configuration running on your cluster.
+|ThoughtSpot Cloud: __9.6.0.cl or later__ +
+ThoughtSpot Software: __9.8.0.sw or later__ a| +++Try it out+++
+a|`POST /api/rest/2.0/customization/custom-actions`
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
+Creates a custom action and assigns it to a given metadata object.
-a|`GET /api/rest/2.0/system/config-overrides` +
-Gets details of the configuration overrides on your cluster.
+|ThoughtSpot Cloud: __9.6.0.cl or later__ +
+ThoughtSpot Software: __9.8.0.sw or later__ a| +++Try it out+++
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
+a|`POST /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update` +
-a| `POST /api/rest/2.0/system/config-update` +
+Updates the properties of a custom action object.
-Gets details of the current configuration running on your cluster.
+|ThoughtSpot Cloud: __9.6.0.cl or later__ +
+ThoughtSpot Software: __9.8.0.sw or later__ a|
++++Try it out +++
-a|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.1.sw or later__ a| +++Try it out +++
+a|`POST /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete` +
+
+Deletes a custom action.
+
+|ThoughtSpot Cloud: __9.6.0.cl or later__ +
+ThoughtSpot Software: __9.8.0.sw or later__ a|
++++Try it out +++
|=====
--
-== Orgs
+
+== Data
[div boxAuto]
--
@@ -194,36 +216,31 @@ ThoughtSpot Software: __9.5.1.sw or later__ a| +++Try it out+++
+Generates results for the search query specified in the API request.
-a|`POST /api/rest/2.0/orgs/create` +
-Creates an Org object. +
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __Not Applicable__ a| +++Try it out+++
+a|`POST /api/rest/2.0/metadata/liveboard/data`
-a|`POST /api/rest/2.0/orgs/{org_identifier}/update` +
-Modifies the object properties of an Org.
+Gets details of a Liveboard and its visualizations.
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __Not Applicable__ a|
-+++Try it out +++
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
-a| `POST /api/rest/2.0/orgs/{org_identifier}/delete` +
+a|`POST /api/rest/2.0/metadata/answer/data` +
-Deletes an Org object from ThoughtSpot.
+Gets Answer data from ThoughtSpot. You can fetch data for saved Answers only.
-a|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __Not Applicable__ a|
-+++Try it out +++
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a|
++++Try it out +++
|=====
--
-== Tags
+== DBT
[div boxAuto]
--
@@ -231,50 +248,48 @@ ThoughtSpot Software: __Not Applicable__ a|
[options='header']
|=====
|API endpoint| Release version | Playground link
-a|`POST /api/rest/2.0/tags/search` +
-Gets details of tag objects from ThoughtSpot.
+a|`POST /api/rest/2.0/dbt/dbt-connection` +
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
+Creates a DBT connection object in ThoughtSpot.
-a|`POST /api/rest/2.0/tags/create` +
-Creates a tag object in ThoughtSpot. +
+|ThoughtSpot Cloud: __9.10.0.cl or later__ +
+ThoughtSpot Software: __10.0.0.sw or later__ a| +++Try it out+++
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
+a|`POST /api/rest/2.0/dbt/generate-tml` +
-a|`POST /api/rest/2.0/tags/{tag_identifier}/update` +
-Modifies the object properties of a tag. +
+Creates TML for the given data objects and imports the TML data to ThoughtSpot.
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a|
-+++Try it out +++
+|ThoughtSpot Cloud: __9.10.0.cl or later__ +
+ThoughtSpot Software: __10.0.0.sw or later__ a|
++++Try it out +++
-a| `POST /api/rest/2.0/tags/{tag_identifier}/delete` +
+a|`POST /api/rest/2.0/dbt/generate-sync-tml` +
-Deletes an Org object from ThoughtSpot.
+Resynchronizes the existing list of Models, Tables, and Worksheet TML content for the specified DBT connection object and imports these to Thoughtspot.
-a|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a|
-+++Try it out +++
+|ThoughtSpot Cloud: __9.10.0.cl or later__ +
+ThoughtSpot Software: __10.0.0.sw or later__ a|
++++Try it out +++
-a|`POST /api/rest/2.0/tags/assign` +
-Assigns a tag to metadata objects.
+a|`POST /api/rest/2.0/dbt/search` +
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a|
-+++Try it out +++
+Gets a list of DBT connection objects.
-a| `POST /api/rest/2.0/tags/unassign` +
+|ThoughtSpot Cloud: __9.10.0.cl or later__ +
+ThoughtSpot Software: __10.0.0.sw or later__ a|
++++Try it out +++
-Removes the tag assigned to a metadata object.
-a|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a|
-+++Try it out +++
+a|`POST /api/rest/2.0/dbt/{dbt_connection_identifier}`
+
+Updates a DBT connection object.
+
+|ThoughtSpot Cloud: __9.10.0.cl or later__ +
+ThoughtSpot Software: __10.0.0.sw or later__ a| +++Try it out+++
|=====
--
+
== Groups
[div boxAuto]
@@ -321,7 +336,7 @@ ThoughtSpot Software: __9.0.1.sw or later__ a|
|=====
--
-== Metadata
+== Logs
[div boxAuto]
--
@@ -329,8 +344,27 @@ ThoughtSpot Software: __9.0.1.sw or later__ a|
[options='header']
|=====
|API endpoint| Release version | Playground link
-a|`POST /api/rest/2.0/metadata/search` +
-Gets details of metadata objects from ThoughtSpot.
+a|`POST /api/rest/2.0/logs/fetch` +
+
+Gets security audit logs from the ThoughtSpot system.
+
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __Not applicable__ a| +++Try it out+++
+
+|=====
+--
+
+
+== Metadata
+
+[div boxAuto]
+--
+[width="100%" cols="6,4,2"]
+[options='header']
+|=====
+|API endpoint| Release version | Playground link
+a|`POST /api/rest/2.0/metadata/search` +
+Gets details of metadata objects from ThoughtSpot.
|ThoughtSpot Cloud: __9.0.0.cl or later__ +
ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
@@ -395,6 +429,44 @@ ThoughtSpot Software: __9.0.1.sw or later__ a|
|=====
--
+
+== Orgs
+
+[div boxAuto]
+--
+[width="100%" cols="6,4,2"]
+[options='header']
+|=====
+|API endpoint| Release version | Playground link
+a|`POST /api/rest/2.0/orgs/search` +
+Gets a list of Orgs configured on the ThoughtSpot system.
+
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __Not Applicable__ a| +++Try it out+++
+
+a|`POST /api/rest/2.0/orgs/create` +
+Creates an Org object. +
+
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __Not Applicable__ a| +++Try it out+++
+
+a|`POST /api/rest/2.0/orgs/{org_identifier}/update` +
+Modifies the object properties of an Org.
+
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __Not Applicable__ a|
++++Try it out +++
+
+a| `POST /api/rest/2.0/orgs/{org_identifier}/delete` +
+
+Deletes an Org object from ThoughtSpot.
+
+a|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __Not Applicable__ a|
++++Try it out +++
+|=====
+--
+
== Reports
[div boxAuto]
@@ -418,6 +490,93 @@ ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
+
+a|`POST /api/rest/2.0/roles/create`
+
+Creates a Role with a defined set of privileges.
+
+|ThoughtSpot Cloud: __9.5.0.cl or later__ +
+ThoughtSpot Software: __Not applicable__ a| +++Try it out+++
+
+a|`POST /api/rest/2.0/roles/{role_identifier}/update` +
+
+Updates a Role object.
+
+|ThoughtSpot Cloud: __9.5.0.cl or later__ +
+ThoughtSpot Software: __Not applicable__ a|
++++Try it out +++
+
+
+a|`POST /api/rest/2.0/roles/{role_identifier}/delete` +
+
+Deletes a Role object.
+
+|ThoughtSpot Cloud: __9.5.0.cl or later__ +
+ThoughtSpot Software: __Not applicable__ a|
++++Try it out +++
+|=====
+--
+
+
+== Schedules
+
+[div boxAuto]
+--
+[width="100%" cols="6,4,2"]
+[options='header']
+|=====
+|API endpoint| Release version | Playground link
+a|`POST /api/rest/2.0/schedules/create` +
+
+Creates a Liveboard schedule job.
+
+|ThoughtSpot Cloud: __9.4.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
+
+a|`POST /api/rest/2.0/schedules/search` +
+
+Gets details of the scheduled Liveboard jobs.
+
+|ThoughtSpot Cloud: __9.4.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
+
+a|`POST /api/rest/2.0/schedules/{schedule_identifier}/update` +
+
+Updates a Liveboard job schedule.
+
+|ThoughtSpot Cloud: __9.4.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
+
+
+a|`POST /api/rest/2.0/schedules/{schedule_identifier}/delete`
+
+Deletes a scheduled Liveboard job.
+
+|ThoughtSpot Cloud: __9.4.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
+
+|=====
+--
+
== Security
[div boxAuto]
@@ -456,40 +615,45 @@ ThoughtSpot Software: __9.0.1.sw or later__ a|
|=====
--
-== Data
+== System
[div boxAuto]
--
[width="100%" cols="6,4,2"]
[options='header']
|=====
-|API endpoint| Release version | Playground link
-a|`POST /api/rest/2.0/searchdata` +
-
-Generates results for the search query specified in the API request.
+|API endpoint| Release version| Playground link
+a|`Get System Information` +
+Gets system information of your current logged-in cluster.
|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
-a|`POST /api/rest/2.0/metadata/liveboard/data`
+a|`GET /api/rest/2.0/system` +
+Gets details of the current configuration running on your cluster.
-Gets details of a Liveboard and its visualizations.
|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
-a|`POST /api/rest/2.0/metadata/answer/data` +
+a|`GET /api/rest/2.0/system/config-overrides` +
+Gets details of the configuration overrides on your cluster.
-Gets Answer data from ThoughtSpot. You can fetch data for saved Answers only.
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
-|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __9.0.1.sw or later__ a|
-+++Try it out +++
+a| `POST /api/rest/2.0/system/config-update` +
+
+Gets details of the current configuration running on your cluster.
+
+a|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.1.sw or later__ a| +++Try it out +++
|=====
--
-== Audit logs
+== Tags
[div boxAuto]
--
@@ -497,17 +661,55 @@ ThoughtSpot Software: __9.0.1.sw or later__ a|
[options='header']
|=====
|API endpoint| Release version | Playground link
-a|`POST /api/rest/2.0/logs/fetch` +
+a|`POST /api/rest/2.0/tags/search` +
+Gets details of tag objects from ThoughtSpot.
-Gets security audit logs from the ThoughtSpot system.
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
+
+a|`POST /api/rest/2.0/tags/create` +
+Creates a tag object in ThoughtSpot. +
|ThoughtSpot Cloud: __9.0.0.cl or later__ +
-ThoughtSpot Software: __Not applicable__ a| +++Try it out+++
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
+
+a|`POST /api/rest/2.0/tags/{tag_identifier}/update` +
+Modifies the object properties of a tag. +
+
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a|
++++Try it out +++
+
+a| `POST /api/rest/2.0/tags/{tag_identifier}/delete` +
+
+Deletes an Org object from ThoughtSpot.
+
+a|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a|
++++Try it out +++
+
+a|`POST /api/rest/2.0/tags/assign` +
+Assigns a tag to metadata objects.
+
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a|
++++Try it out +++
+
+a| `POST /api/rest/2.0/tags/unassign` +
+
+Removes the tag assigned to a metadata object.
+a|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a|
++++Try it out +++
|=====
--
-== Version control
+
+
+
+
+== Users
[div boxAuto]
--
@@ -515,77 +717,76 @@ ThoughtSpot Software: __Not applicable__ a| +++Try it out+++
-a|`POST /api/rest/2.0/vcs/git/commits/search` +
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
-Gets Git commit history for a given metadata object.
+a|`POST /api/rest/2.0/users/create` +
+Creates a user.
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out+++
-a|`POST /api/rest/2.0/vcs/git/config/create` +
-Connects your ThoughtSpot instance to a Git repository.
+a|`POST /api/rest/2.0/users/{user_identifier}/update` +
+Updates the properties of a user object.
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out +++
-a| `POST /api/rest/2.0/vcs/git/config/update` +
+a| `POST /api/rest/2.0/users/{user_identifier}/delete` +
-Updates the Git repository settings configured for a ThoughtSpot instance.
+Deletes a user object from ThoughtSpot.
-a|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
-
-a|`POST /api/rest/2.0/vcs/git/config/delete` +
-
-Deletes the Git repository configuration.
+a|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a|
++++Try it out +++
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
+a|`POST /api/rest/2.0/users/import` +
+Gets an authentication token from ThoughtSpot that grants access to a full application session.
-a|`POST /api/rest/2.0/vcs/git/branches/commit`
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a|
++++Try it out +++
-Commits TML files to the Git branch configured on your instance.
+a|`POST /api/rest/2.0/users/change-password` +
+Allows ThoughtSpot users to change the password of their account.
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a|
++++Try it out +++
-a|`POST /api/rest/2.0/vcs/git/commits/{commit_id}/revert`
+a|`POST /api/rest/2.0/users/reset-password` +
+Resets the password of a user account.
-Reverts to a previous commit in the Git branch.
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a|
++++Try it out +++
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
+a|`POST /api/rest/2.0/users/force-logout` +
+Logs out a users from their current sessions.
-a|`POST /api/rest/2.0/vcs/git/branches/validate`
-Validates the content of your source branch against the objects in your destination environment and identifies merge conflicts.
+|ThoughtSpot Cloud: __9.0.0.cl or later__ +
+ThoughtSpot Software: __9.0.1.sw or later__ a| +++Try it out +++
+a|`POST /api/rest/2.0/users/activate` +
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
+Activates a deactivated user account.
-a|`POST /api/rest/2.0/vcs/git/commits/deploy`
+|ThoughtSpot Cloud: __9.7.0.cl or later__ +
+ThoughtSpot Software: __9.8.0.sw or later__ a| +++Try it out +++
-Deploys commits to the destination environment (`Staging` or `Production`).
+|`POST /api/rest/2.0/users/deactivate` +
+Deactivates a user account.
-|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
+|ThoughtSpot Cloud: __9.7.0.cl or later__ +
+ThoughtSpot Software: __9.8.0.sw or later__ a| +++Try it out +++
|=====
--
-== Connections
+== Version control
[div boxAuto]
--
@@ -593,267 +794,72 @@ ThoughtSpot Software: __9.5.0.sw or later__ a|
[options='header']
|=====
|API endpoint| Release version | Playground link
-a|`POST /api/rest/2.0/connection/search` +
-
-Gets connection objects from ThoughtSpot.
+a| `POST /api/rest/2.0/vcs/git/config/search` +
+Gets Git repository connections configured on the ThoughtSpot instance.
|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
+ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
-a|`POST /api/rest/2.0/connection/create`
+a|`POST /api/rest/2.0/vcs/git/commits/search` +
-Creates a connection to the data warehouse specified in the API request.
+Gets Git commit history for a given metadata object.
|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
-
-a|`POST /api/rest/2.0/connection/update` [tag redBackground]#DEPRECATED# +
-
-Updates a connection object.
+ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
-__Note: This API endpoint is deprecated in ThoughtSpot 10.4.0.cl and later versions. To update a connection, use `/api/rest/2.0/connections/update/{connection_identifier}`. __
+a|`POST /api/rest/2.0/vcs/git/config/create` +
+Connects your ThoughtSpot instance to a Git repository.
|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
-
-a| `POST /api/rest/2.0/connections/{connection_identifier}/update` +
-Updates a connection object.
-a|ThoughtSpot Cloud: __10.4.0.cl or later__ +
-ThoughtSpot Software: __10.7.0.sw or later__ a|
-+++Try it out +++
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
-a|`POST /api/rest/2.0/connection/delete` [tag redBackground]#DEPRECATED# +
-Deletes a connection object.
+a| `POST /api/rest/2.0/vcs/git/config/update` +
-__Note: This API endpoint is deprecated in ThoughtSpot 10.4.0.cl and later versions. To delete a connection, use `api/rest/2.0/connections/delete/{connection_identifier}`. __
+Updates the Git repository settings configured for a ThoughtSpot instance.
a|ThoughtSpot Cloud: __9.2.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
-
-a| `POST /api/rest/2.0/connections/{connection_identifier}/delete` +
-Deletes a connection
-a|ThoughtSpot Cloud: __10.4.0.cl or later__ +
-ThoughtSpot Software: __10.7.0.sw or later__ a|
-+++Try it out +++
-
-a|
-`POST /api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}` +
-Validates the connection metadata differences between Cloud Data Warehouse and ThoughtSpot.
-|ThoughtSpot Cloud: __9.10.5.cl or later__ +
-ThoughtSpot Software: __10.0.0.sw or later__
-a|+++Try it out +++
-a|
-`POST /api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}` +
-Downloads connection metadata differences between Cloud Data Warehouse and ThoughtSpot.
-|ThoughtSpot Cloud: __9.10.5.cl or later__ +
-ThoughtSpot Software: __10.0.0.sw or later__
-a|
-+++Try it out +++
-|=====
---
-
-
-[#rbacRoles]
-== Roles
-
-[div boxAuto]
---
-[width="100%" cols="6,4,2"]
-[options='header']
-|=====
-|API endpoint| Release version | Playground link
-a|`POST /api/rest/2.0/roles/search` +
-
-Gets Role objects from ThoughtSpot.
-
-|ThoughtSpot Cloud: __9.5.0.cl or later__ +
-ThoughtSpot Software: __Not applicable__ a| +++Try it out+++
-
-a|`POST /api/rest/2.0/roles/create`
-
-Creates a Role with a defined set of privileges.
-
-|ThoughtSpot Cloud: __9.5.0.cl or later__ +
-ThoughtSpot Software: __Not applicable__ a| +++Try it out+++
-
-a|`POST /api/rest/2.0/roles/{role_identifier}/update` +
-
-Updates a Role object.
-
-|ThoughtSpot Cloud: __9.5.0.cl or later__ +
-ThoughtSpot Software: __Not applicable__ a|
-+++Try it out +++
-
-
-a|`POST /api/rest/2.0/roles/{role_identifier}/delete` +
-
-Deletes a Role object.
-
-|ThoughtSpot Cloud: __9.5.0.cl or later__ +
-ThoughtSpot Software: __Not applicable__ a|
-+++Try it out +++
-|=====
---
-
-== Custom actions
-
-[div boxAuto]
---
-[width="100%" cols="6,4,2"]
-[options='header']
-|=====
-|API endpoint| Release version | Playground link
-a|`POST /api/rest/2.0/customization/custom-actions/search` +
-
-Gets custom action objects.
-
-|ThoughtSpot Cloud: __9.6.0.cl or later__ +
-ThoughtSpot Software: __9.8.0.sw or later__ a| +++Try it out+++
-
-a|`POST /api/rest/2.0/customization/custom-actions`
-
-Creates a custom action and assigns it to a given metadata object.
-
-|ThoughtSpot Cloud: __9.6.0.cl or later__ +
-ThoughtSpot Software: __9.8.0.sw or later__ a| +++Try it out+++
-
-a|`POST /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update` +
-
-Updates the properties of a custom action object.
-
-|ThoughtSpot Cloud: __9.6.0.cl or later__ +
-ThoughtSpot Software: __9.8.0.sw or later__ a|
-+++Try it out +++
-
-a|`POST /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete` +
-
-Deletes a custom action.
-
-|ThoughtSpot Cloud: __9.6.0.cl or later__ +
-ThoughtSpot Software: __9.8.0.sw or later__ a|
-+++Try it out +++
-|=====
---
-
-== Schedules
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
-[div boxAuto]
---
-[width="100%" cols="6,4,2"]
-[options='header']
-|=====
-|API endpoint| Release version | Playground link
-a|`POST /api/rest/2.0/schedules/create` +
+a|`POST /api/rest/2.0/vcs/git/config/delete` +
-Creates a Liveboard schedule job.
+Deletes the Git repository configuration.
-|ThoughtSpot Cloud: __9.4.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
-a|`POST /api/rest/2.0/schedules/search` +
+a|`POST /api/rest/2.0/vcs/git/branches/commit`
-Gets details of the scheduled Liveboard jobs.
+Commits TML files to the Git branch configured on your instance.
-|ThoughtSpot Cloud: __9.4.0.cl or later__ +
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
-
-a|`POST /api/rest/2.0/schedules/{schedule_identifier}/update` +
-
-Updates a Liveboard job schedule.
-
-|ThoughtSpot Cloud: __9.4.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a|
-+++Try it out +++
-
-
-a|`POST /api/rest/2.0/schedules/{schedule_identifier}/delete`
-
-Deletes a scheduled Liveboard job.
-
-|ThoughtSpot Cloud: __9.4.0.cl or later__ +
-ThoughtSpot Software: __9.5.0.sw or later__ a| +++Try it out+++
-
-|=====
---
-
-== DBT
-
-[div boxAuto]
---
-[width="100%" cols="6,4,2"]
-[options='header']
-|=====
-|API endpoint| Release version | Playground link
-a|`POST /api/rest/2.0/dbt/dbt-connection` +
-
-Creates a DBT connection object in ThoughtSpot.
-
-|ThoughtSpot Cloud: __9.10.0.cl or later__ +
-ThoughtSpot Software: __10.0.0.sw or later__ a| +++Try it out+++
-
-a|`POST /api/rest/2.0/dbt/generate-tml` +
-
-Creates TML for the given data objects and imports the TML data to ThoughtSpot.
-
-|ThoughtSpot Cloud: __9.10.0.cl or later__ +
-ThoughtSpot Software: __10.0.0.sw or later__ a|
-+++Try it out +++
-
-a|`POST /api/rest/2.0/dbt/generate-sync-tml` +
-
-Resynchronizes the existing list of Models, Tables, and Worksheet TML content for the specified DBT connection object and imports these to Thoughtspot.
-
-|ThoughtSpot Cloud: __9.10.0.cl or later__ +
-ThoughtSpot Software: __10.0.0.sw or later__ a|
-+++Try it out +++
-
-a|`POST /api/rest/2.0/dbt/search` +
-
-Gets a list of DBT connection objects.
-
-|ThoughtSpot Cloud: __9.10.0.cl or later__ +
-ThoughtSpot Software: __10.0.0.sw or later__ a|
-+++Try it out +++
++++Try it out +++
+a|`POST /api/rest/2.0/vcs/git/commits/{commit_id}/revert`
-a|`POST /api/rest/2.0/dbt/{dbt_connection_identifier}`
+Reverts to a previous commit in the Git branch.
-Updates a DBT connection object.
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
-|ThoughtSpot Cloud: __9.10.0.cl or later__ +
-ThoughtSpot Software: __10.0.0.sw or later__ a| +++Try it out+++
-|=====
---
+a|`POST /api/rest/2.0/vcs/git/branches/validate`
-== AI [beta betaBackground]^Beta^
+Validates the content of your source branch against the objects in your destination environment and identifies merge conflicts.
-[div boxAuto]
---
-[width="100%" cols="6,4,2"]
-[options='header']
-|=====
-|API endpoint| Release version | Playground link
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
-a|`POST /api/rest/2.0/ai/conversation/create` +
-Creates a conversation session with ThoughtSpot Spotter, your AI Analyst.
-|ThoughtSpot Cloud: __10.4.0.cl or later__ +
-ThoughtSpot Software: __Not available__ a| +++Try it out+++
-a| `POST /api/rest/2.0/ai/conversation/{conversation_identifier}/converse` +
-Generates responses to user queries and follow-up questions sent in the specified conversation session.
-|ThoughtSpot Cloud: __10.4.0.cl or later__ +
-ThoughtSpot Software: __Not available__ a| +++Try it out+++
+a|`POST /api/rest/2.0/vcs/git/commits/deploy`
-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+++
+Deploys commits to the destination environment (`Staging` or `Production`).
+|ThoughtSpot Cloud: __9.2.0.cl or later__ +
+ThoughtSpot Software: __9.5.0.sw or later__ a|
++++Try it out +++
|=====
--
-
-
-
-
diff --git a/modules/ROOT/pages/tml.adoc b/modules/ROOT/pages/tml.adoc
index 020fe18a7..e86cd1639 100644
--- a/modules/ROOT/pages/tml.adoc
+++ b/modules/ROOT/pages/tml.adoc
@@ -113,7 +113,8 @@ __Optional__ |__Boolean__. Skips Cloud Data Warehouse validation for table TML i
|`enable_large_metadata_validation` +
__Optional__
- |__Boolean__. Available from 10.5.0.cl. Enables validation for large metadata objects. |`false`
+ |__Boolean__. Available from 10.5.0.cl. Enables validation for large metadata objects. Set to `true` if the database contains multiple thousands of tables. When enabled, it allows for schema validation of one table at a time, circumventing metadata fetching limitations of the Cloud Data Warehouse (CDW).
+|`false`
|====
////
|`skip_diff_check` +
diff --git a/src/utils/algolia-queries.js b/src/utils/algolia-queries.js
index 625c136f9..b3bc0383a 100644
--- a/src/utils/algolia-queries.js
+++ b/src/utils/algolia-queries.js
@@ -2,6 +2,7 @@ const { JSDOM } = require('jsdom');
const { htmlToText } = require('html-to-text');
const config = require('../configs/doc-configs');
const { getAlgoliaIndex } = require('../configs/algolia-search-config');
+const { getDocLinkFromEdge } = require('./gatsby-utils.js');
const getPathPrefix = () => {
return config.SITE_PREFIX;
@@ -48,6 +49,13 @@ query {
description
}
html
+ parent {
+ ... on File {
+ name
+ sourceInstanceName
+ relativePath
+ }
+ }
}
}
}
@@ -78,7 +86,13 @@ function splitStringIntoChunks(input, n) {
return result;
}
-const pageToAlgoliaRecordForASCII = (ele, type, node) => {
+const getDocLink = (edge) => {
+ const link = getDocLinkFromEdge(edge);
+ return `/${config.SITE_PREFIX}${link}`;
+};
+
+const pageToAlgoliaRecordForASCII = (ele, type, edge) => {
+ const node = edge.node;
const pageid = node.pageAttributes.pageid;
let sectionId;
let sectionTitle;
@@ -98,6 +112,8 @@ const pageToAlgoliaRecordForASCII = (ele, type, node) => {
const numberOfChunks = len / 8000 + 1;
const chunks = splitStringIntoChunks(body, numberOfChunks);
+ const docLink = getDocLink(edge);
+
return chunks.map((chunk, i) => ({
objectID: `${sectionId}_chunk_${i}`,
sectionId,
@@ -106,7 +122,7 @@ const pageToAlgoliaRecordForASCII = (ele, type, node) => {
pageid,
type: 'ASCII',
title: node.document.title,
- link: `/${config.SITE_PREFIX}/${pageid}`,
+ link: docLink,
}));
};
@@ -129,7 +145,7 @@ const queries = [
? pageToAlgoliaRecordForASCII(
preambleEle,
'preamble',
- edge.node,
+ edge,
)
: null;
const sections = Array.prototype.map.call(
@@ -138,7 +154,7 @@ const queries = [
pageToAlgoliaRecordForASCII(
sect,
'section',
- edge.node,
+ edge,
),
);
if (preamble) {
diff --git a/src/utils/aloglia.test.ts b/src/utils/aloglia.test.ts
index e25eb2fcc..ed5b8b585 100644
--- a/src/utils/aloglia.test.ts
+++ b/src/utils/aloglia.test.ts
@@ -53,6 +53,11 @@ const htmlForPreambleEle = `
const divForpreamble = new JSDOM(htmlForPreambleEle).window.document;
const dummyPreambleEle = divForpreamble.querySelector('#preamble');
+const parentNode = {
+ name: 'testname',
+ sourceInstanceName: 'testsource',
+ relativePath: 'testpath',
+};
const asciiNode = {
id: 'fa556896-4e38-5e7a-ab35-a45ee93d58ee',
pageAttributes: {
@@ -61,6 +66,7 @@ const asciiNode = {
document: {
title: 'About REST APIs',
},
+ parent: parentNode,
};
const asciiAlgoliaObj = {
@@ -114,7 +120,7 @@ describe('test cases from algolia search', () => {
algoliaSearch.pageToAlgoliaRecordForASCII(
dummySectionEle,
'section',
- asciiNode,
+ { node: asciiNode },
),
).toStrictEqual([asciiAlgoliaObj]);
});
@@ -124,7 +130,7 @@ describe('test cases from algolia search', () => {
algoliaSearch.pageToAlgoliaRecordForASCII(
dummyPreambleEle,
'preamble',
- asciiNode,
+ { node: asciiNode },
),
).toStrictEqual([asciiPremableAlgoliaObj]);
});
diff --git a/src/utils/gatsby-utils.js b/src/utils/gatsby-utils.js
new file mode 100644
index 000000000..869decd02
--- /dev/null
+++ b/src/utils/gatsby-utils.js
@@ -0,0 +1,35 @@
+const getTutorialLinkFromEdge = (edge) => {
+ // Tutorials module pageids follow pattern {subdirectory}_{final_url_stub}
+ // to give unique IDs in system but allow directory structure in URL
+ const { pageid: pageId } = edge.node.pageAttributes;
+ const { relativePath: relPath } = edge.node.parent;
+ // One-level of subdirectory part of stub
+ const relPathSplit = relPath.split('/');
+ const pageIdSplit = pageId.split('__');
+ let finalPageId = pageId;
+ if (pageIdSplit.length > 1) {
+ finalPageId = pageIdSplit[1];
+ }
+
+ let finalPath = `/tutorials/${finalPageId}`;
+ if (relPathSplit.length > 1) {
+ finalPath = `/tutorials/${relPathSplit[0]}/${finalPageId}`;
+ }
+
+ return finalPath;
+};
+
+const getDocLinkFromEdge = (edge) => {
+ const { pageid: pageId } = edge.node.pageAttributes;
+ const { sourceInstanceName: sourceName } = edge.node.parent;
+
+ if (sourceName === 'tutorials') {
+ return getTutorialLinkFromEdge(edge);
+ }
+
+ return `/${pageId}`;
+};
+
+module.exports = {
+ getDocLinkFromEdge,
+};