Request
- Base URL: https://us.posthog.com
- URL: https://us.posthog.com/api/projects/{project_id}/logs/alerts/
- Auth: HTTP bearer
Path parameters
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request body
Unique identifier for this alert.
Human-readable name for this alert. Defaults to 'Untitled alert' on create when omitted.
Whether the alert is actively being evaluated. Disabling resets the state to not_firing.
Number of matching log entries that constitutes a threshold breach within the evaluation window. Defaults to 100. Use 0 with the 'above' operator to fire on any matching log.
- above - Above
- below - Below
Time window in minutes over which log entries are counted. Allowed values: 5, 10, 15, 30, 60.
How often the alert is evaluated, in minutes. Server-managed.
- not_firing - Not firing
- firing - Firing
- pending_resolve - Pending resolve
- errored - Errored
- snoozed - Snoozed
- broken - Broken
Total number of check periods in the sliding evaluation window for firing (M in N-of-M).
How many periods within the evaluation window must breach the threshold to fire (N in N-of-M).
Minimum minutes between repeated notifications after the alert fires. 0 means no cooldown.
ISO 8601 timestamp until which the alert is snoozed. Set to null to unsnooze.
When the next evaluation is scheduled. Server-managed.
When the last notification was sent. Server-managed.
When the alert was last evaluated. Server-managed.
Number of consecutive evaluation failures. Resets on success. Server-managed.
Error message from the most recent errored check, or null if the alert's most recent check was successful. Sourced from LogsAlertEvent without denormalization so retention-aware cleanup rules stay the only source of truth.
Notification destination types configured for this alert — e.g. 'slack', 'webhook'. Empty list means no notifications will fire. One or more destinations should be added after creating an alert.
When the alert was first enabled. Null means the alert is still in draft state.
When the alert was created.
When the alert was last modified.
Response
Unique identifier for this alert.
Human-readable name for this alert. Defaults to 'Untitled alert' on create when omitted.
Whether the alert is actively being evaluated. Disabling resets the state to not_firing.
Number of matching log entries that constitutes a threshold breach within the evaluation window. Defaults to 100. Use 0 with the 'above' operator to fire on any matching log.
- above - Above
- below - Below
Time window in minutes over which log entries are counted. Allowed values: 5, 10, 15, 30, 60.
How often the alert is evaluated, in minutes. Server-managed.
- not_firing - Not firing
- firing - Firing
- pending_resolve - Pending resolve
- errored - Errored
- snoozed - Snoozed
- broken - Broken
Total number of check periods in the sliding evaluation window for firing (M in N-of-M).
How many periods within the evaluation window must breach the threshold to fire (N in N-of-M).
Minimum minutes between repeated notifications after the alert fires. 0 means no cooldown.
ISO 8601 timestamp until which the alert is snoozed. Set to null to unsnooze.
When the next evaluation is scheduled. Server-managed.
When the last notification was sent. Server-managed.
When the alert was last evaluated. Server-managed.
Number of consecutive evaluation failures. Resets on success. Server-managed.
Error message from the most recent errored check, or null if the alert's most recent check was successful. Sourced from LogsAlertEvent without denormalization so retention-aware cleanup rules stay the only source of truth.
Notification destination types configured for this alert — e.g. 'slack', 'webhook'. Empty list means no notifications will fire. One or more destinations should be added after creating an alert.
When the alert was first enabled. Null means the alert is still in draft state.
When the alert was created.
When the alert was last modified.
Changes
No recorded changes to this operation across all 1 revision of this API.