Skip to content
Start here

Get `PhishGuard` reports

email_security.phishguard.reports.list(ReportListParams**kwargs) -> SyncSinglePage[ReportListResponse]
GET/accounts/{account_id}/email-security/phishguard/reports

Retrieves PhishGuard reports showing phishing attempts and suspicious email patterns detected.

Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Cloud Email Security: WriteCloud Email Security: Read
ParametersExpand Collapse
account_id: str

Account Identifier

maxLength32
minLength32
end: Optional[Union[str, datetime]]

The end of the search date range (RFC3339 format).

formatdate-time
from_date: Optional[Union[null, null]]
formatdate
start: Optional[Union[str, datetime]]

The beginning of the search date range (RFC3339 format).

formatdate-time
to_date: Optional[Union[null, null]]
formatdate
ReturnsExpand Collapse
class ReportListResponse:
id: int
formatint32
content: str
created_at: datetime
formatdate-time
disposition: Literal["MALICIOUS", "MALICIOUS-BEC", "SUSPICIOUS", 7 more]
One of the following:
"MALICIOUS"
"MALICIOUS-BEC"
"SUSPICIOUS"
"SPOOF"
"SPAM"
"BULK"
"ENCRYPTED"
"EXTERNAL"
"UNKNOWN"
"NONE"
fields: Fields
to: List[str]
ts: datetime
formatdate-time
from_: Optional[str]
postfix_id: Optional[str]
priority: str
title: str
ts: datetime
formatdate-time
updated_at: datetime
formatdate-time
tags: Optional[List[Tag]]
category: str
value: str

Get `PhishGuard` reports

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_email=os.environ.get("CLOUDFLARE_EMAIL"),  # This is the default and can be omitted
    api_key=os.environ.get("CLOUDFLARE_API_KEY"),  # This is the default and can be omitted
)
page = client.email_security.phishguard.reports.list(
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
page = page.result[0]
print(page.id)
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": 0,
      "content": "content",
      "created_at": "2019-12-27T18:11:19.117Z",
      "disposition": "MALICIOUS",
      "fields": {
        "to": [
          "string"
        ],
        "ts": "2019-12-27T18:11:19.117Z",
        "from": "from",
        "postfix_id": "postfix_id"
      },
      "priority": "priority",
      "title": "title",
      "ts": "2019-12-27T18:11:19.117Z",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "tags": [
        {
          "category": "category",
          "value": "value"
        }
      ]
    }
  ],
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": 0,
      "content": "content",
      "created_at": "2019-12-27T18:11:19.117Z",
      "disposition": "MALICIOUS",
      "fields": {
        "to": [
          "string"
        ],
        "ts": "2019-12-27T18:11:19.117Z",
        "from": "from",
        "postfix_id": "postfix_id"
      },
      "priority": "priority",
      "title": "title",
      "ts": "2019-12-27T18:11:19.117Z",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "tags": [
        {
          "category": "category",
          "value": "value"
        }
      ]
    }
  ],
  "success": true
}