Alerts API

Get Active Alerts

Get active alerts (rules currently in ALERT state).

Returns only alert rules that are currently in ALERT state.

Query params:

  • project_id: Filter by project ID (optional)
  • metric: Filter by metric type (optional)
get
https://api.dev.poly.ai/v1/alerts

Query Parameters

project_idstring

Filter by project ID

metric

Filter by metric

Allowed values:turn_latency_p50turn_latency_p95api_errorsfunction_errorscall_crashescall_volume

Response

application/json

Successful Response

ActiveAlertsListResponse

Every rule currently in the triggered state.

dataarray[object]required

A rule currently in the triggered state, including when it first
crossed the threshold.

Show Child Parameters
get/v1/alerts
 
application/json

ActiveAlertResponse

object

A rule currently in the triggered state, including when it first
crossed the threshold.

alert_rule_idstringrequired

Alert rule ID

namestringrequired

Alert rule name

project_idstring

Project ID

metricstringrequired

Metric being monitored

operatorstringrequired

Comparison operator

threshold_valueintegerrequired

Threshold value

window_durationstringrequired

Window duration (5m, 10m, or 60m)

sincestring(date-time)required

When the alert started

last_evaluated_atstring(date-time)

Last evaluation timestamp

current_valueinteger

Current metric value

Example

ActiveAlertsListResponse

object

Every rule currently in the triggered state.

dataarray[object]required

A rule currently in the triggered state, including when it first
crossed the threshold.

Show Child Parameters
Example

AlertMetric

Alert metric enum

Allowed values:turn_latency_p50turn_latency_p95api_errorsfunction_errorscall_crashescall_volume

AlertOperator

Alert operator enum

Allowed values:><>=<=