Skip to main content
POST
Test a route condition
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.

v2 compatibility notes

POST /api/v2/workflows/testRouteCondition The API twin of the Console’s condition tester. It reads no record and stores nothing. A condition that cannot be parsed or evaluated answers matched: false with the reason in error. The body is at most 64 KiB.

Authentication

Personal key, External App credential or platform API key. Requires permission workflows:read.

Body

string
required
The branch condition expression, at most 4,000 characters.
any
required
The JSON value the condition is evaluated against.

Responses

200 with data.matched and data.error (null when the condition evaluated).

Errors

Example

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Body

application/json
condition
string
required

A router branch condition expression.

Required string length: 1 - 4000
sampleInput
any
required

The JSON value the condition is evaluated against.

Response

The condition's result

data
object
required
meta
object
required