API DocsRESTCalculated channels service

ValidateExpression

Used to validate whether or not an expression used for a calculated channel is valid.

POST
/api/v1/calculated-channels:validate-expression

Request Body

application/jsonRequired

expression
Required
object

mode
Required
string

Default: "EXPRESSION_MODE_UNSPECIFIED"Value in: "EXPRESSION_MODE_UNSPECIFIED" | "EXPRESSION_MODE_RULES" | "EXPRESSION_MODE_CALCULATED_CHANNELS" | "EXPRESSION_MODE_RULER"
curl -X POST "<API_URL>/api/v1/calculated-channels:validate-expression" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "expression": {
      "channelReferences": {
        "property1": "string",
        "property2": "string"
      },
      "expression": "string",
      "expressionChannelReferences": [
        {
          "channelReference": "string",
          "channelId": "string"
        }
      ]
    },
    "mode": "EXPRESSION_MODE_UNSPECIFIED"
  }'

A successful response.

{
  "error": {
    "errorMessage": "string"
  },
  "success": {
    "dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED"
  }
}