Where it is raised
POST /api/v1/checksPATCH /api/v1/checks/{id}/assertions
What triggers it
Each assertion group must be complete: a body condition needs its text, a header assertion needs name, condition and value together, and a status range needs its bounds in order. The create route runs this check before the interval check. Setting assertions on a monitor that is not http answers Response assertions are only available on http monitors.
Example response
PATCH /api/v1/checks/{id}/assertions
HTTP 400
{
"error": "A body assertion needs both a condition and text to look for.",
"code": "RU-3004"
}Common causes
- An assertion operator supplied without its value, or vice versa.
- A status range like 500–200.
- A JSON path with no condition, an "exists" condition given a value it does not take, or an "equals"/"contains" condition with no value.
- A JSON path using a wildcard, a filter expression, or recursive descent, none of which are supported.
- Setting response assertions on a TCP, SMTP, or heartbeat monitor.
How to fix it
- Pair every assertion operator with a value.
- Keep status ranges min ≤ max.
- Write JSON paths as plain keys and indexes, for example data.items[0].status.
- Only set response assertions on http monitors.