JSON schema to validate alert payload
Use this JSON schema to validate the payload of an alert in end-to-end monitoring before sending it to external applications. Validation ensures data integrity and reliability in your APIs, integrations, and automation.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Webhook Notification Payload",
"type": "object",
"properties": {
"env": {
"type": "object",
"properties": {
"stage": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"stage",
"name"
]
},
"alert": {
"type": "object",
"properties": {
"start_time": {
"type": "string"
},
"status": {
"type": "string"
}
},
"required": [
"start_time",
"status"
]
},
"rule": {
"type": "object",
"properties": {
"rule_name": {
"type": "string"
},
"description": {
"type": "string"
},
"ruleexpression": {
"type": "object",
"properties": {
"ruleOperator": {
"type": "string"
},
"kpi": {
"type": "string"
},
"Time_range": {
"type": "string"
},
"rulevalue": {
"type": "string"
}
},
"required": [
"ruleOperator",
"kpi",
"Time_range",
"rulevalue"
]
},
"severity": {
"type": "string"
}
},
"required": [
"rule_name",
"description",
"ruleexpression",
"severity"
]
},
"group_statistics": {
"type": "object",
"properties": {
"group_name": {
"type": "string"
},
"total_transactions": {
"type": "integer"
},
"average_response_time_ms": {
"type": "number"
},
"error_count": {
"type": "integer"
},
"error_rate_percent": {
"type": "number"
},
"success_rate_percent": {
"type": "number"
}
},
"required": [
"group_name",
"total_transactions",
"average_response_time_ms",
"error_count",
"error_rate_percent",
"success_rate_percent"
]
},
"deeplink": {
"type": "string",
"format": "uri"
}
},
"required": [
"env",
"alert",
"rule",
"group_statistics",
"deeplink"
]
}