eGauge Meter API
eGauge Meter API
The eGauge WebAPI is a JSON-based API that provides access to eGauge meters. It offers secure means to read device data, configure the device, and perform various control operations.
The WebAPI is intended to eventually replace the eGauge XML API. For new applications, developers are encouraged to use WebAPI rather than the legacy XML API.
The authentication service. Clients can use this to obtain and manage tokens that grant access to the other resources in this API.
The meter uses JSON Web Tokens (JWT or simply token) to restrict access to protected resources. Clients must include such tokens in requests via the HTTP Authorization header. This header must have the form:
Authorization: Bearer JWT
where JWT is a valid token.
Tokens are valid for a limited time; typically for about 10 minutes. However, a meter may revoke a token earlier, e.g., due to a reboot.
The service provides the ability to execute various operations for their side effects, such as rebooting the meter. Unless stated otherwise, the resources in this service are available only to users with the save right (see /auth/rights).
An eScript expression that returns the value to use on the left hand side of the comparison.
curl -i -X GET \ 'https://webapi.egauge.net/_mock/webapi/4.6/openapi/config/alert/custom/{idx}/cond/lhs' \ -H 'Authorization: Bearer <YOUR_JWT_HERE>'
Normal response.
An eScript expression that returns the value to use on the left hand side of the comparison.
{ "result": "temp_internal()", "error": "Error message (present if an error occurred)." }
An eScript expression that returns the value to use on the left hand side of the comparison.
curl -i -X PUT \ 'https://webapi.egauge.net/_mock/webapi/4.6/openapi/config/alert/custom/{idx}/cond/lhs' \ -H 'Authorization: Bearer <YOUR_JWT_HERE>' \ -H 'Content-Type: application/json'
{ "status": "OK", "error": "Error message (present if an error occurred)." }
An eScript expression that returns the value to use on the left hand side of the comparison.
curl -i -X POST \ 'https://webapi.egauge.net/_mock/webapi/4.6/openapi/config/alert/custom/{idx}/cond/lhs' \ -H 'Authorization: Bearer <YOUR_JWT_HERE>' \ -H 'Content-Type: application/json'
{ "status": "OK", "error": "Error message (present if an error occurred)." }