List events
Lists events, with filters passed as query parameters. datasetId accepts dataset UUIDs or one scope value used alone: all (or *) and operational select the intelligence datasets you can read, and analytics selects the analytics datasets you can read. A scope value covers at most 50 datasets. Without datasetId, the default Cloudforce One Threat Events dataset is used. To send filters in a JSON body instead, use threat-intel events search.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Accepted Permissions (at least one required)
Parameters
Cache strategy. ‘from-graph’ serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit.
Cursor for pagination. When provided, filters are embedded in the cursor so you only need to pass cursor and pageSize. Returned in the previous response’s result_info.cursor field. Use cursor-based pagination for deep pagination (beyond 100,000 records) or for optimal performance.
Dataset UUIDs to query, or one standalone 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. If not provided, uses the default dataset.
List events
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
threat_events = client.cloudforce_one.threat_events.list(
account_id="account_id",
)
print(threat_events)[
{
"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"
}
]