Skip to main content

Endpoint Conditions

Endpoint conditions control whether an endpoint executes during a collection based on runtime data. Use conditions to skip endpoints when their prerequisites aren't met — for example, skip a detail endpoint if the list endpoint returned no results.

Overview

Each endpoint can have one or more execution conditions. These are evaluated at runtime against the current test data or collection state. If the conditions aren't met, the endpoint is skipped and its response shows a "skipped" status with the reason.

Condition Types

Endpoint Conditions

Check values from a preceding endpoint's response:

FieldDescription
Source endpointWhich endpoint's response to check (must execute before this one)
JSON pathPath to the value in the response
OperatorHow to compare
ValueExpected value (for comparison operators)

Variable Conditions

Check the number of values in a reusable variable:

FieldDescription
Source variableWhich variable to check
OperatorHow to compare the value count
ValueExpected count

Operators

OperatorDescriptionExample
equalsValue matches exactlystatus equals "active"
not_equalsValue doesn't matchtype not_equals "archived"
existsValue is present (not null/undefined)data exists
not_existsValue is absenterror not_exists
greater_thanNumeric comparisoncount greater_than 0
less_thanNumeric comparisontotal less_than 1000
containsString contains substringname contains "admin"

Logic Modes

When an endpoint has multiple conditions, choose how they combine:

All (AND)

Every condition must pass for the endpoint to execute. If any condition fails, the endpoint is skipped.

Condition 1: GET /users returned data.length > 0   ✓
Condition 2: Variable "OrgIds" has > 0 values ✓
Logic: All (AND)
Result: ✓ Endpoint executes

Any (OR)

At least one condition must pass. The endpoint is only skipped if all conditions fail.

Condition 1: GET /users returned data.length > 0   ✗
Condition 2: GET /admins returned data.length > 0 ✓
Logic: Any (OR)
Result: ✓ Endpoint executes

Configuring Conditions

Adding a Condition

  1. Open the endpoint configuration
  2. Find the Execution Conditions section
  3. Click Add Condition
  4. Choose condition type (endpoint or variable)
  5. Configure the source, path, operator, and value

Choosing Logic Mode

Toggle between All (AND) and Any (OR) using the logic selector above the condition list.

Live Evaluation

The condition editor shows real-time evaluation against current test data:

  • Green indicator: Condition passes with current data
  • Red indicator: Condition fails with current data
  • Summary badge: Shows overall result (pass/fail) based on logic mode

This makes it easy to verify conditions before running a collection — test the relevant endpoints first, then check that conditions evaluate correctly.

Use Cases

Skip Detail Endpoint When List Is Empty

Endpoint: GET /users/{userId}/profile
Condition: GET /users response → users.length greater_than 0

If the users list endpoint returned no users, there's nothing to look up — skip the profile endpoint.

Conditional Branches Based on API Response

Endpoint: GET /v2/enhanced-search
Condition: GET /api-info response → features.enhancedSearch equals true

Only call the enhanced search endpoint if the API reports it supports the feature.

Variable-Based Gating

Endpoint: GET /orgs/{orgId}/audit-log
Condition: Variable "OrgIds" has greater_than 0 values

Skip the audit log endpoint if no organization IDs were collected.

Skipped Endpoint Behavior

When conditions aren't met:

  • The endpoint is marked as skipped in the test results
  • A skip reason is recorded (e.g., "Condition failed: users.length > 0")
  • The response shows skipped: true with the reason
  • Downstream endpoints that depend on this one are also affected

Troubleshooting

"Condition always fails"

  1. Ensure the source endpoint has been tested (conditions evaluate against test data)
  2. Verify the JSON path matches the actual response structure
  3. Check operator and value are correct
  4. Use the live evaluation indicators to identify which condition fails

"Condition always passes when it shouldn't"

  1. Check for typos in the JSON path
  2. Verify the operator direction (greater_than vs less_than)
  3. For exists, note that an empty array [] does exist — use greater_than 0 for length checks

"Endpoint skipped unexpectedly in collection"

  1. Review which conditions are configured
  2. Check if the source endpoint failed (failed source = no data = condition may fail)
  3. Verify logic mode (AND vs OR)