HTTP monitors
Requests a URL on a fixed interval, records each result with status and latency, opens an incident after three consecutive failed results, and records recovery on the next pass.
What http monitors does
Requests a URL on a fixed interval, records each result with status and latency, opens an incident after three consecutive failed results, and records recovery on the next pass.
When to use http monitors
- Public API health
- An agent's HTTP endpoint
- Staging smoke checks
Authentication
Send an API key as a bearer token. Keys are shown once, belong in a server environment, and are bound to one environment: flw_test_ keys act in test and flw_live_ keys in live.
Authorization: Bearer flw_test_••••Endpoint
POST https://api.flowyn.dev/v1/monitorsRequest
Send an Idempotency-Key so a retried request cannot create a duplicate. The body is JSON.
curl -X POST https://api.flowyn.dev/v1/monitors \
-H "Authorization: Bearer $FLOWYN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: monitor-prod-health" \
-d '{
"name": "Production API",
"type": "http",
"method": "GET",
"url": "https://api.example.com/health",
"interval_seconds": 60,
"timeout_ms": 5000,
"assertions": [
{
"source": "status_code",
"operator": "equals",
"expected": 200
}
]
}'Response
Flowyn returns HTTP 201. The response is abridged here; the OpenAPI document lists every field.
{
"id": "8e3c5a7b-1d9f-4e2a-b6c4-0a7f3d1e9b52",
"environment": "test",
"name": "Production API",
"type": "http",
"enabled": true,
"paused": false,
"current_status": "waiting",
"method": "GET",
"url": "https://api.example.com/health",
"interval_seconds": 60,
"timeout_ms": 5000,
"last_checked_at": null
}Lifecycle
- Create the monitor. The first check runs within the interval.
- Each check stores a result with status, latency, and evidence for failed assertions.
- Three consecutive failed results open an incident.
- The next passing result closes the incident as recovered. Read incidents with
GET /v1/monitors/{id}/incidents.
Status values
| Status | Meaning |
|---|---|
| waiting | No result yet. |
| healthy | The latest result passed. |
| degraded | Results are mixed. |
| failing | Recent results failed. |
| paused | Not checking. |
Retries
Monitors do not retry a check; they check again at the next interval.
Idempotency
Send Idempotency-Key on create.
Errors
| Status | type | Meaning |
|---|---|---|
| 400 | invalid_request | The body is not valid JSON, a field has the wrong type, or the body is over 1 MiB (body_too_large). |
| 401 | unauthorized | Missing, malformed, or revoked API key. |
| 402 | billing_error | The monthly credit allowance is used (credit_limit_exceeded). Reads keep working. |
| 403 | forbidden | The key lacks the ability this call needs (ability_required). |
| 404 | not_found | The id does not exist in this environment. |
| 409 | conflict | For example idempotency_mismatch: the Idempotency-Key was used with a different body. |
| 422 | invalid_request | A field value is out of range, for example invalid_timeout. |
| 429 | rate_limited | Too many requests (rate_limit_exceeded). Wait for Retry-After seconds. |
| 5xx | server_error | Flowyn failed. The body carries an error_id to quote to support. |
Limits
interval_seconds30–86,400timeout_ms100–30,000- Up to 20 assertions
Read it back
Keep the id and read the resource whenever you need its current state.
curl https://api.flowyn.dev/v1/monitors/8e3c5a7b-1d9f-4e2a-b6c4-0a7f3d1e9b52/results \
-H "Authorization: Bearer $FLOWYN_API_KEY"Related
Next step
Watch processes that cannot be polled with Heartbeats.
