Skip to Content
Advanced FeaturesAPI Diagnosis

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
FlagDefaultDescription
--fileJSON file with endpoint specs (required)
--time-range60Minutes of history to search
--match-modecontainsURL matching: exact, contains, prefix
--formatmarkdownOutput 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
FlagDefaultDescription
--fileJSON file with endpoint specs (required)
--compare-historyfalseCompare with historical traffic
--time-range60History window in minutes
--timeout10000Per-request timeout in ms
--formatmarkdownOutput 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" } ]
FieldTypeRequiredDescription
urlstringyesEndpoint URL
methodstringnoHTTP method (default: GET)
headersobjectnoRequest headers
bodystringnoRequest body
expected_statusintnoExpected HTTP status
descriptionstringnoHuman-readable description
timeout_msintnoPer-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 markdown

The 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 markdown

This executes each request live and compares the results with historical traffic to detect regressions.

Last updated on