Skip to main content
Get a list of all accessible alert definitions
curl --request GET \
  --url https://api.coralogix.com/mgmt/openapi/5/alerts/alerts/v3 \
  --header 'Authorization: <api-key>'
{
  "alertDefs": [
    {
      "alertDefProperties": {
        "logsRatioThreshold": {
          "denominator": {
            "simpleFilter": {
              "labelFilters": {
                "applicationName": [
                  {
                    "operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
                    "value": "my-app"
                  }
                ],
                "severities": [
                  "LOG_SEVERITY_VERBOSE_UNSPECIFIED"
                ],
                "subsystemName": [
                  {
                    "operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
                    "value": "my-app"
                  }
                ]
              },
              "luceneQuery": "<string>"
            }
          },
          "denominatorAlias": "denominator_alias",
          "evaluationDelayMs": 60000,
          "groupByFor": "LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED",
          "ignoreInfinity": true,
          "notificationPayloadFilter": [
            "obj.field"
          ],
          "numerator": {
            "simpleFilter": {
              "labelFilters": {
                "applicationName": [
                  {
                    "operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
                    "value": "my-app"
                  }
                ],
                "severities": [
                  "LOG_SEVERITY_VERBOSE_UNSPECIFIED"
                ],
                "subsystemName": [
                  {
                    "operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
                    "value": "my-app"
                  }
                ]
              },
              "luceneQuery": "<string>"
            }
          },
          "numeratorAlias": "numerator_alias",
          "rules": [
            {
              "condition": {
                "conditionType": "LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED",
                "threshold": 10,
                "timeWindow": {
                  "logsRatioTimeWindowSpecificValue": "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
                }
              },
              "override": {
                "priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED"
              }
            }
          ],
          "undetectedValuesManagement": {
            "autoRetireTimeframe": "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED",
            "triggerUndetectedValues": true
          }
        },
        "activeOn": {
          "dayOfWeek": [
            "DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED",
            "DAY_OF_WEEK_TUESDAY"
          ],
          "endTime": {
            "hours": 14,
            "minutes": 30
          },
          "startTime": {
            "hours": 14,
            "minutes": 30
          }
        },
        "dataSources": [
          {
            "dataSet": "<string>",
            "dataSpace": "<string>"
          }
        ],
        "deleted": false,
        "description": "Alert description",
        "enabled": true,
        "entityLabels": {},
        "groupByKeys": [
          "key1",
          "key2"
        ],
        "incidentsSettings": {
          "minutes": 30,
          "notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
        },
        "name": "My Alert",
        "notificationGroup": {
          "destinations": [
            {
              "connectorId": "connector_id_example",
              "notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED",
              "presetId": "preset_id_example",
              "resolvedRouteOverrides": {
                "configOverrides": {
                  "connectorConfigFields": [
                    {
                      "fieldName": "description",
                      "template": "template_example"
                    }
                  ],
                  "messageConfigFields": [
                    {
                      "fieldName": "description",
                      "template": "template_example"
                    }
                  ],
                  "payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
                }
              },
              "retriggeringPeriodMinutes": 600,
              "triggeredRoutingOverrides": {
                "configOverrides": {
                  "connectorConfigFields": [
                    {
                      "fieldName": "description",
                      "template": "template_example"
                    }
                  ],
                  "messageConfigFields": [
                    {
                      "fieldName": "description",
                      "template": "template_example"
                    }
                  ],
                  "payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
                }
              }
            }
          ],
          "groupByKeys": [
            "key1",
            "key2"
          ],
          "router": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
          },
          "webhooks": [
            {
              "integration": {
                "integrationId": 123
              },
              "minutes": 15,
              "notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
            }
          ]
        },
        "notificationGroupExcess": [
          {
            "destinations": [
              {
                "connectorId": "connector_id_example",
                "notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED",
                "presetId": "preset_id_example",
                "resolvedRouteOverrides": {
                  "configOverrides": {
                    "connectorConfigFields": [
                      {
                        "fieldName": "description",
                        "template": "template_example"
                      }
                    ],
                    "messageConfigFields": [
                      {
                        "fieldName": "description",
                        "template": "template_example"
                      }
                    ],
                    "payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
                  }
                },
                "retriggeringPeriodMinutes": 600,
                "triggeredRoutingOverrides": {
                  "configOverrides": {
                    "connectorConfigFields": [
                      {
                        "fieldName": "description",
                        "template": "template_example"
                      }
                    ],
                    "messageConfigFields": [
                      {
                        "fieldName": "description",
                        "template": "template_example"
                      }
                    ],
                    "payloadType": "slack_raw, slack_structured, pagerduty_triggered, pagerduty_resolved, generic_https_default"
                  }
                }
              }
            ],
            "groupByKeys": [
              "key1",
              "key2"
            ],
            "router": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
            },
            "webhooks": [
              {
                "integration": {
                  "integrationId": 123
                },
                "minutes": 15,
                "notifyOn": "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED"
              }
            ]
          }
        ],
        "phantomMode": false,
        "priority": "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED",
        "type": "ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED"
      },
      "alertVersionId": "<string>",
      "createdTime": "2023-10-01T12:00:00.000Z",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "lastTriggeredTime": "2023-10-01T12:00:00.000Z",
      "status": "ALERT_DEF_STATUS_UNSPECIFIED",
      "updatedTime": "2023-10-01T12:00:00.000Z"
    }
  ],
  "pagination": {
    "nextPageToken": "<string>",
    "totalSize": 123
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Query Parameters

query_filter
AlertDef query filter · object

Filter configuration for alert defs

pagination
object
order_bys
Alert definition order by list · object

List of fields to order alert definitions by

Response

A response that contains a list of alert definitions

alertDefs
Alert definition · object[]
pagination
object