Alert Routes V2

Create and manage alert routes.

Alert routes take alerts from alert sources, filter them according to conditions, apply grouping on alert attributes, then finally create:

  1. Incidents
  2. Escalations

These are best configured in the incident.io dashboard and exported via the UI to Terraform, as the configuration is complex.

Create Alert Routes V2

Create an alert route.

We recommend you create alert routes in the incident.io dashboard where we allow previewing filter and grouping rules.

Request
Request Body schema: application/json
required
Array of objects (AlertRouteAlertSourcePayloadV2)

Which alert sources should this alert route match?

auto_decline_enabled
boolean

Should triage incidents be declined when alerts are resolved?

Array of objects (ConditionGroupPayloadV2)

What condition groups must be true for this alert route to fire?

defer_time_seconds
integer <int64>

How long should the escalation defer time be?

enabled
boolean

Whether this alert route is enabled or not

Array of objects (AlertRouteEscalationBindingPayloadV2)

Which escalation paths should this alert route escalate to?

Array of objects (ExpressionPayloadV2)

The expressions used in this template

Array of objects (GroupingKeyV2)

Which attributes should this alert route use to group alerts?

grouping_window_seconds
integer <int64>

How large should the grouping window be?

Array of objects (ConditionGroupPayloadV2)

What condition groups must be true for this alert route to create an incident?

incident_enabled
boolean

Whether this alert route will create incidents or not

name
string

The name of this alert route config, for the user's reference

object (AlertRouteIncidentTemplatePayloadV2)
Responses
201

Created response.

post/v2/alert_routes
Request samples
application/json
{
  • "alert_sources": [
    ],
  • "auto_decline_enabled": false,
  • "condition_groups": [
    ],
  • "defer_time_seconds": 1,
  • "enabled": false,
  • "escalation_bindings": [
    ],
  • "expressions": [
    ],
  • "grouping_keys": [
    ],
  • "grouping_window_seconds": 1,
  • "incident_condition_groups": [
    ],
  • "incident_enabled": false,
  • "name": "Production incidents",
  • "template": {
    }
}
Response samples
application/json
{
  • "alert_route": {
    }
}

Destroy Alert Routes V2

Archives an alert route.

We recommend you create alert routes in the incident.io dashboard where we allow previewing filter and grouping rules.

Request
path Parameters
id
required
string

Unique identifier for this alert route config

Example: 01FCNDV6P870EA6S7TK1DSYDG0
Responses
204

No Content response.

delete/v2/alert_routes/{id}
Request samples

Show Alert Routes V2

Show an alert route.

We recommend you create alert routes in the incident.io dashboard where we allow previewing filter and grouping rules.

Request
path Parameters
id
required
string

Unique identifier for this alert route config

Example: 01FCNDV6P870EA6S7TK1DSYDG0
Responses
200

OK response.

get/v2/alert_routes/{id}
Request samples
Response samples
application/json
{
  • "alert_route": {
    }
}

Update Alert Routes V2

Updates an alert route.

We recommend you create alert routes in the incident.io dashboard where we allow previewing filter and grouping rules.

Request
path Parameters
id
required
string

Unique identifier for this alert route config

Example: 01FCNDV6P870EA6S7TK1DSYDG0
Request Body schema: application/json
required
required
Array of objects (AlertRouteAlertSourcePayloadV2)

Which alert sources should this alert route match?

auto_decline_enabled
required
boolean

Should triage incidents be declined when alerts are resolved?

required
Array of objects (ConditionGroupPayloadV2)

What condition groups must be true for this alert route to fire?

defer_time_seconds
required
integer <int64>

How long should the escalation defer time be?

enabled
required
boolean

Whether this alert route is enabled or not

required
Array of objects (AlertRouteEscalationBindingPayloadV2)

Which escalation paths should this alert route escalate to?

Array of objects (ExpressionPayloadV2)

The expressions used in this template

required
Array of objects (GroupingKeyV2)

Which attributes should this alert route use to group alerts?

grouping_window_seconds
required
integer <int64>

How large should the grouping window be?

required
Array of objects (ConditionGroupPayloadV2)

What condition groups must be true for this alert route to create an incident?

incident_enabled
required
boolean

Whether this alert route will create incidents or not

name
required
string

The name of this alert route config, for the user's reference

object (AlertRouteIncidentTemplatePayloadV2)
Responses
200

OK response.

put/v2/alert_routes/{id}
Request samples
application/json
{
  • "alert_sources": [
    ],
  • "auto_decline_enabled": false,
  • "condition_groups": [
    ],
  • "defer_time_seconds": 1,
  • "enabled": false,
  • "escalation_bindings": [
    ],
  • "expressions": [
    ],
  • "grouping_keys": [
    ],
  • "grouping_window_seconds": 1,
  • "incident_condition_groups": [
    ],
  • "incident_enabled": false,
  • "name": "Production incidents",
  • "template": {
    }
}
Response samples
application/json
{
  • "alert_route": {
    }
}