ww-api-smoke
Run deterministic API smoke checks and save results for review.
Use when
- •You need a quick pass/fail check on one endpoint or a small flow.
- •You want reproducible debug artifacts in files (raw + extracted output).
- •You need browser API verification (
/browser/open,/browser/get_content) without manual copying.
Fast path
bash
# From repo root: .claude/skills/ww-api-smoke/scripts/smoke_api.sh \ --base http://127.0.0.1:8089 \ --open-url https://symbient.life \ --format text
This will:
- •Check
/health - •Open browser window via
/browser/open - •Fetch content via
/browser/get_content - •Write a timestamped report file under
cache/api-smoke/
Generic endpoint mode
bash
# From repo root: .claude/skills/ww-api-smoke/scripts/smoke_api.sh \ --base http://127.0.0.1:8089 \ --endpoint /state \ --method GET \ --extract windows[0].id
Flags
- •
--base <url>API base URL (defaulthttp://127.0.0.1:8089) - •
--open-url <url>browser auto-flow URL (enables/browser/openstep) - •
--window-mode <new|same>browser open mode (defaultnew) - •
--window-id <id>reuse existing browser window id - •
--endpoint <path>target endpoint (default/browser/get_content) - •
--method <GET|POST>HTTP method for target endpoint (defaultPOST) - •
--json <payload>request JSON string for target endpoint - •
--format <text|markdown|links>shorthand for/browser/get_contentpayload (defaulttext) - •
--wait-ms <n>delay after/browser/openbefore target call (default600) - •
--extract <path>extract a field using dotted path syntax (e.g.content,windows[0].id) - •
--out <path>output file path; defaultcache/api-smoke/TEMP_API_SMOKE_<timestamp>.txt - •
--rawkeep only raw output (skip extracted section) - •
--fail-on-invalid-jsonfail if response body is not valid JSON
Do not use when
- •A single one-off
curlis enough and no artifact file is needed. - •You are testing non-HTTP flows (C++ build, IPC socket protocol, direct TUI interaction).
Output
Report contains:
- •metadata (timestamp, endpoint, status, window_id)
- •raw response body
- •extracted field (if available)
Guardrails
- •Never assume API response JSON is valid; browser open can return malformed JSON if server escapes are wrong.
- •Parse
window_idwith JSON first, regex fallback second. - •Always write raw body for forensic debugging.
- •Prefer
/healthpreflight before endpoint calls.