Notifications API

Estimate how often a rule would have fired

Changed on

Replays the stored logs of the window (default: last 24 hours, at most 7 days) through the rule, including digest, quiet hours and cooldown. Nothing is sent.

post/rest/api/v1/projects/{projectId}/notificationRules/preview

Request

Path parameters

projectIdstring uuid required

Request body

fromstring date-time

Start, default 24 hours ago

tostring date-time

End, default now; at most 7 days after from

Example request

{
  "rule": {
    "cooldown": {
      "minutes": 15
    },
    "digest": {
      "windowSeconds": 60
    },
    "kind": "RULE",
    "name": "Errors to Teams",
    "quietHours": {
      "after": "SUMMARY",
      "from": "22:00",
      "timeZone": "Europe/Zurich",
      "to": "07:00"
    },
    "targets": [
      {
        "recipient": "@john"
      }
    ]
  }
}

Response

OK

assumptionsstring[]

What the estimate assumes

completeboolean

All entries in the range were evaluated

estimatedRequestCountinteger

Estimated provider requests over all channels

evaluatedCountinteger

Log entries evaluated

fromstring date-time

Simulated start

matchedCountinteger

Entries matching the rule

tostring date-time

Simulated end

truncatedboolean

More than 10000 entries; the result is a sample

unclassifiedCountinteger

Entries without event metadata (logged before tagging)

Changes