Skip to content

Outputs & assertions

Request nodes can do two things with a response: extract values into named outputs for later nodes, and assert that values match what you expect. Both are built on the same extractors.

ExtractorReadsExample
jsonPathA value from a JSON body, using RFC 9535 JSONPath$.id, $.data[0].status
xmlPathA value from an XML body, using XPath/order/status
statusCodeThe HTTP status code201
headerA named response headerContent-Type
bodyThe raw response bodyfull text

An output gives an extracted value a name that later nodes can reference with {{double_brace}} syntax. Extract the payment ID after POST /payments, then use {{payment_id}} in the next request:

Terminal window
echopoint flows node output add <flow-id> <node-id> \
--name payment_id --extractor jsonPath --path "$.id"
# Status code and header outputs work the same way
echopoint flows node output add <flow-id> <node-id> \
--name status --extractor statusCode
echopoint flows node output add <flow-id> <node-id> \
--name content_type --extractor header --header-name "Content-Type"

An assertion pairs an extractor with one of 14 operators and an expected value:

OperatorPasses when the actual value…
equalsexactly equals the expected value
notEqualsdiffers from the expected value
containscontains the expected value as a substring
notContainsdoes not contain the expected value
startsWithbegins with the expected value
endsWithends with the expected value
regexmatches the expected regular expression
emptyis empty (no expected value needed)
notEmptyis not empty (no expected value needed)
greaterThanis numerically greater than the expected value
lessThanis numerically less than the expected value
greaterThanOrEqualis numerically greater than or equal
lessThanOrEqualis numerically less than or equal
betweenfalls within the expected numeric range

Add assertions from the CLI with flows node assertion add:

Terminal window
# Assert the payment was created
echopoint flows node assertion add <flow-id> <node-id> \
--extractor statusCode --operator equals --value "201"
# Assert the payment succeeded
echopoint flows node assertion add <flow-id> <node-id> \
--extractor jsonPath --path "$.status" --operator equals --value "succeeded"
# Assert the body mentions the currency
echopoint flows node assertion add <flow-id> <node-id> \
--extractor body --operator contains --value "eur"

Every assertion is recorded — pass or fail

Section titled “Every assertion is recorded — pass or fail”

Each assertion result is stored with three fields: expected, actual, and passed. This happens on passing runs too, not just failures. When a run goes green you can still open any node and confirm what the API actually returned — useful when an equals assertion passes for the wrong reason, or when you are reviewing a run someone else launched.

  • On the canvas: after a run, each node shows its result. Open a node to see its assertion results with expected vs actual values side by side.
  • In run history: every execution keeps the full set of per-node assertion results, so you can compare what a flow returned across runs.