Core Concepts
API Monitor
Monitor HTTP/HTTPS endpoints with custom methods, payloads, and eval logic
API monitors send HTTP requests and evaluate the response with JavaScript.
Minimum setup
- Set
url - Choose
method(defaultGET) - Set
timeout(default10000ms) - Save (optional: custom
evalfunction)
Configuration fields
| Field | Type | Default | Notes |
|---|---|---|---|
url |
string |
— | Required |
method |
GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS |
GET |
|
headers |
{ key, value }[] |
[] |
Optional custom headers |
body |
string |
"" |
Sent for non-GET/HEAD methods |
timeout |
number |
10000 |
Request timeout in ms |
allowSelfSignedCert |
boolean |
false |
Disables TLS verify when true |
eval |
string (JS function) |
built-in default | Receives response details |
Default eval behavior
Built-in eval marks the monitor UP when:
- status code is
429, or - status code is in
2xxor3xx
Otherwise it returns DOWN.
Custom eval contract
Your function receives:
statusCoderesponseTimeresponseRawmodules(currently includescheerio)
It must return:
{ status: "UP" | "DEGRADED" | "DOWN" | "MAINTENANCE", latency: number }
Example
{
"type": "API",
"type_data": {
"url": "https://api.example.com/health",
"method": "GET",
"timeout": 10000
}
}
Troubleshooting
- Always DOWN: verify URL/method/headers/body
- TLS errors: enable
allowSelfSignedCertonly for trusted self-signed endpoints - Eval errors: simplify eval and validate return shape