Introduction

NOTE

Run KvalCAM at least once after installing to generate the config and settings files so that you can complete the following steps.

First enable the KvalCAM REST Web API by editing the C:\Kval\KvalMachineData\ModuleData\KvalCAM\KvalCAMSettings.xml file and set the EnableWebAPIHost element to true.

To change the port the host listens on change the WebAPIHostPort element to the desired port number:

<KvalCAMSettings>
  <KvalCAMDBSource>SqliteDB</KvalCAMDBSource>
  <ConnectionString>Data Source=127.0.0.1,1433;Initial Catalog=KvalCamDB;User ID=kval1;Password=kval1;Network Library=DBMSSOCN</ConnectionString>
  <EnableWebAPIHost>true</EnableWebAPIHost>
  <WebAPIHostPort>9707</WebAPIHostPort>
  <WebHostMinLogLevel>Trace</WebHostMinLogLevel>
</KvalCAMSettings>

When KvalCAM first runs with the Web API enabled windows will prompt the user to allow it to listen on the port, click allow.

Viewing and Using the Interactive Docs

Once KvalCAM is running and the WebAPI is enabled you can connect to it locally in a browser by visiting http://localhost:{port}/rest/api/docs (default port is 9707 if not changed in the KvalCAMSettings.xml file). The docs page is generated by the server and updated to automatically to stay in sync with the KvalCAM version that is running.

From the docs page you may view all the REST API commands available, and try any of them interactively using the browser.

Last Updated: 8/27/2019, 1:42:27 PM