Skip to main content

history

Creates, updates, deletes, gets or lists a history resource.

Overview

Namehistory
TypeResource
Idcloudflare.alerting.history

Fields

The following fields are returned by SELECT queries:

List History response

NameDatatypeDescription
idstringUUID (example: f174e90afafe4643bbbc4a0ed4fc8415)
namestringName of the policy. (example: SSL Notification Event Policy)
policy_idstringThe unique identifier of a notification policy (example: 0da2b59ef118439d8097bdfb215203c9)
alert_bodystringMessage body included in the notification sent. (example: SSL certificate has expired)
alert_typestringType of notification that has been dispatched. (example: universal_ssl_event_type)
descriptionstringDescription of the notification policy (if present). (example: Universal Certificate validation status, issuance, renewal, and expiration notices)
mechanismstringThe mechanism to which the notification has been dispatched. (example: test@example.com)
mechanism_typestringThe type of mechanism to which the notification has been dispatched. This can be email/pagerduty/webhook based on the mechanism configured. (email, pagerduty, webhook) (example: email)
sentstring (date-time)Timestamp of when the notification was dispatched in ISO 8601 format. (example: 2021-10-08T17:52:17.571336Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_idper_page, before, page, sinceGets a list of history records for notifications sent to an account. The records are displayed for last x number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
beforestring (date-time)
pagenumber
per_pagenumber
sincestring (date-time)

SELECT examples

Gets a list of history records for notifications sent to an account. The records are displayed for last x number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).

SELECT
id,
name,
policy_id,
alert_body,
alert_type,
description,
mechanism,
mechanism_type,
sent
FROM cloudflare.alerting.history
WHERE account_id = '{{ account_id }}' -- required
AND per_page = '{{ per_page }}'
AND before = '{{ before }}'
AND page = '{{ page }}'
AND since = '{{ since }}'
;