Skip to main content

purge

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

Overview

Namepurge
TypeResource
Idcloudflare.queues.purge

Fields

The following fields are returned by SELECT queries:

Details of the requested Queue

NameDatatypeDescription
completedstringIndicates if the last purge operation completed successfully.
started_atstringTimestamp when the last purge operation started.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectqueue_id, account_idGet details about a Queue's purge status.
startexecqueue_id, account_idDeletes all messages from the Queue.

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.
queue_idstringThe Cloudflare Queue ID.

SELECT examples

Get details about a Queue's purge status.

SELECT
completed,
started_at
FROM cloudflare.queues.purge
WHERE queue_id = '{{ queue_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;

Lifecycle Methods

Deletes all messages from the Queue.

EXEC cloudflare.queues.purge.start
@queue_id='{{ queue_id }}' --required,
@account_id='{{ account_id }}' --required
@@json=
'{
"delete_messages_permanently": {{ delete_messages_permanently }}
}'
;