history
Creates, updates, deletes, gets or lists a history resource.
Overview
| Name | history |
| Type | Resource |
| Id | cloudflare.alerting.history |
Fields
The following fields are returned by SELECT queries:
- list
List History response
| Name | Datatype | Description |
|---|---|---|
id | string | UUID (example: f174e90afafe4643bbbc4a0ed4fc8415) |
name | string | Name of the policy. (example: SSL Notification Event Policy) |
policy_id | string | The unique identifier of a notification policy (example: 0da2b59ef118439d8097bdfb215203c9) |
alert_body | string | Message body included in the notification sent. (example: SSL certificate has expired) |
alert_type | string | Type of notification that has been dispatched. (example: universal_ssl_event_type) |
description | string | Description of the notification policy (if present). (example: Universal Certificate validation status, issuance, renewal, and expiration notices) |
mechanism | string | The mechanism to which the notification has been dispatched. (example: test@example.com) |
mechanism_type | string | The 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) |
sent | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id | per_page, before, page, since | 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). |
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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
before | string (date-time) | |
page | number | |
per_page | number | |
since | string (date-time) |
SELECT examples
- list
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 }}'
;