Skip to content
Start here

Updates an existing dataset

client.cloudforceOne.threatEvents.datasets.edit(stringdatasetId, DatasetEditParams { account_id, isPublic, name } params, RequestOptionsoptions?): DatasetEditResponse { isPublic, name, uuid, deletedAt }
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
datasetId: string

Dataset ID.

formatuuid
params: DatasetEditParams { account_id, isPublic, name }
account_id: string

Path param: Account ID.

isPublic: boolean

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

name: string

Body param: Used to describe the dataset within the account context.

minLength1
ReturnsExpand Collapse
DatasetEditResponse { isPublic, name, uuid, deletedAt }
isPublic: boolean
name: string
uuid: string
deletedAt?: string

Updates an existing dataset

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const response = await client.cloudforceOne.threatEvents.datasets.edit(
  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  {
    account_id: 'account_id',
    isPublic: true,
    name: 'x',
  },
);

console.log(response.uuid);
{
  "isPublic": true,
  "name": "friendly dataset name",
  "uuid": "12345678-1234-1234-1234-1234567890ab",
  "deletedAt": "deletedAt"
}
Returns Examples
{
  "isPublic": true,
  "name": "friendly dataset name",
  "uuid": "12345678-1234-1234-1234-1234567890ab",
  "deletedAt": "deletedAt"
}