Skip to content
Start here

Delete a dataset

cloudforce_one.threat_events.datasets.delete(strdataset_id, DatasetDeleteParams**kwargs) -> DatasetDeleteResponse
DELETE/accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}

Soft-deletes a dataset given a datasetId.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Cloudforce One Write
ParametersExpand Collapse
account_id: str

Account ID.

dataset_id: str

Dataset ID to delete

ReturnsExpand Collapse
class DatasetDeleteResponse:
name: str
uuid: str

Delete a dataset

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
dataset = client.cloudforce_one.threat_events.datasets.delete(
    dataset_id="dataset_id",
    account_id="account_id",
)
print(dataset.uuid)
{
  "name": "friendly dataset name",
  "uuid": "12345678-1234-1234-1234-1234567890ab"
}
Returns Examples
{
  "name": "friendly dataset name",
  "uuid": "12345678-1234-1234-1234-1234567890ab"
}