Skip to content
Start here

Adds a tag to an event

client.CloudforceOne.ThreatEvents.EventTags.New(ctx, eventID, params) (*ThreatEventEventTagNewResponse, error)
POST/accounts/{account_id}/cloudforce-one/events/event_tag/{event_id}/create

Adds a tag to an event

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
eventID string

Event UUID.

params ThreatEventEventTagNewParams
AccountID param.Field[string]

Path param: Account ID.

Tags param.Field[[]string]

Body param

ReturnsExpand Collapse
type ThreatEventEventTagNewResponse struct{…}
Success bool

Adds a tag to an event

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/cloudforce_one"
  "github.com/stainless-sdks/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  eventTag, err := client.CloudforceOne.ThreatEvents.EventTags.New(
    context.TODO(),
    "event_id",
    cloudforce_one.ThreatEventEventTagNewParams{
      AccountID: cloudflare.F("account_id"),
      Tags: cloudflare.F([]string{"botnet"}),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", eventTag.Success)
}
{
  "result": {
    "success": true
  },
  "success": true
}
Returns Examples
{
  "result": {
    "success": true
  },
  "success": true
}