Skip to content
Start here

Creates a new category

client.cloudforceOne.threatEvents.categories.create(CategoryCreateParams { account_id, killChain, name, 3 more } params, RequestOptionsoptions?): CategoryCreateResponse { killChain, name, uuid, 3 more }
POST/accounts/{account_id}/cloudforce-one/events/categories/create

Creates a new category

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: CategoryCreateParams { account_id, killChain, name, 3 more }
account_id: string

Path param: Account ID.

killChain: number

Body param

name: string

Body param

mitreAttack?: Array<string>

Body param

mitreCapec?: Array<string>

Body param

shortname?: string

Body param

ReturnsExpand Collapse
CategoryCreateResponse { killChain, name, uuid, 3 more }
killChain: number
name: string
uuid: string
mitreAttack?: Array<string>
mitreCapec?: Array<string>
shortname?: string

Creates a new category

import Cloudflare from 'cloudflare';

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

const category = await client.cloudforceOne.threatEvents.categories.create({
  account_id: 'account_id',
  killChain: 0,
  name: 'name',
});

console.log(category.uuid);
{
  "killChain": 0,
  "name": "name",
  "uuid": "12345678-1234-1234-1234-1234567890ab",
  "mitreAttack": [
    "T1234"
  ],
  "mitreCapec": [
    "123"
  ],
  "shortname": "shortname"
}
Returns Examples
{
  "killChain": 0,
  "name": "name",
  "uuid": "12345678-1234-1234-1234-1234567890ab",
  "mitreAttack": [
    "T1234"
  ],
  "mitreCapec": [
    "123"
  ],
  "shortname": "shortname"
}