Check that a Calculated Meter formula is valid. It is valid if the following are all true: <list type="bullet"><item><description> It is syntactically correct </description></item><item><description> It only calls allowed functions (including the custom function `channel()`") </description></item><item><description> Each channel referenced (via `channel(channelId)`) is the Primary Value Channel of some other datapoint (which also rules out self-references). </description></item></list>
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
}