Skip to content
Start here

Updates an event

client.CloudforceOne.ThreatEvents.Edit(ctx, eventID, params) (*ThreatEventEditResponse, error)
PATCH/accounts/{account_id}/cloudforce-one/events/{event_id}

Updates 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 Write
ParametersExpand Collapse
eventID string

Event UUID.

params ThreatEventEditParams
AccountID param.Field[string]

Path param: Account ID.

DatasetID param.Field[string]

Body param: Dataset ID containing the event to update.

Attacker param.Field[string]optional

Body param

AttackerCountry param.Field[string]optional

Body param

Category param.Field[string]optional

Body param

CreatedAt param.Field[Time]optional

Body param

formatdate-time
Date param.Field[Time]optional

Body param

formatdate-time
Event param.Field[string]optional

Body param

Indicator param.Field[string]optional

Body param

IndicatorType param.Field[string]optional

Body param

Insight param.Field[string]optional

Body param

Raw param.Field[ThreatEventEditParamsRaw]optional

Body param

Data map[string, unknown]optional
Source stringoptional
TLP stringoptional
TargetCountry param.Field[string]optional

Body param

TargetIndustry param.Field[string]optional

Body param

TLP param.Field[string]optional

Body param

ReturnsExpand Collapse
type ThreatEventEditResponse struct{…}
Attacker string
AttackerCountry string
Category string
DatasetID string
Date string
Event string
HasChildren bool
Indicator string
IndicatorType string
IndicatorTypeID float64
KillChain float64
MitreAttack []string
MitreCapec []string
NumReferenced float64
NumReferences float64
RawID string
Referenced []string
ReferencedIDs []float64
References []string
ReferencesIDs []float64
Tags []string
TargetCountry string
TargetIndustry string
TLP string
UUID string
Insight stringoptional
ReleasabilityID stringoptional

Updates an event

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.CloudforceOne.ThreatEvents.Edit(
    context.TODO(),
    "event_id",
    cloudforce_one.ThreatEventEditParams{
      AccountID: cloudflare.F("account_id"),
      DatasetID: cloudflare.F("9b769969-a211-466c-8ac3-cb91266a066a"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.UUID)
}
{
  "attacker": "Flying Yeti",
  "attackerCountry": "CN",
  "category": "Domain Resolution",
  "datasetId": "dataset-example-id",
  "date": "2022-04-01T00:00:00Z",
  "event": "An attacker registered the domain domain.com",
  "hasChildren": true,
  "indicator": "domain.com",
  "indicatorType": "domain",
  "indicatorTypeId": 5,
  "killChain": 0,
  "mitreAttack": [
    " "
  ],
  "mitreCapec": [
    " "
  ],
  "numReferenced": 0,
  "numReferences": 0,
  "rawId": "453gw34w3",
  "referenced": [
    " "
  ],
  "referencedIds": [
    0
  ],
  "references": [
    " "
  ],
  "referencesIds": [
    0
  ],
  "tags": [
    "malware"
  ],
  "targetCountry": "US",
  "targetIndustry": "Agriculture",
  "tlp": "amber",
  "uuid": "12345678-1234-1234-1234-1234567890ab",
  "insight": "insight",
  "releasabilityId": "releasabilityId"
}
Returns Examples
{
  "attacker": "Flying Yeti",
  "attackerCountry": "CN",
  "category": "Domain Resolution",
  "datasetId": "dataset-example-id",
  "date": "2022-04-01T00:00:00Z",
  "event": "An attacker registered the domain domain.com",
  "hasChildren": true,
  "indicator": "domain.com",
  "indicatorType": "domain",
  "indicatorTypeId": 5,
  "killChain": 0,
  "mitreAttack": [
    " "
  ],
  "mitreCapec": [
    " "
  ],
  "numReferenced": 0,
  "numReferences": 0,
  "rawId": "453gw34w3",
  "referenced": [
    " "
  ],
  "referencedIds": [
    0
  ],
  "references": [
    " "
  ],
  "referencesIds": [
    0
  ],
  "tags": [
    "malware"
  ],
  "targetCountry": "US",
  "targetIndustry": "Agriculture",
  "tlp": "amber",
  "uuid": "12345678-1234-1234-1234-1234567890ab",
  "insight": "insight",
  "releasabilityId": "releasabilityId"
}