Using the Dynamic Application Builder

Download this manual as a PDF file


This section describes how to create Dynamic Applications locally using the Dynamic Application Builder tool.

The Dynamic Application Builder is a tool that provides a creation wizard for Dynamic Applications that use the Snippet Framework libraries. For more information, see the Snippet Framework documentation.

The Dynamic Application Builder includes the ability to interface with your SL1 system to create PowerPack-able objects programmatically.

The Dynamic Application Builder works against endpoints with basic auth or no auth. Oauth2 will be supported in a future version.

Use the Dynamic Application Builder tool with caution, as you can overload your SL1 system with added collections created using the Dynamic Application Builder.

Validated Environments

Operating System Docker Desktop Docker CE + Docker Compose
Windows 10 X  
Windows 11 X  
OSX X  
Ubuntu WSL 2 X* X**
Ubuntu (Debian-based Distros) X X

* - Installed on the host operating system.

** - Installed locally to the guest operating system.

Configurations outside of those listed above have not been validated as of this release.

Prerequisites

You must have the following prerequisites to use the Dynamic Application Builder:

  • An SL1 system version 11.3.0 or later if you are exporting Dynamic Applications.
  • Version 100 of the "REST Toolkit" PowerPack installed on the SL1 system you wish to export Dynamic Applications to, as the Dynamic Application Builder builds Dynamic Applications using this low-code tool. Version 100 has been included in the .zip file. Refer to the REST Toolkit documentation to make any changes in SL1 after using the Dynamic Application Builder.
  • At least 250 MB of free space on your system.

Installing and Launching the Dynamic Application Builder

To install the Dynamic Application Builder:

  1. Download the Dynamic Application Builder .zip file from the ScienceLogic Support Site to a local computer.

Installation or Upgrade Process for Windows

  1. Click to run the file marked "DynamicApplicationBuilderSetup-1.0.exe".

  2. A window may appear preventing the file from running as unrecognized. Click More Info and then Run Anyway.

  3. A window will appear asking "Do you want to allow this app from an unknown publisher to make changes to your device?" Click Yes to continue.

  4. Accept the license agreement and then click Next.

  5. Choose whether to create a desktop shortcut and then click Next.

  6. Click Install.

  7. The installer will place a file named "Sciencelogic Dynamic Application Builder" in the Applications menu (Start > Applications > Dynamic Application Builder). Click this file to run the application.

  8. The Terms of Agreement window will appear. After reading the user agreement, you must click Accept in order to continue.

Installation or Upgrade Process for OSX

  1. Click to run the file marked "DynamicApplicationBuilder-0.1.0.dmg".
  2. In the window that appears, drag the file into the Applications folder.

  3. Open the Applications folder and locate the Dynamic Application Builder.

  4. Click to open the Dynamic Application Builder.

  5. The Terms of Agreement window will appear. After reading the user agreement, you must click Accept in order to continue.

Using the Dynamic Application Builder

After installing the Dynamic Application Builder, you will go through each step of the wizard to create a credential, create a Dynamic Application, create collection objects, and export the Dynamic Application to SL1.

Creating a Credential

After launching the Dynamic Application Builder, it will detect any previously created endpoint credentials saved on your machine. It will give you the option to select those credentials or to create a new credential.

To add a new credential:

  1. Complete the following fields:

    • Credential Name. Enter a way to identify the credential.

    • Hostname. Enter the full URL for the API you want to access.

    • Username. Enter a valid username for the API you want to access.

    • Password. Enter a valid password for the API you want to access.

    The Username and Password fields are not required. You should only populate these fields if authentication is required. Otherwise, leave them blank.

  2. Toggle on (green) to confirm you are providing credentials for a device or API endpoint, and that you are not using a production system of SL1.

  3. Click the Add New Credential button.

  4. Select the credential that you want to use and click the Continue button at the bottom of the page.

Creating a Dynamic Application

If you created a Dynamic Application previously, you can select it at the top of the page. Otherwise, you will need to create a new Dynamic Application. Enter values and make selections in the prompts that appear.

This version of the Dynamic Application Builder allows the creation of Snippet Configuration Dynamic Applications only.

Each of the steps represent a field in the Dynamic Application Properties Editor. For explanations of each field, see the section Dynamic Application Properties.

Once you have finished, click the Add New Dynamic Application button. The Dynamic Application is added to the table at the top of the page, to be selected for use. Select the Dynamic Application you want to use and click the Continue button at the bottom of the page.

This version of the Dynamic Application Builder does not support editing Dynamic Applications.

Retrieving the Payload and Selecting Collection Objects

In the next step of the wizard, you can fetch the payload from the API to verify that your API call is correct.

  1. Enter an API call in the URL to API Endpoint field.

  2. Click the Fetch Payload button. The results of the API call appear below.

  3. Click the Continue button at the bottom of the page.

Next, select the values from the response payload that you want to collect.

  1. Drag the values you want to collect to the Selected Values section on the right side of the page.

  2. Click the Continue button at the bottom of the page.

Creating a Collection Object

