Policies
API endpoints for policies
policy_type, which selects exactly one matching
configuration block: a follow_up policy carries follow_up
config, a schedule policy carries schedule config, and so
on. Sending a block that doesn’t match the policy type is rejected.
The policy object
Conditions which determine which resources are in scope for this policy
Show child attributes
Show child attributes
[
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
]
"2021-08-17T13:28:57.801578Z"
Unique ID of the policy
"01G0J1EXE7AXZ2C93K61WBPYEH"
Human readable name of the policy
"Critical incidents must export follow-ups"
Type of the policy, specifying what this applies to
debrief, follow_up, on_call_readiness, post_mortem, schedule, vacation_conflict "follow_up"
Disabled policies stop evaluating but keep their config
enabled, disabled "enabled"
"2021-08-17T13:28:57.801578Z"
Show child attributes
Show child attributes
{
"bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"reminder_detected_date_offset_hours": [0, 48],
"reminder_due_date_offset_hours": [-24, 0, 24]
}
Set when policy_type is debrief.
Show child attributes
Show child attributes
{
"due_date_config": {
"applies_from": "2021-08-17T13:28:57.801578Z",
"calculation_timezone": "Europe/London",
"calculation_type": "weekdays",
"days": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
},
"incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"requirements": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
],
"run_on_private_incidents": false
}
Human readable description of the policy
"All critical incidents must export follow-ups to an external issue tracker before 7 days has passed since closure."
The expressions relating to this policy
Show child attributes
Show child attributes
[
{
"else_branch": {
"result": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
},
"label": "Team Slack channel",
"operations": [
{
"branches": {
"branches": [
{
"condition_groups": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
],
"result": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
}
],
"returns": { "array": true, "type": "IncidentStatus" }
},
"cast": {
"returns": { "array": true, "type": "IncidentStatus" }
},
"concatenate": {
"reference": "1235",
"reference_label": "Teams"
},
"filter": {
"condition_groups": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
]
},
"navigate": {
"reference": "1235",
"reference_label": "Teams"
},
"operation_type": "navigate",
"parse": {
"returns": { "array": true, "type": "IncidentStatus" },
"source": "metadata.annotations[\"github.com/repo\"]"
},
"returns": { "array": true, "type": "IncidentStatus" }
}
],
"reference": "abc123",
"returns": { "array": true, "type": "IncidentStatus" },
"root_reference": "incident.status"
}
]
Set when policy_type is follow_up.
Show child attributes
Show child attributes
{
"due_date_config": {
"applies_from": "2021-08-17T13:28:57.801578Z",
"calculation_timezone": "Europe/London",
"calculation_type": "weekdays",
"days": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
},
"incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"requirements": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
],
"run_on_private_incidents": false
}
Set when policy_type is on_call_readiness. The assignee is always the user in violation and cannot be configured.
Show child attributes
Show child attributes
{
"enforcement": "advisory",
"high_urgency": [
{
"max_delay_seconds": 300,
"method_types": ["slack"]
}
],
"low_urgency": [
{
"max_delay_seconds": 300,
"method_types": ["slack"]
}
]
}
Set when policy_type is post_mortem.
Show child attributes
Show child attributes
{
"due_date_config": {
"applies_from": "2021-08-17T13:28:57.801578Z",
"calculation_timezone": "Europe/London",
"calculation_type": "weekdays",
"days": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
},
"incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"requirements": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
],
"run_on_private_incidents": false
}
Detects gaps in on-call coverage. Set when policy_type is schedule.
Show child attributes
Show child attributes
{
"evaluation_level": "schedule",
"requirement_type": "contiguous"
}
Was this page helpful?
{
"conditions": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
],
"created_at": "2021-08-17T13:28:57.801578Z",
"id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"name": "Critical incidents must export follow-ups",
"policy_type": "follow_up",
"status": "enabled",
"updated_at": "2021-08-17T13:28:57.801578Z",
"assignment_rules": {
"bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"reminder_detected_date_offset_hours": [
0,
48
],
"reminder_due_date_offset_hours": [
-24,
0,
24
]
},
"debrief": {
"due_date_config": {
"applies_from": "2021-08-17T13:28:57.801578Z",
"calculation_timezone": "Europe/London",
"calculation_type": "weekdays",
"days": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
},
"incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"requirements": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
],
"run_on_private_incidents": false
},
"description": "All critical incidents must export follow-ups to an external issue tracker before 7 days has passed since closure.",
"expressions": [
{
"else_branch": {
"result": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
},
"label": "Team Slack channel",
"operations": [
{
"branches": {
"branches": [
{
"condition_groups": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
],
"result": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
}
],
"returns": {
"array": true,
"type": "IncidentStatus"
}
},
"cast": {
"returns": {
"array": true,
"type": "IncidentStatus"
}
},
"concatenate": {
"reference": "1235",
"reference_label": "Teams"
},
"filter": {
"condition_groups": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
]
},
"navigate": {
"reference": "1235",
"reference_label": "Teams"
},
"operation_type": "navigate",
"parse": {
"returns": {
"array": true,
"type": "IncidentStatus"
},
"source": "metadata.annotations[\"github.com/repo\"]"
},
"returns": {
"array": true,
"type": "IncidentStatus"
}
}
],
"reference": "abc123",
"returns": {
"array": true,
"type": "IncidentStatus"
},
"root_reference": "incident.status"
}
],
"follow_up": {
"due_date_config": {
"applies_from": "2021-08-17T13:28:57.801578Z",
"calculation_timezone": "Europe/London",
"calculation_type": "weekdays",
"days": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
},
"incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"requirements": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
],
"run_on_private_incidents": false
},
"on_call_readiness": {
"enforcement": "advisory",
"high_urgency": [
{
"max_delay_seconds": 300,
"method_types": [
"slack"
]
}
],
"low_urgency": [
{
"max_delay_seconds": 300,
"method_types": [
"slack"
]
}
]
},
"post_mortem": {
"due_date_config": {
"applies_from": "2021-08-17T13:28:57.801578Z",
"calculation_timezone": "Europe/London",
"calculation_type": "weekdays",
"days": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
},
"incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"requirements": [
{
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
]
}
],
"run_on_private_incidents": false
},
"schedule": {
"evaluation_level": "schedule",
"requirement_type": "contiguous"
}
}