Uptime monitoring
API monitoring with real request bodies and JSON assertions
A health endpoint returning 200 is not the same as a working API. Statance can send any method with custom headers and body, then assert on a value inside the JSON response — so you can check that the database field reads “ok”, not just that the web server is up.
What to monitor on API monitoring
- 01Status codeConfigure the expected range, e.g. 200-299 or 401 for an auth-protected endpoint.
- 02Response timePer region, charted over time.
- 03JSON valueAssert on a path such as status.db equals ok.
Set it up
Create a JSON monitor
Set the URL, method, headers (for example an Authorization header) and request body.
Add an assertion
json_path: status.db, json_expected: ok
Or create it from the API
curl -X POST https://api.statance.com/v1/monitors \ -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \ -d '{"name":"Orders API","type":"json","target":"https://api.example.com/health", "interval_sec":60,"config":{"json_path":"status.db","json_expected":"ok"}}'
Recommended alerts for API monitoring
- Unexpected status code
- JSON assertion fails
- Timeout
- Recovery
API monitoring monitoring FAQ
Can I send authentication headers?
Yes. Headers are stored with the monitor. Use a read-only token dedicated to monitoring.
Can I monitor GraphQL?
Yes — use POST with a JSON body containing your query, then assert on a field in the response.
Know before your users do.
Free forever for 3 servers and 10 monitors. No credit card. Install the agent in under a minute.