Validates a Calculated Meter formula
Use this endpoint to check a formula before saving it to a calculated meter.
The formula is valid if all of the following are true:
It is syntactically correct It only calls allowed functions (including the custom function channel())Each channel referenced (via channel(channelId)) is the Primary Value Channel of some other datapoint (which also rules out self-references)
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
| ECI-ApiKey | string | Yes | Your API key. See Authentication. |
| Content-Type | application/json | Yes | All requests must specify JSON content type, including the request body. |
Request Body
FormulaValidationRequest
| Property | Description | Type |
|---|---|---|
| dataPointId | integer (int32) | |
| formula | Required | string |
Example Request Body
{ "dataPointId": 1, "formula": "string"
}
Responses
200
OK
The request succeeded and the response body contains the requested data.
Response Body Parameters
FormulaValidationResponse
| Property | Description | Type |
|---|---|---|
| errorMessages | string[] | |
| valid | boolean |
Example Response
{ "errorMessages": [
"string"
], "valid": false
}