Text Validation in API Response
Verify your API returns expected content.
For non-JSON APIs or as complementary validation, text search in the body detects masked errors and unexpected content.
An API can return 200 OK with an error message in the body.
Why Validate Content
- Masked errors: some APIs return 200 with "error" in the body.
- Maintenance pages: detect "maintenance" or "temporarily unavailable".
- Dynamic content: verify a key element is present in the response.
Configuration
- Expected text: configure text that must be present (e.g., "success").
- Forbidden text: alert if "error", "exception", "maintenance" appears.
Frequently Asked Questions
Is the search case sensitive?
By default yes. You can configure case-insensitive search.
Can I use regex?
Yes, regular expressions allow complex validations.
How to combine JSON and text validation?
Add both assertion types in the same monitor.
What body size does MoniTao analyze?
The first 1 MB of the response is analyzed by default.
Useful Links
Ready to Sleep Soundly?
Start free, no credit card required.