Update an account or zone dataset
PUT/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/{dataset_id}
Updates the enabled state and/or field configuration of an account or zone dataset.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Path Parameters
Body ParametersJSON
filter: optional string
Optional Logpush filter predicate to restrict which events are
ingested. If omitted, the existing filter is left unchanged. Set
to an empty string ("") to clear the filter. Otherwise,
replaces the dataset’s filter entirely.
See Logpush filters
for syntax and examples.
Update an account or zone dataset
curl https://api.cloudflare.com/client/v4/$ACCOUNTS_OR_ZONES/$ACCOUNT_OR_ZONE_ID/logs/explorer/datasets/$DATASET_ID \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"enabled": true
}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"success": true,
"result": {
"created_at": "2019-12-27T18:11:19.117Z",
"dataset": "dataset",
"dataset_id": "dataset_id",
"deletion_protection": true,
"enabled": true,
"fields": [
{
"enabled": true,
"name": "name"
}
],
"object_id": "object_id",
"object_type": "account",
"updated_at": "2019-12-27T18:11:19.117Z",
"filter": "filter"
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"success": true,
"result": {
"created_at": "2019-12-27T18:11:19.117Z",
"dataset": "dataset",
"dataset_id": "dataset_id",
"deletion_protection": true,
"enabled": true,
"fields": [
{
"enabled": true,
"name": "name"
}
],
"object_id": "object_id",
"object_type": "account",
"updated_at": "2019-12-27T18:11:19.117Z",
"filter": "filter"
}
}