Skip to content
Start here

Creates a dataset

cloudforce_one.threat_events.datasets.create(DatasetCreateParams**kwargs) -> DatasetCreateResponse
POST/accounts/{account_id}/cloudforce-one/events/dataset/create

Creates a dataset

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 WriteCloudforce One Read
ParametersExpand Collapse
account_id: str

Account ID.

is_public: bool

If true, then anyone can search the dataset. If false, then its limited to the account.

name: str

Used to describe the dataset within the account context.

minLength1
ReturnsExpand Collapse
class DatasetCreateResponse:
is_public: bool
name: str
uuid: str

Creates 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.create(
    account_id="account_id",
    is_public=True,
    name="x",
)
print(dataset.uuid)
{
  "isPublic": true,
  "name": "friendly dataset name",
  "uuid": "12345678-1234-1234-1234-1234567890ab"
}
Returns Examples
{
  "isPublic": true,
  "name": "friendly dataset name",
  "uuid": "12345678-1234-1234-1234-1234567890ab"
}