API Diagnosis
APXY can analyze historical traffic to produce health reports for API endpoints, and execute live batch requests to test multiple endpoints at once.
Web UI
After you run diagnosis or batch commands, review the resulting traffic in the Capture group and compare patterns in the Analyze views.
CLI
Diagnose from historical traffic
Analyze captured traffic for a set of endpoints and report which are healthy, degraded, failing, or missing:
apxy tools request diagnose --file endpoints.json --format markdown| Flag | Default | Description |
|---|---|---|
--file | — | JSON file with endpoint specs (required) |
--time-range | 60 | Minutes of history to search |
--match-mode | contains | URL matching: exact, contains, prefix |
--format | markdown | Output format: json, markdown, toon |
Batch request execution
Execute multiple live HTTP requests and optionally compare against historical traffic:
apxy tools request batch --file endpoints.json --compare-history --format markdown| Flag | Default | Description |
|---|---|---|
--file | — | JSON file with endpoint specs (required) |
--compare-history | false | Compare with historical traffic |
--time-range | 60 | History window in minutes |
--timeout | 10000 | Per-request timeout in ms |
--format | markdown | Output format |
Endpoint file format
Both commands accept a JSON array of endpoint definitions:
[
{
"url": "https://api.example.com/v1/users",
"method": "GET",
"expected_status": 200,
"description": "User listing API"
},
{
"url": "https://api.example.com/v1/auth/token",
"method": "POST",
"headers": {"Content-Type": "application/json"},
"body": "{\"grant_type\":\"client_credentials\"}",
"expected_status": 200,
"timeout_ms": 5000,
"description": "Auth token endpoint"
}
]| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | Endpoint URL |
method | string | no | HTTP method (default: GET) |
headers | object | no | Request headers |
body | string | no | Request body |
expected_status | int | no | Expected HTTP status |
description | string | no | Human-readable description |
timeout_ms | int | no | Per-request timeout |
Use Cases
Debug a broken screen
A screen in your app is broken — extract the API endpoints it calls, save them to a file, and diagnose:
# Create endpoints.json with the screen's 4 required APIs
apxy tools request diagnose --file endpoints.json --format markdownThe report shows which endpoint is healthy, degraded, or failing.
Smoke test after deployment
Run a batch test against all critical endpoints after deploying:
apxy tools request batch --file critical-endpoints.json --compare-history --format markdownThis executes each request live and compares the results with historical traffic to detect regressions.