Checkmate
Uptime monitoring

Response body matching

Validate HTTP response bodies with match method, expected value, and JMESPath.

HTTP monitors can check response bodies as well as status codes. The feature is labelled Advanced matching on the monitor create screen.

Fields

Turn on Advanced matching to reveal three fields:

  • Match methodEqual, Include, or Regex.
    • Equal: the value has to match exactly.
    • Include: the value must appear somewhere in the compared string.
    • Regex: the expected value is treated as a regular expression.
  • Expected value — the string (or regex) to compare against.
  • JSON path — a JMESPath expression. If set, Checkmate evaluates it against the parsed JSON body and compares the result against Expected value. If left blank, the match runs against the raw response body.

Examples

Response body:

{
  "status": "healthy",
  "data": { "version": "2.1.0", "services": ["api", "database"] }
}
Match methodJSON pathExpected valueResult
Equalstatushealthypass
Equaldata.version2.1.0pass
Includedata.servicesapipass
Regexdata.version^2\.pass

Leave the JSON path empty to match against the raw body. For example, Include + "status":"healthy" works on any response — JSON or not.

If a JSON path is set and the response is not valid JSON, the match fails. For non-JSON endpoints, leave the JSON path blank.

On this page