diff --git a/site/sigmaguides/src/developers_api_code_samples/assets/apics69.png b/site/sigmaguides/src/developers_api_code_samples/assets/apics69.png new file mode 100644 index 00000000..4f9a59d7 Binary files /dev/null and b/site/sigmaguides/src/developers_api_code_samples/assets/apics69.png differ diff --git a/site/sigmaguides/src/developers_api_code_samples/assets/apics70.png b/site/sigmaguides/src/developers_api_code_samples/assets/apics70.png new file mode 100644 index 00000000..0adb09ec Binary files /dev/null and b/site/sigmaguides/src/developers_api_code_samples/assets/apics70.png differ diff --git a/site/sigmaguides/src/developers_api_code_samples/developers_api_code_samples.md b/site/sigmaguides/src/developers_api_code_samples/developers_api_code_samples.md index 7f8ba0b4..68864770 100644 --- a/site/sigmaguides/src/developers_api_code_samples/developers_api_code_samples.md +++ b/site/sigmaguides/src/developers_api_code_samples/developers_api_code_samples.md @@ -42,6 +42,7 @@ Developers who are evaluating or working with Sigma's REST API. ## Environment Setup +Duration: 5 ### Create Sigma Project Folder @@ -180,6 +181,8 @@ For more information on the supported API instances, see [Identify your API requ ## Authentication - REQUIRED +Duration: 5 + This section demonstrates the code that was provided on the `API Code Samples` > `Authentication: Get Access Token` page, [located here.](https://docs.sigmacomputing.com/api/v2/#auth) ### Description @@ -212,6 +215,72 @@ We can now move on to use cases, leveraging the `getBearerToken` function: + + +![Footer](assets/sigma_footer.png) + + +## Connections - List All +Duration: 5 + +This section demonstrates the code that was provided on the `API Code Samples` > `Connections: List all` page, [located here.](https://help.sigmacomputing.com/recipes/connections-list-all) + + + +### Description +This script lists all connections in a specific Sigma instance, based on cloud provider where Sigma is deployed and the API keys used. + +### Running the Script + +Open the file `list_all_connections.js` in the connections folder: + +Each code block is commented to explain what operations are being performed. + +Open the `env` file and provide a `CONNECTIONID` to use for the API call. + +From the `list_all_connections.js` file, press `F5` to run the script with VSCode's debugger. + +The expected response is: + + + +![Footer](assets/sigma_footer.png) + + +## Connections - Sync All Tables in Schema +Duration: 5 + +This section demonstrates the code that was provided on the `API Code Samples` > `Workbook: List All` page, [located here.](https://help.sigmacomputing.com/recipes/connections-sync-schema) + + + +### Description +This script automates the synchronization of tables within a schema that is specified in the `.env` file. + +The script resolves the schema's `inodeId` based on the provided `SYNC_PATH` in the .env file, lists all tables within the schema, and constructs full paths for each table. + +Finally, it syncs each table individually using the full path, ensuring that the process dynamically handles all tables within the specified schema. + +### Running the Script + +Open the file `sync_schema.js` in the connections folder: + +Each code block is commented to explain what operations are being performed. + +Open the `env` file and provide either a `CONNECTIONID` and `SYNC_PATH` to use for the API call. + +From the `sync_schema.js` file, press `F5` to run the script with VSCode's debugger. + +The expected response is: + + + ![Footer](assets/sigma_footer.png) @@ -387,7 +456,7 @@ Open the file `get-member-details.js` in the members folder: Each code block is commented to explain what operations are being performed. -Open the `env` file and provide either a `MEMBERID` or `EMAIL` to use for the API call. 1 +Open the `env` file and provide either a `MEMBERID` or `EMAIL` to use for the API call. From the `create-new.js` file, press `F5` to run the script with VSCode's debugger. @@ -1219,7 +1288,6 @@ The expected response is: ![Footer](assets/sigma_footer.png) - ## Workbook: Shared with Me Duration: 20 @@ -1249,17 +1317,6 @@ The expected response is: ![Footer](assets/sigma_footer.png) - - - - - - - - - - - ## Workbook: Update Owner Duration: 20