Incidents
Create an incident rule
Create an incident rule.
post/api/v2/incidents/config/rules
Request
- Base URLhttps://api.datadoghq.com
- Auth
- API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
- or OAuth 2Authorization code/oauth2/v1/authorizeToken URL/oauth2/v1/tokenScopesincident_settings_write
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"data": {
"attributes": {
"condition": {
"normalized_query": "severity:SEV-1",
"raw_query": "severity:SEV-1"
},
"condition_table_type": 1,
"conditions": [
{
"field": "severity",
"values": [
"SEV-1",
"SEV-2"
]
}
],
"enabled": true,
"execution_type": 1,
"incident_type_uuid": "00000000-0000-0000-0000-000000000000",
"task_id": "notify-incident-handles-job",
"task_payload": "{}",
"trigger": "incident_created_trigger"
},
"type": "incident_rules"
}
}Response
Created
Example response
{
"data": {
"attributes": {
"condition": {
"normalized_query": "severity:SEV-1",
"raw_query": "severity:SEV-1"
},
"condition_table_type": 1,
"conditions": [
{
"field": "severity",
"values": [
"SEV-1",
"SEV-2"
]
}
],
"created": "2024-01-01T00:00:00.000Z",
"created_by_uuid": "00000000-0000-0000-0000-000000000001",
"enabled": true,
"execution_type": 1,
"modified": "2024-01-01T00:00:00.000Z",
"modified_by_uuid": "00000000-0000-0000-0000-000000000001",
"org_id": 123456,
"task_id": "notify-incident-handles-job",
"task_payload": "{}",
"trigger": "incident_created_trigger"
},
"id": "00000000-0000-0000-0000-000000000000",
"type": "incidents_rules"
}
}Changes
Changes to this operation have not been checked yet.