Skip to main content

snapshot

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

Overview

Namesnapshot
TypeResource
Idcloudflare.browser_rendering.snapshot

Fields

The following fields are returned by SELECT queries:

Returns the screenshot.

NameDatatypeDescription
errorsarray
metaobject
resultobject
successbooleanResponse status.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_idcacheTTLReturns the page's HTML content and screenshot. Control page loading with gotoOptions and waitFor* options. Customize screenshots with viewport, fullPage, clip and others.

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.
cacheTTLnumberCache TTL default is 5s. Set to 0 to disable.

SELECT examples

Returns the page's HTML content and screenshot. Control page loading with gotoOptions and waitFor* options. Customize screenshots with viewport, fullPage, clip and others.

SELECT
errors,
meta,
result,
success
FROM cloudflare.browser_rendering.snapshot
WHERE account_id = '{{ account_id }}' -- required
AND cacheTTL = '{{ cacheTTL }}'
;