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:
| Field | Description |
|---|---|
| Source endpoint | Which endpoint's response to check (must execute before this one) |
| JSON path | Path to the value in the response |
| Operator | How to compare |
| Value | Expected value (for comparison operators) |
Variable Conditions
Check the number of values in a reusable variable:
| Field | Description |
|---|---|
| Source variable | Which variable to check |
| Operator | How to compare the value count |
| Value | Expected count |
Operators
| Operator | Description | Example |
|---|---|---|
equals | Value matches exactly | status equals "active" |
not_equals | Value doesn't match | type not_equals "archived" |
exists | Value is present (not null/undefined) | data exists |
not_exists | Value is absent | error not_exists |
greater_than | Numeric comparison | count greater_than 0 |
less_than | Numeric comparison | total less_than 1000 |
contains | String contains substring | name 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
- Open the endpoint configuration
- Find the Execution Conditions section
- Click Add Condition
- Choose condition type (endpoint or variable)
- 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: truewith the reason - Downstream endpoints that depend on this one are also affected
Troubleshooting
"Condition always fails"
- Ensure the source endpoint has been tested (conditions evaluate against test data)
- Verify the JSON path matches the actual response structure
- Check operator and value are correct
- Use the live evaluation indicators to identify which condition fails
"Condition always passes when it shouldn't"
- Check for typos in the JSON path
- Verify the operator direction (greater_than vs less_than)
- For
exists, note that an empty array[]does exist — usegreater_than 0for length checks
"Endpoint skipped unexpectedly in collection"
- Review which conditions are configured
- Check if the source endpoint failed (failed source = no data = condition may fail)
- Verify logic mode (AND vs OR)
Related Documentation
- Endpoint Configuration - Where conditions are configured
- Execution Order - How skipped endpoints appear in the order
- Reusable Variables - Variables used in variable conditions