Structured JSON assertions
36-json-paths.yaml
HTTP(S)
What this example does
This example demonstrates structured json assertions.
Checks and behavior
- Sends an GET request to https://api.example.invalid/health.
- Inspects structured JSON response values.
Adapt example domains, addresses, credentials and thresholds to your environment before use.
YAML configuration
name: Structured JSON assertions
url: https://api.example.invalid/health
tests:
json:
paths:
- path: status
equals: healthy
- path: database.connected
equals: true
- path: services
min_items: 2
- path: error
exists: false
- path: services.0.name
exists: true