Skip to main content

history

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

Overview

Namehistory
TypeResource
Idcloudflare.zaraz.history

Fields

The following fields are returned by SELECT queries:

List Zaraz historical configuration records response.

NameDatatypeDescription
idintegerID of the configuration.
createdAtstring (date-time)Date and time the configuration was created.
descriptionstringConfiguration description provided by the user who published this configuration.
updatedAtstring (date-time)Date and time the configuration was last updated.
userIdstringAlpha-numeric ID of the account user who published the configuration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_idoffset, limit, sortField, sortOrderLists a history of published Zaraz configuration records for a zone.
updatereplacezone_idRestores a historical published Zaraz configuration by ID for a zone.

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
zone_idstringThe Cloudflare zone ID.
limitintegerMaximum amount of results to list. Default value is 10.
offsetintegerOrdinal number to start listing the results with. Default value is 0.
sortFieldstringThe field to sort by. Default is updated_at.
sortOrderstringSorting order. Default is DESC.

SELECT examples

Lists a history of published Zaraz configuration records for a zone.

SELECT
id,
createdAt,
description,
updatedAt,
userId
FROM cloudflare.zaraz.history
WHERE zone_id = '{{ zone_id }}' -- required
AND offset = '{{ offset }}'
AND limit = '{{ limit }}'
AND sortField = '{{ sortField }}'
AND sortOrder = '{{ sortOrder }}'
;

REPLACE examples

Restores a historical published Zaraz configuration by ID for a zone.

REPLACE cloudflare.zaraz.history
SET
-- No updatable properties
WHERE
zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
success;