In the next step of the wizard, you will select the undefined nodes from the payload to turn into collection objects.

  1. Select the node you want to create a collection object for.

  2. Under Snippet Argument, you will see the automatically generated Snippet Argument that will be used. You can make changes, if needed.

  3. Click the Test Snippet Argument button to verify that any changes you made to the argument will function. The Snippet Framework Output window will appear, where you can view each step of the output to see errors, if they occurred.

  4. Each of the other steps represent a field in the Dynamic Applications | Collections Objects page. For explanations of each field, see the section Creating a Collection Object.

  5. Click the Save Node as Collection Object button.

  6. The new collection object will appear under the Nodes Defined into Collection Objects section at the top of the page.

  7. Repeat for other undefined nodes as needed and click the Continue button at the bottom of the page.

When you are finished, you will be given the options to save your Dynamic Application locally, export the Dynamic Application to SL1, and/or create a new collection object for the Dynamic Application.

Exporting to SL1

In the final step of the wizard, you will select the Dynamic Application you want to export and define the SL1 system you want to export to.

  1. Select the Dynamic Application you want to export.

  2. Complete the following fields under Target SL1:

    • Hostname/IP of SL1 Instance. Enter the IP address or Hostname of the SL1 instance you want to export to.

    • SL1 Username. Enter the username of an administrator account with API access.

    • SL1 Password. Enter the password for the administrator account with API access.

  3. Click the Export to SL1 button.

Testing Your Dynamic Application

The Dynamic Application Builder creates Dynamic Applications using the Snippet Framework. Please reference the following documentation for editing, testing, and troubleshooting your Dynamic Applications once they have been exported to SL1:

How to Build Dynamic Applications with the Snippet Framework

Troubleshooting

Listed below are known issues you might encounter when using the Dynamic Application Builder, along with workarounds, if available:

  • If the payload you attempt to fetch is too large, you may have difficulty rendering the entire payload on the Select Collection Objects

    screen. This could cause the page to load slowly, or some rows farther down the page not to load at all. The exact size of payload that causes this problem is currently unknown, but a fix for this issue is planned for a future release of the Dynamic Application Builder.

  • The search bar on the Select Collection Objects screen is not currently functional.

  • The Finish button at the end of the Export to SL1 page is currently not functional. Once you have finished creating and exporting a set of objects, you may close the application or navigate back through the previous pages to create and export more objects.

  • When you reopen the Dynamic Application Builder after using it previously, you can choose a previously entered credential. If the credential requires authorization, the Dynamic Application Builder will prompt you to reenter the password. If you enter the password, the Dynamic Application Builder proceeds normally. However, you can click out of the password box without entering the password and proceed to the next page with the same credential selected. This will not break anything or allow you access to anything you shouldn’t, but it will cause the payload fetch to fail every time since there is no password set. If you accidentally click out of the password box, choose another credential to deselect your chosen credential, then click back on the credential and enter the password correctly.

  • When the you are creating a Dynamic Application within the Dynamic Application Builder, the Snippet Performance application type is a selectable option. Since this application type is not supported, the export will most likely fail. Snippet Performance applications are unsupported as of version 1.0.

  • The Dynamic Application Builder is generating incorrect JSONPath selectors when the JSON payload is a list of dictionaries (versus a dictionary with key value organization). To work around this, you can manually update the Snippet Argument YAML on the collection object page and add a correct selector. JSONPath is only one supported selector type (JMESPath, simple key, regex are examples of alternatives) and while the tool generates a best guess for the JSONPath notation needed, any of the snippet arguments defined in the Developer Docs can be used as a work around if the generated JSONPath selector fails.

  • You can create credentials and Dynamic Applications with the same name, but if the duplicate name is selected from the auto-complete box, an error will occur, preventing you from creating the object. If you need to create an object with the same name as another, do not use auto-complete to set the name. Type the name in to avoid this error.

  • If you are on SL1 version 12.1.0, you will see the following traceback, which is a known Snippet Framework issue:

    PermissionError: [Errno 13] Permission denied: '/tmp/collection_metrics.log'

    90. During handling of the above exception, another exception occurred:

    91. Traceback (most recent call last):

    92. File "/opt/em7/lib/python3/silo_logs/silo_logging.py", line 163, in configure

    93. _configure(*vargs, **kwargs)

    94. File "/opt/em7/lib/python3/silo_logs/silo_logging.py", line 255, in _configure

    95. configure_logging(configs, **kwargs)

    96. File "/opt/em7/lib/python3/silo_logs/silo_logging.py", line 267, in configure_logging

    97. logging.config.dictConfig(config)

    98. File "/usr/lib64/python3.6/logging/config.py", line 802, in dictConfig

    99. dictConfigClass(config).configure()

    100. File "/usr/lib64/python3.6/logging/config.py", line 573, in configure

    101. '%r: %s' % (name, e))

    102. ValueError: Unable to configure handler 'metrics_file_handler_tmp': [Errno 13] Permission denied: '/tmp/collection_metrics.log'

Removing the Dynamic Application Builder

To remove the Dynamic Application Builder container, network, volume, and image, use the following Docker commands:

docker container stop silo_da_builder-silo-da-builder-1

docker container rm silo_da_builder-silo-da-builder-1

docker network rm silo_da_builder_silo-da-builder-net

docker image rm silo-da-builder

docker volume rm pre-commit-cache

These commands will reset the environment so that you can re-run dab.sh or dabwindows.ps1 to relaunch the Dynamic Application Builder.

If you have any questions or feedback, contact the PowerPack user group in Salesforce as this is a Limited Availability release.