Skip to content
Start here

Reads a dataset

client.cloudforceOne.threatEvents.datasets.get(stringdatasetId, DatasetGetParams { account_id } params, RequestOptionsoptions?): DatasetGetResponse { isPublic, name, uuid }
GET/accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}

Reads 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
datasetId: string

Dataset ID.

formatuuid
params: DatasetGetParams { account_id }
account_id: string

Account ID.

ReturnsExpand Collapse
DatasetGetResponse { isPublic, name, uuid }
isPublic: boolean
name: string
uuid: string

Reads 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.get(
  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  { account_id: 'account_id' },
);

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"
}