Filter and list events
client.CloudforceOne.ThreatEvents.List(ctx, params) (*[]ThreatEventListResponse, error)
GET/accounts/{account_id}/cloudforce-one/events
Use one standalone datasetId scope value: ‘all’/’*’ or ‘operational’ for readable intelligence datasets (isAnalytics=false), or ‘analytics’ for readable analytics datasets (isAnalytics=true). Scope values query at most 50 datasets and must be used alone. When datasetId is unspecified, events are listed from the default Cloudforce One Threat Events dataset. To list existing datasets, use the List Datasets endpoint.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Filter and list events
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"),
)
threatEvents, err := client.CloudforceOne.ThreatEvents.List(context.TODO(), cloudforce_one.ThreatEventListParams{
AccountID: cloudflare.F("account_id"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", threatEvents)
}
[
{
"attacker": "Flying Yeti",
"attackerCountry": "CN",
"attackerCountryAlpha3": "CHN",
"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",
"targetCountryAlpha3": "USA",
"targetIndustry": "Agriculture",
"tlp": "amber",
"uuid": "12345678-1234-1234-1234-1234567890ab",
"insight": "insight",
"releasabilityId": "releasabilityId"
}
]Returns Examples
[
{
"attacker": "Flying Yeti",
"attackerCountry": "CN",
"attackerCountryAlpha3": "CHN",
"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",
"targetCountryAlpha3": "USA",
"targetIndustry": "Agriculture",
"tlp": "amber",
"uuid": "12345678-1234-1234-1234-1234567890ab",
"insight": "insight",
"releasabilityId": "releasabilityId"
}
]