Preview alert
Team-scoped Alerts operation. Rule percentages use eligible invocations or processing attempts, not affected calls. An open incident emits one firing and one confirmed-recovery notification per selected member. Empty or stale windows never resolve an incident. Preview uses recent observations without notifications.
bearerAuthAuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
Idempotency-Key*stringRequired. Reuse the same key to retry this write safely. Retries and idempotency.
^[A-Za-z0-9!#$%&'*+.^_`|~-]+$1 <= length <= 255application/json- body
min_coverage_percent?integerMinimum successful processing coverage, in percent, for extraction result rules. Incomplete coverage cannot resolve incidents. 0 (or omitting the field) means the default of 80; a stored 0 is omitted from responses.
0 <= value <= 10080metric*stringSignal to watch. trunk_registration, outbound_redial_loop, campaign_auto_paused, dncr_unresolved, dncr_connection and the backlog signals support count aggregation only. For call, trunk and outbound signals resource_keys are SIP trunk IDs; DNCR and campaign signals take no resource_keys.
"tool_5xx""tool_timeout""tool_failure""webhook_failure""webhook_terminal""webhook_backlog""extraction_failure""extraction_backlog""extraction_result""call_failure""call_route_failure""call_unanswered""trunk_registration""outbound_redial_loop""campaign_auto_paused""dncr_provider_failure""dncr_rate_limited""dncr_registered""dncr_unresolved""dncr_connection"campaign_ids?array<>Campaigns to watch. Only for call_failure, call_route_failure, call_unanswered, outbound_redial_loop, campaign_auto_paused and the dncr_ signals; omitted or empty means every campaign and non-campaign call.
items <= 20failure_codes?array<>Only for call_failure. Counts only failed calls with one of these failure codes; omitted or empty counts every failure.
items <= 16aggregation*string"rate""count"severity*string"warning""critical"resource_keys*array<>items <= 20agent_ids*array<>items <= 20window_minutes*integer5101530601801440threshold*number0 <= valuerecovery_threshold*number0 <= valuemin_samples*integer1 <= value <= 1000000fire_for_minutes*integer0 <= value <= 60recover_for_minutes*integer0 <= value <= 60recipient_ids*array<>1 <= items <= 20include_tests*booleanfield?stringlength <= 120operator?string"eq""neq""gt""lt""missing"expected?string|number|booleanSuccessful Alerts operation
application/json- response
data*array<>coverage_note*stringcurl -X POST 'https://api.kejue.co/v1/alerts/preview' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "metric": "tool_5xx", "aggregation": "rate", "severity": "warning", "resource_keys": [ "string" ], "agent_ids": [ "06fc211d-6a87-43c8-9a41-e3b40320420d" ], "window_minutes": 5, "threshold": 0, "recovery_threshold": 0, "min_samples": 1, "fire_for_minutes": 0, "recover_for_minutes": 0, "recipient_ids": [ "bfa6ab48-642a-4965-a829-f20c353d1c93" ], "include_tests": true}'{ "data": [ { "at": "2019-08-24T14:15:22Z", "value": 0, "numerator": 0, "denominator": 0, "state": "string" } ], "coverage_note": "string"}