Skip to content
Start here

Updates an existing dataset

cloudforce_one.threat_events.datasets.edit(strdataset_id, DatasetEditParams**kwargs) -> DatasetEditResponse
PATCH/accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}

Updates an existing 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 Write
ParametersExpand Collapse
account_id: str

Account ID.

dataset_id: str

Dataset ID.

formatuuid
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 DatasetEditResponse:
is_public: bool
name: str
uuid: str

Updates an existing 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
)
response = client.cloudforce_one.threat_events.datasets.edit(
    dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    account_id="account_id",
    is_public=True,
    name="x",
)
print(response.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"
}