Skip to main content

edge

Creates, updates, deletes, gets or lists an edge resource.

Overview

Nameedge
TypeResource
Idcloudflare.logpush.edge

Fields

The following fields are returned by SELECT queries:

List Instant Logs jobs response.

NameDatatypeDescription
session_idstringUnique session id of the job. (example: 99d471b1ca3c23cc8e30b6acec5db987)
destination_confstring (uri)Unique WebSocket address that will receive messages from Cloudflare’s edge. (example: wss://logs.cloudflare.com/instant-logs/ws/sessions/99d471b1ca3c23cc8e30b6acec5db987)
fieldsstringComma-separated list of fields. (example: ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestURI,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus,EdgeStartTimestamp,RayID)
filterstringFilters to drill down into specific events. (example: {"where":{"and":[{"key":"ClientCountry","operator":"neq","value":"ca"}]}})
sampleintegerThe sample parameter is the sample rate of the records set by the client: "sample": 1 is 100% of records "sample": 10 is 10% and so on.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_idLists Instant Logs jobs for a zone.
createinsertzone_idCreates a new Instant Logs job 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.

SELECT examples

Lists Instant Logs jobs for a zone.

SELECT
session_id,
destination_conf,
fields,
filter,
sample
FROM cloudflare.logpush.edge
WHERE zone_id = '{{ zone_id }}' -- required
;

INSERT examples

Creates a new Instant Logs job for a zone.

INSERT INTO cloudflare.logpush.edge (
fields,
filter,
sample,
zone_id
)
SELECT
'{{ fields }}',
'{{ filter }}',
{{ sample }},
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
success
;