POST /api/v202405/formula/validateCalculatedMeter

Validates a Calculated Meter formula

ValidateCalculatedMeterFormulaV202405
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 correctIt 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 application/json
{  "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 application/json
{  "errorMessages": [
    "string"
  ],  "valid": false
}