Skip to content
Start here

Creates a dataset

client.cloudforceOne.threatEvents.datasets.create(DatasetCreateParams { account_id, isPublic, name } params, RequestOptionsoptions?): DatasetCreateResponse { isPublic, name, uuid }
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
params: DatasetCreateParams { 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
DatasetCreateResponse { isPublic, name, uuid }
isPublic: boolean
name: string
uuid: string

Creates a dataset

import Cloudflare from 'cloudflare';

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

const dataset = await client.cloudforceOne.threatEvents.datasets.create({
  account_id: 'account_id',
  isPublic: true,
  name: 'x',
});

console.log(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"
}