Search
Generic filters
Exact matches only
  1. Home
  2. Knowledge Base
  3. Interfaces & Data Sources
  4. Install and Configure JSON Interface

Install and Configure JSON Interface

Use Visual KPI Server Manager to install and configure the JSON interface. The JSON interface can be installed on Visual KPI Server, or on any machine that is available to the Visual KPI Server via HTTP. If the interface is being installed on a machine other than Visual KPI Server, you need to first install Visual KPI Server Manager.

Install JSON Interface

During the JSON interface install, use the Back button to move to a previous page in the installation wizard, or use the Cancel button to cancel the installation process.

  • Open Visual KPI Server Manager.
  • Expand the Sites folder. If you have multiple Visual KPI sites defined on your system, they are displayed here. Expand the site in which you want to install the interface. Continue expanding the site hierarchy until Interfaces is selected.
    interfaces
  • Right-click Interfaces and select Install New Visual KPI Interface JSON Interface. The Interface Setup Wizard opens.install JSON interface
  • Click Next to continue. The License Agreement page displays.
    install JSON interface
  • Select the I accept the terms of the license agreement option and click Next to continue. The JSON Interface Name page displays.install JSON interface
  • Accept the Visual KPI JSON Interface Name, or change it to meet your requirements. The Visual KPI JSON Interface Name is used to set the defaults for the Installation Path and Virtual Directory Name during this installation.
  • Click Next to continue. The Installation Path page displays.
    install JSON interface
  • Accept the default installation path, or change it to meet your requirements.
  • Click Next to continue. The JSON Interface Settings page displays with the JSON Base Address field.
    install JSON interface
  • Update the Base Address to meet your requirements. For example base addresses, see Using Base Address with the Interfaces 
  • Click Next to continue. The Ready to Install page displays.
    install JSON interface
  • Click Next to continue. The Successful Installation page displays.
    install JSON interface
  • Click Finish to close the Setup Wizard. The newly installed interface displays in the Interfaces folder.JSON interface

The installation of the JSON interface is now complete.

Configure JSON Interface

If you need to change the configuration settings for your JSON interface after it has already been installed, use Visual KPI Server Manager.

  • Expand the Sites folder.  Expand the site that includes the interface to be configured.JSON interface
  • Under the Interfaces folder, select the JSON interface to be configured. The detail pane displays the interface’s current configuration.
  • Mouse over a setting to display a tooltip with the current configuration for that setting, if the value is not already displayed in its entirety.configure JSON interface

Modify Settings

You can modify any of the configuration settings that are not grayed out.

  • To make changes to the Authentication Type, use the drop-down menu to select Anonymous, Integrated, Basic or Digest.
  • To make changes to the User Credentials, click the “…” in the User Credentials field and enter a Username and Password.
  • To make changes to Log Name, double-click the setting name to select the setting’s value, or click in the setting’s cell, and enter the new value.
  • To make changes to the Base Address, enter the URL for the data source. For example connect strings, see Use Connect Strings with the Interfaces.

To make changes to Current Value, Trend Data or Historical Value, click in the cell and enter the new query.

  • Enter a current value parameter by right-clicking on the parameter value.
  • The Get Current Query Editor opens.
  • Enter the Request URI.
  • Enter the Results Base Path and Value Field as “.” notation.
  • You can also enter the Timestamp Field as “.” notation.
  • Press OK to close the field and accept the text you have entered.
    configure JSON interface

For detailed information on the fields used in these queries, see Working with JSON Interfaces.

  • To make changes to the Log Level, select an appropriate level from the list. You can select Errors OnlyModerate or Full. See Configuring the Error Logging Level.
  • After making any required changes, click Apply to save changes. Test the connection to make sure it is working correctly.

Convert XML Steam to JSON

Use the checkbox setting in Visual KPI Server Manager to convert XML Steam to JSON.  We use JSON.Net to do this and it ends up yielding a pretty ugly looking set of JSON, but from that you can decide what data you need to read and make modifications.  Basically, it is not a native XML interface but rather converts the XML Steam to JSON, which can be used by our JSON interface.

Visit Convert XML to JSON to see a sample.

Verify JSON Interface Connection

Once you have installed and configured the JSON interface, you should verify the interface is able to connect to the database. Use Visual KPI Server Manager to verify the connection.

  • Expand the Sites folder. Expand the site that includes the interface to be verified.verify JSON interface
  • Right-click the JSON interface and select Verify Connection. A message displays indicating the connection was successful, or if the connection failed, a message displays indicating the failure:
    verify connection JSON interface
  • Click OK in the message.
  • If there were any errors, make the required changes to the Base Address and/or Queries and repeat the verification.

Note: Verifying the connection does not ensure proper security has been implemented. To ensure you can access the data within the database, you should test the JSON interface connection.

Test a JSON Interface Connection

Once you have verified the JSON interface connection, you should test the connection to ensure you can access the data within the database. Use Visual KPI Server Manager to test the connection.

  • Expand the Sites folder. Expand the site that includes the interface to be tested.JSON interface
  • Right-click the JSON interface and select Browse. Your browser opens and displays the JSON Interface Web Service page.JSON interface
  • Click the TestGetCurrentValue link.
    test JSON interface
  • In the Lookup field, enter a valid lookup name and click the Invoke button. A new instance of your browser opens.test JSON interface
  • Look for the “<NewDataSet xmlns=””>” entry. Within this entry are the results of the test. If the connection and security settings are valid, a value is returned. Otherwise, an error is displayed as the value.
  • If there are any errors, make the required changes to the Connect String and/or Queries and repeat the test. For tips on correcting the configuration, see Using Connect Strings with the Interfaces.

Learn more

Working with JSON Interfaces

Using Connect Strings with Interfaces

Was this article helpful?

Related Articles