WebAPI is a new service and Workbench provider. It is the new gateway for all third-party components that use REST. It provides the framework for these new features:
In addition, the Web API provides a new REST endpoint for retrieving data points from FrameWorX and its point managers. The new Web API REST endpoint is secured by OAuth 2.0, and supports writing to points. (Note, the OData Connector service still exists, and its endpoint is still functional.)
An example REST URI for the Web API service would be:
http://localhost/fwxapi/rest/data?pointname=svrsim:sine double med -100 100.
You can find the Web API in Workbench under Platform Services. Configuration for the new features listed above will be described with those features. No configuration is necessary for the REST endpoint.
The Windows service associated with the Web API is the ICONICS Web API Service (IcoWebAPIService). This service must be running to support the REST endpoint and the aforementioned other features.
The Web API Provider allows users to configure properties for ICONICS applications' use with multiple providers, including Amazon Alexa, Microsoft Bot, and Google. Using this tool, users are able to set Providers' settings (values) as well as perform JSON Configuration File Actions.
To Add a Provider:
Expand your project in the Project Explorer, then expand the Platform Services node and then the Web API node.
Right-click on the Providers node, then click on Add Provider, as shown below.
Adding a Web API Provider from the Project Explorer
-OR-
Select the Providers node then click on the Add Provider button, shown below, in the Edit section of the Home ribbon in the Workbench.
Add Provider Button
This opens the Provider properties window in the Workbench, as shown below. Enter a name for the Provider in the Name text entry field.
Provider Properties
Configuration
Provider Type - Use the pulldown menu to select from Amazon Alexa, Microsoft Bot, or Google. Notice that changing the Provider Type will load its own corresponding set of Properties in the bottom section of the window.
Properties
Once your Provider Type is selected, you'll be able to enter values for associated properties.
Amazon Alexa
For Amazon Alexa, you can set CameraProxyHost and AssetTreeViewPath values by entering them in the appropriate cells within the Value column. For AssetTreeViewPath, you can also opt to click the button to open the Data Browser and navigate to your selected asset tree view path.
Microsoft Bot
For Microsoft Bot, you can set LuisAppVersion, LuisEntityDeviceID, LuisEntityDeviceName, LuiseEntitySceneID, LuisUrl, LuisEntitySceneName, and AssetTreeViewPath by entering them in the appropriate cells within the Value column. For AssetTreeViewPath, you can also opt to click the button to open the Data Browser and navigate to your selected asset tree view path.
For Google, you can set the AssetTreeViewPath values by entering it in the appropriate cell within the Value column. You can also opt to click the button to open the Data Browser and navigate to your selected asset tree view path.
Click Apply and Close to save your Provider properties. Your new Provider will now appear beneath the Providers node in the Project Explorer.
This option deploys a JSON configuration file to a target machine.
To Deploy a JSON Configuration file:
Expand your project in the Project Explorer, then expand the Platform Services node and then the Web API node.
Right-click on the Providers node, then click on Deploy JSON Configuration file, as shown below.
Deploy JSON Configuration file from the Project Explorer
-OR-
Select the Providers node then click on the Deploy JSON Configuration file button, shown below, in the Tools section of the Home ribbon in the Workbench.
Deploy JSON Configuration file Button
This opens the Deploy provider settings window, as shown below.
Deploy provider settings Window
Provider Type - Use the pulldown menu to select from Amazon Alexa, Microsoft Bot, or Google.
File - Enter the location of the JSON Configuration file to deploy in the text entry field or click on the button to open a file browser to navigate to your selected JSON Configuration file to deploy.
Click OK to finalize your settings and return to the Workbench.
This option exports a provider into a JSON configuration file.
To Generate a JSON Configuration file:
Expand your project in the Project Explorer, then expand the Platform Services node and then the Web API node.
Right-click on the Providers node, then click on Generate JSON Configuration file, as shown below.
Generate JSON Configuration file from the Project Explorer
-OR-
Select the Providers node then click on the Generate JSON Configuration file button, shown below, in the Tools section of the Home ribbon in the Workbench.
Generate JSON Configuration file Button
The Workbench will generate the JSON Configuration file and show the results as they are generated in the Recent Tasks section on the right side of the Workbench, as shown below.
Generate JSON Configuration File Task in the Recent Tasks Section of the Workbench
Once generated, you can perform multiple actions, as shown in the image below. Click on Download generated file.
Download generated file from Recent Tasks
This opens the Save As window, where you can decide where you would like to save your generated JSON Configuration File (in compressed [zipped] file format).
This option imports a provider from a JSON configuration file.
To Import a JSON Configuration file:
Expand your project in the Project Explorer, then expand the Platform Services node and then the Web API node.
Right-click on the Providers node, then click on Import JSON Configuration file, as shown below.
Import JSON Configuration file from the Project Explorer
-OR-
Select the Providers node then click on the Import JSON Configuration file button, shown below, in the Tools section of the Home ribbon in the Workbench.
Import JSON Configuration file Button
This opens the Import Configuration window, as shown below.
Import Configuration Window
Provider - Enter the Provider type (Amazon Alexa, Microsoft Bot, or Google) in the text entry field.
File - Enter the location of the JSON Configuration file in the text entry field that you wish to import or click on the button to open a file browser to navigate to your selected JSON Configuration file to import.
Click OK to finalize your settings and return to the Workbench.
See Also: