datasets
Creates, updates, deletes, gets or lists a datasets resource.
Overview
| Name | datasets |
| Type | Resource |
| Id | cloudflare.radar.datasets |
Fields
The following fields are returned by SELECT queries:
- get
- list
Successful response.
| Name | Datatype | Description |
|---|---|---|
contents | string |
Successful response.
| Name | Datatype | Description |
|---|---|---|
id | integer | |
description | string | |
meta | object | |
tags | array | |
title | string | |
type | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | alias | 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. | |
list | select | limit, offset, datasetType, date, format | Retrieves a list of datasets. | |
download | insert | datasetId | format | Retrieves 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.
| Name | Datatype | Description |
|---|---|---|
alias | string | Dataset alias or ID. |
datasetType | string | Filters results by dataset type. |
date | string (date) | Filters results by the specified date. |
format | string | Format in which results will be returned. |
limit | integer | Limits the number of objects returned in the response. |
offset | integer | Skips the specified number of objects before fetching the results. |
SELECT examples
- get
- list
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
;
Retrieves a list of datasets.
SELECT
id,
description,
meta,
tags,
title,
type
FROM cloudflare.radar.datasets
WHERE limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND datasetType = '{{ datasetType }}'
AND date = '{{ date }}'
AND format = '{{ format }}'
;
INSERT examples
- download
- Manifest
Retrieves an URL to download a single dataset.
INSERT INTO cloudflare.radar.datasets (
datasetId,
format
)
SELECT
{{ datasetId }} /* required */,
'{{ format }}'
RETURNING
result
;
# Description fields are for documentation purposes
- name: datasets
props:
- name: datasetId
value: {{ datasetId }}
- name: format
value: "{{ format }}"
description: Format in which results will be returned.
description: Format in which results will be returned.