Local Web Server
enVision Flow comes equipped with an advanced feature to enable API-level communication with a remote enVision Device. This can be used if:
- You have a locally installed application (i.e not a web browser or mainframe-based application) that wishes to directly integrate with an enVision device.
- You wish to programmatically trigger a measurement request from an enVision device and consume the response from your application, but you don't want to deal with managing enVision Cloud API Keys or storing information about the selected device in your application.
When the Local Web Server feature is enabled, enVision Flow hosts a simple web server at http://127.0.0.1
. It exposes an API that acts as a gateway to the enVision device that enVision Flow is configured to communicate with. Your application can integrate this local API to communicate with the configured device. Changing device or company settings in enVision Flow will change the device the API communicates with.
The API has a single endpoint:
GET http://127.0.0.1:[PORT]/measure
Where [PORT]
is the port number specified when the server was started. The default port number is 8081
.
Integrating the API
See the below CURL command that can be used to execute a measure request. In this example, the port number is 8081
.
curl "http://127.0.0.1:8081/measure" \
-X GET
The payload returned from the local API is identical to that returned from a Cloud Trigger operation. See the Cloud Trigger section of the enVision Cloud API documentation for specifications on the response payload returned from this endpoint.