Skip to main content

datasets

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

Overview​

Namedatasets
TypeResource
Idcloudflare.radar.datasets

Fields​

The following fields are returned by SELECT queries:

Successful response.

NameDatatypeDescription
contentsstring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaliasRetrieves the CSV content of a given dataset by alias or ID. When getting the content by alias the latest dataset is returned, optionally filtered by the latest available at a given date.
listselectlimit, offset, datasetType, date, formatRetrieves a list of datasets.
downloadinsertdatasetIdformatRetrieves an URL to download a single dataset.

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
aliasstringDataset alias or ID.
datasetTypestringFilters results by dataset type.
datestring (date)Filters results by the specified date.
formatstringFormat in which results will be returned.
limitintegerLimits the number of objects returned in the response.
offsetintegerSkips the specified number of objects before fetching the results.

SELECT examples​

Retrieves the CSV content of a given dataset by alias or ID. When getting the content by alias the latest dataset is returned, optionally filtered by the latest available at a given date.

SELECT
contents
FROM cloudflare.radar.datasets
WHERE alias = '{{ alias }}' -- required
;

INSERT examples​

Retrieves an URL to download a single dataset.

INSERT INTO cloudflare.radar.datasets (
datasetId,
format
)
SELECT
{{ datasetId }} /* required */,
'{{ format }}'
RETURNING
result
;