POST /api/v202405/formula/validate

Validates a Calculated Channel formula in the context of a specific data point

ValidateFormulaV202405
Use this endpoint to check a formula before saving it to a calculated channel. 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)) belongs to this datapoint and is a simple (not calculated) channel (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
}