Skip to content
Start here

Lists attackers across multiple datasets

client.CloudforceOne.ThreatEvents.Attackers.List(ctx, params) (*ThreatEventAttackerListResponse, error)
GET/accounts/{account_id}/cloudforce-one/events/attackers

Lists attackers across multiple datasets

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 ThreatEventAttackerListParams
AccountID param.Field[string]

Path param: Account ID.

DatasetIDs param.Field[[]string]optional

Query param: Array of dataset IDs to query attackers from. If not provided, uses the default dataset.

ReturnsExpand Collapse
type ThreatEventAttackerListResponse struct{…}
Items ThreatEventAttackerListResponseItems
Type string
Type string

Lists attackers across multiple datasets

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"),
  )
  attackers, err := client.CloudforceOne.ThreatEvents.Attackers.List(context.TODO(), cloudforce_one.ThreatEventAttackerListParams{
    AccountID: cloudflare.F("account_id"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", attackers.Items)
}
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
Returns Examples
{
  "items": {
    "type": "string"
  },
  "type": "array"
}