Uptime monitoring
JSON path matching
Validate API response content.
Overview
JSON path matching allows you to validate API response content beyond just status codes. You can verify that specific fields contain expected values.
Enabling JSON matching
- Create or edit an HTTP monitor
- In advanced settings, enable Response body validation
- Enter the JSON path expression
- Enter the expected value
- Save the monitor
JSON path syntax
JSON path uses dot notation to navigate JSON structures:
// Example API response
{
"status": "healthy",
"data": {
"version": "2.1.0",
"services": ["api", "database"]
}
}| JSON path | Returns |
|---|---|
| status | "healthy" |
| data.version | "2.1.0" |
| data.services[0] | "api" |
JSON path matching only works with APIs that return valid JSON. Ensure the response Content-Type is application/json.