```json
{
"tests": [
{
"name": "test_auth_validation",
"endpoint": "/zones",
"method": "GET",
"headers": {
"Authorization": "Bearer {api_key}",
"Content-Type": "application/json"
},
"payload": {},
"expected_status": 200,
"expected_behavior": "Returns list of zones with valid authentication",
"metrics": ["latency", "status_code"],
"validation": {"field": "result", "type": "array"}
},
{
"name": "test_cache_reserve_settings_read",
"endpoint": "/zones/{zone_id}/settings/cache_reserve",
"method": "GET",
"headers": {
"Authorization": "Bearer {api_key}",
"Content-Type": "application/json"
},
"payload": {},
"expected_status": 200,
"expected_behavior": "Returns Cache Reserve setting status for zone",
"metrics": ["latency", "accuracy", "status_code"],
"validation": {"field": "result", "type": "object", "required_fields": ["id", "value"]}
},
{
"name": "test_account_calls_sessions",
"endpoint": "/accounts/{account_id}/calls/sessions",
"method": "GET",
"headers": {
"Authorization": "Bearer {api_key}",
"Content-Type": "application/json"
},
"payload": {},
"expected_status": 200,
"expected_behavior": "Returns list of active real-time communication sessions",
"metrics": ["latency", "accuracy", "status_code"],
"validation": {"field": "result", "type": "array"}
},
{
"name": "test_invalid_zone_id_error",
"endpoint": "/zones/invalid-zone-id/settings/cache_reserve",
"method": "GET",
"headers": {
"Authorization": "Bearer {api_key}",
"Content-Type": "application/json"
},
"payload": {},
"expected_status": 400,
"expected_behavior": "Returns error for invalid zone ID",
"metrics": ["latency", "error_handling"],
"validation": {"field": "success", "type": "boolean", "expected_value": false}
},
{
"name": "test_unauthorized_request",
"endpoint": "/zones",
"method": "GET",
"headers": {
"Authorization": "Bearer invalid-token",
"Content-Type": "application/json"
},
"payload": {},
"expected_status": 401,
"expected_behavior": "Returns authentication error with invalid token",
"metrics": ["latency", "error_handling"],
"validation": {"field": "success", "type": "boolean", "expected_value": false}
},
{
"name": "test_cache_reserve_patch_dry_run",
"endpoint": "/zones/{zone_id}/settings/cache_reserve",
"method": "PATCH",
"headers": {
"Authorization": "Bearer {api_key}",
"Content-Type": "application/json"
},
"payload": {"value": "on"},
"expected_status": 200,
"expected_behavior": "Updates Cache Reserve setting successfully",
"metrics": ["latency", "accuracy", "status_code"],
"validation": {"field": "result", "type": "object", "required_fields": ["id", "value"]}
}
],
"pricing_probes": [
{
"name": "verify_request_count_tracking",
"description": "Make multiple API calls and check if usage is tracked against monthly limit",
"endpoint": "/zones",
"method": "GET",
"payload": {},
"check": "Monitor response headers for any usage indicators or rate limit headers"
},
{
"name": "verify_rate_limit_headers",
"description": "Check if Cloudflare returns rate limit information in headers",
"endpoint": "/zones",
"method": "GET",
"payload": {},
"check": "Look for X-RateLimit-* headers indicating 1200 RPM limit compliance"
}
],
"stress_profile": {
"concurrent_requests": 3,
"duration_seconds": 15,
"ramp_up": true
}
}
```