diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_10.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_10.png index 1ea79744..6dc9cf08 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_10.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_10.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_11.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_11.png index 3622fd3b..59c99352 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_11.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_11.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_12.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_12.png index 1ea4da8e..7ca6d511 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_12.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_12.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_13.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_13.png index a44d2a6f..c1d408fc 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_13.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_13.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_14.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_14.png index 3489112b..1ddf8590 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_14.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_14.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_15.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_15.png index 4d46c511..42d49ee1 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_15.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_15.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_3.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_3.png index 9ccc72f9..c2495cb0 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_3.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_3.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_6.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_6.png index 10b47d35..fd73a92b 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_6.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_6.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_9.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_9.png index 1cc004d3..7134a1c0 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_9.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/eapi_9.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/gs_26.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/gs_26.png index 4f8714a4..52e18452 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/gs_26.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/gs_26.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/gs_27.png b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/gs_27.png index 6a1b7883..c42e08a2 100644 Binary files a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/gs_27.png and b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/assets/gs_27.png differ diff --git a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/embedding_rest_api_usage_01_getting_started.md b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/embedding_rest_api_usage_01_getting_started.md index 942a6c23..7c1e18e9 100644 --- a/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/embedding_rest_api_usage_01_getting_started.md +++ b/site/sigmaguides/src/embedding_rest_api_usage_01_getting_started/embedding_rest_api_usage_01_getting_started.md @@ -6,7 +6,7 @@ environments: web status: Published feedback link: https://github.com/sigmacomputing/sigmaquickstarts/issues tags: default -lastUpdated: 2025-07-14 +lastUpdated: 2025-07-21 # REST API Usage 01: Getting Started @@ -259,16 +259,16 @@ Ensure you are in the project folder: pwd ``` - + -Once in the correct folder, we can start the web server with: +Once in the correct folder, we can start the web server with: debugging enabled: ```code -npm start +DEBUG=true npm start ``` -Some debug information is provided and the expected result is: +Detailed debug information is provided when `DEBUG=true` is enabled and the expected result is: - + Once the server is running, we can browse to a preconfigured provisioning page. This page adds our two embed test users and displays the `memberId` for each, along with the admin user specified in .env (based on the provided email address): @@ -359,7 +359,7 @@ We last left the browser open the main landing page. If for some reason it all g Restart it as shown earlier, ensuring you're in the correct project folder: ```code -npm start +DEBUG=true npm start ``` The server is ready when it displays `Server listening at http://localhost:3000`. @@ -373,60 +373,46 @@ Browse to the landing page: http://localhost:3000 ``` -Select `API Getting Started` QuickStart and click `Go`: +Select `Getting Started` QuickStart and click `Go`: The `API Getting Started` page comes with a side-panel that displays embedding and token details. -The actual token appears lower on the side panel for anyone who wants to validate it using a third-party site such as [JWT.io](https://jwt.io/): +The actual token appears lower on the side panel for anyone who wants to validate it using a third-party site such as [JWT.io](https://jwt.io/). + +There is also a `README` button, that provides detailed information about how the `Getting Started` page is constructed, endpoints users and other useful information: + + You can select to operate as either embed user and also select from our test workbooks: - + + +We have now successfully embedded Sigma into our host application and used the API to get information from Sigma (workbooks in the Embed_Users workspace) and passed the selected workbook back to Sigma using the correct format for a workbook embed: -The terminal console displays logging output each time a page with an embed is reloaded: +Because we have debugging enabled, the terminal console displays logging output each time a page with an embed is reloaded: -Note that the token is cached, and the embed URL is also displayed. + Sigma supports different embed URL formats depending on the content type for different embeds in Sigma and this example constructs the correct format for embedding a `workbook` in the code. For more information, see [What URL to use](https://help.sigmacomputing.com/docs/create-an-embed-api-with-json-web-tokens#what-url-to-use) -We have now successfully embedded Sigma into our host application and used the API to get information from Sigma (workbooks in the Embed_Users workspace) and passed the selected workbook back to Sigma using the correct format for a workbook embed: - - - ### Enabling Menus and Folder Navigation for Build Users We have designed the project to allow the `Build` user to see the Sigma menu and folder navigation, placing them at the top of the embed: -This was done to demonstrate a few of the optional runtime parameters that are available in the JWT embed. The full list is included (at the time of this QuickStart) in the `.env` file: -```code -# ----------------------------------------------------------------------------- -# OPTIONAL EMBED PARAMETERS (defaults are shown) -disable_auto_refresh=false -disable_mobile_view=false -hide_folder_navigation=false -hide_menu=false -hide_page_controls=false -hide_reload_button=false -hide_title=false -hide_tooltip=false -hide_view_select=false -lng=English -menu_position=none -page_id= -responsive_height=false -theme=Lite -view_id= -# ----------------------------------------------------------------------------- -``` +This was done to demonstrate a few of the optional runtime parameters that are available in the JWT embed. All the parameters (at the time of this QuickStart) are included in the `.env` file. To give the `Build` user access to Sigma’s editing tools during embedding, we configure the JWT to include specific UI flags. These values are only applied when embedding an entire workbook (not a page or element): ```code @@ -442,7 +428,11 @@ These settings ensure that: - The menu appears at the top of the screen (instead of a side menu) - The user can navigate folders within Sigma if allowed by their role -We apply these settings at runtime only if the selected user is a `Build` user. `View` users receive a more restricted UI by default. +We apply these settings at runtime only if the selected user is a `Build` user. We intentionally enforce `View` users receiving a more restricted UI by default. + +Selecting the `View` user, we can see the menu bar options are not included in the embed: + + -[REST API Usage 01: Getting Started](https://quickstarts.sigmacomputing.com/guide/embedding_rest_api_usage_01_getting%20started_started/index.html?index=..%2F..index#0) +[REST API Usage 01: Getting Started](https://quickstarts.sigmacomputing.com/guide/embedding_rest_api_usage_01_getting_started/index.html?index=..%2F..index#0)