API Checks
API Checks go beyond simple HTTP monitoring by letting you define multi-step sequences of HTTP requests with complex assertions. Test authentication flows, CRUD operations, and API contracts in production.
Plan requirement: OPS and above.
HOW IT WORKS
Section titled “HOW IT WORKS”An API Check is an ordered sequence of steps. Each step makes an HTTP request and validates the response against one or more assertions. Variables can be extracted from responses and used in subsequent steps.
Step 1: POST /auth/login → extract tokenStep 2: GET /api/resources (with token) → assert 200 + JSON schemaStep 3: DELETE /api/resources/:id → assert 204STEP CONFIGURATION
Section titled “STEP CONFIGURATION”Each step supports:
| Field | Description |
|---|---|
name |
Step label for reporting |
method |
HTTP method |
url |
Full URL (supports ${variable} interpolation) |
headers |
Request headers (supports variables) |
body |
Request body (supports variables) |
timeout |
Per-step timeout in ms (default: 10000) |
assertions |
Array of assertion rules |
extractions |
Variables to extract from the response |
7 ASSERTION TYPES
Section titled “7 ASSERTION TYPES”| Type | Description | Example |
|---|---|---|
status_code |
HTTP status code check | Equals 200 |
response_time |
Total response duration | Under 1500ms |
header |
Response header value | Content-Type contains json |
body |
Raw body string match | Contains "success" |
json_path |
JSONPath expression match | $.data.id is not empty |
regex |
Regex pattern against body | Matches "token":"[a-f0-9]{32}" |
body_size |
Response body size | Under 50KB |
VARIABLE EXTRACTION
Section titled “VARIABLE EXTRACTION”Extract values from responses to use in subsequent steps:
{ "extractions": [ { "name": "auth_token", "source": "body", "path": "$.token" }, { "name": "resource_id", "source": "body", "path": "$.data[0].id" }, { "name": "request_id", "source": "header", "header": "X-Request-Id" } ]}Use extracted variables with ${variable_name} syntax:
{ "headers": { "Authorization": "Bearer ${auth_token}" }, "url": "https://api.acme.com/resources/${resource_id}"}FULL EXAMPLE
Section titled “FULL EXAMPLE”{ "name": "User CRUD Flow", "steps": [ { "name": "Authenticate", "method": "POST", "url": "https://api.acme.com/auth/login", "headers": { "Content-Type": "application/json" }, "body": "{\"email\":\"test@acme.com\",\"password\":\"${TEST_PASSWORD}\"}", "assertions": [ { "type": "status_code", "operator": "equals", "value": 200 }, { "type": "json_path", "path": "$.token", "operator": "not_empty" } ], "extractions": [ { "name": "token", "source": "body", "path": "$.token" } ] }, { "name": "Create Resource", "method": "POST", "url": "https://api.acme.com/resources", "headers": { "Authorization": "Bearer ${token}", "Content-Type": "application/json" }, "body": "{\"name\":\"Test Resource\"}", "assertions": [ { "type": "status_code", "operator": "equals", "value": 201 }, { "type": "response_time", "operator": "less_than", "value": 2000 } ], "extractions": [ { "name": "resource_id", "source": "body", "path": "$.id" } ] }, { "name": "Verify Resource", "method": "GET", "url": "https://api.acme.com/resources/${resource_id}", "headers": { "Authorization": "Bearer ${token}" }, "assertions": [ { "type": "status_code", "operator": "equals", "value": 200 }, { "type": "json_path", "path": "$.name", "operator": "equals", "value": "Test Resource" } ] } ]}SCHEDULING
Section titled “SCHEDULING”API Checks run on a configurable interval (minimum 60 seconds). Each execution runs the full step sequence. If any step fails, the check is marked as failed and subsequent steps are skipped.
Results include per-step timing, assertions results, and extracted variable values for debugging.