Getting Started – REST API
To use the OAS REST API you must first register the HTTP listener. This is done with the OAS Service Control Manager under the section labeled “HTML HMI Registration”.
Define the exclusive Node Name and Port Number that is to be supported. The Node Name should be the registered domain name, IP address, or network node name that all clients will connect to from their browsers. If you are unsure of which node name to use, localhost will work in most cases.
NOTE: Before clicking “Register”, be sure to stop all services. If services are running, the Service Control app will prompt you to stop them.
Start up all services, and be sure to include the Framework 4.5 Service as this houses the listener specific to the REST API.
Test your API service.
Navigate to https://openautomationsoftware.com/restapi to open the REST API Explorer.
In the upper left of the explorer, change the server API Host:port to your server address and port. Be sure to choose “Use SSL” or uncheck it depending on if your server is registered to use SSL.
Use the Authenticate operation to test your connection. Select the operation, insert the JSON seen below that represents a username and password, and click “TRY”.
If successful, you should see the following result, with unique identifiers for clientid and token fields: