Skip to content
Start here

Get email spoof classification time series

client.Radar.Email.Security.TimeseriesGroups.Spoof(ctx, query) (*EmailSecurityTimeseriesGroupSpoofResponse, error)
GET/radar/email/security/timeseries_groups/spoof

Retrieves the distribution of emails by spoof classification (spoof vs. non-spoof) over time.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
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)
User Details WriteUser Details Read
ParametersExpand Collapse
query EmailSecurityTimeseriesGroupSpoofParams

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals. When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.

const EmailSecurityTimeseriesGroupSpoofParamsAggInterval15m EmailSecurityTimeseriesGroupSpoofParamsAggInterval = "15m"
const EmailSecurityTimeseriesGroupSpoofParamsAggInterval1h EmailSecurityTimeseriesGroupSpoofParamsAggInterval = "1h"
const EmailSecurityTimeseriesGroupSpoofParamsAggInterval1d EmailSecurityTimeseriesGroupSpoofParamsAggInterval = "1d"
const EmailSecurityTimeseriesGroupSpoofParamsAggInterval1w EmailSecurityTimeseriesGroupSpoofParamsAggInterval = "1w"
ARC param.Field[[]EmailSecurityTimeseriesGroupSpoofParamsARC]Optional

Filters results by ARC (Authenticated Received Chain) validation.

const EmailSecurityTimeseriesGroupSpoofParamsARCPass EmailSecurityTimeseriesGroupSpoofParamsARC = "PASS"
const EmailSecurityTimeseriesGroupSpoofParamsARCNone EmailSecurityTimeseriesGroupSpoofParamsARC = "NONE"
const EmailSecurityTimeseriesGroupSpoofParamsARCFail EmailSecurityTimeseriesGroupSpoofParamsARC = "FAIL"
DateEnd param.Field[[]Time]Optional

End of the date range (inclusive). Alternative to dateRange; provide together with dateStart. When requesting comparison series, every series must resolve to the same duration as the main series. Each dateStart/dateEnd is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected.

DateRange param.Field[[]string]Optional

Filters results by relative date range ending at the current time, with each value producing a separate series. Use <n>d for days (up to 364d) or <n>w for weeks (up to 52w). Append control to request the equivalent previous period for comparison: the comparison window is shifted back by the current window’s length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. 7dcontrol covers days -14 to -7, 10dcontrol covers days -24 to -14). For example, pass 7d and 7dcontrol to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including control) satisfy this automatically. Use this parameter or set specific start and end dates (dateStart and dateEnd parameters).

DateStart param.Field[[]Time]Optional

Start of the date range. Alternative to dateRange; provide together with dateEnd. When requesting comparison series, every series must resolve to the same duration as the main series. Each dateStart/dateEnd is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected.

DKIM param.Field[[]EmailSecurityTimeseriesGroupSpoofParamsDKIM]Optional

Filters results by DKIM (DomainKeys Identified Mail) validation status.

const EmailSecurityTimeseriesGroupSpoofParamsDKIMPass EmailSecurityTimeseriesGroupSpoofParamsDKIM = "PASS"
const EmailSecurityTimeseriesGroupSpoofParamsDKIMNone EmailSecurityTimeseriesGroupSpoofParamsDKIM = "NONE"
const EmailSecurityTimeseriesGroupSpoofParamsDKIMFail EmailSecurityTimeseriesGroupSpoofParamsDKIM = "FAIL"
DMARC param.Field[[]EmailSecurityTimeseriesGroupSpoofParamsDMARC]Optional

Filters results by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation status.

const EmailSecurityTimeseriesGroupSpoofParamsDMARCPass EmailSecurityTimeseriesGroupSpoofParamsDMARC = "PASS"
const EmailSecurityTimeseriesGroupSpoofParamsDMARCNone EmailSecurityTimeseriesGroupSpoofParamsDMARC = "NONE"
const EmailSecurityTimeseriesGroupSpoofParamsDMARCFail EmailSecurityTimeseriesGroupSpoofParamsDMARC = "FAIL"

Format in which results will be returned.

const EmailSecurityTimeseriesGroupSpoofParamsFormatJson EmailSecurityTimeseriesGroupSpoofParamsFormat = "JSON"
const EmailSecurityTimeseriesGroupSpoofParamsFormatCsv EmailSecurityTimeseriesGroupSpoofParamsFormat = "CSV"
Name param.Field[[]string]Optional

Array of names used to label the series in the response.

SPF param.Field[[]EmailSecurityTimeseriesGroupSpoofParamsSPF]Optional

Filters results by SPF (Sender Policy Framework) validation status.

const EmailSecurityTimeseriesGroupSpoofParamsSPFPass EmailSecurityTimeseriesGroupSpoofParamsSPF = "PASS"
const EmailSecurityTimeseriesGroupSpoofParamsSPFNone EmailSecurityTimeseriesGroupSpoofParamsSPF = "NONE"
const EmailSecurityTimeseriesGroupSpoofParamsSPFFail EmailSecurityTimeseriesGroupSpoofParamsSPF = "FAIL"
TLSVersion param.Field[[]EmailSecurityTimeseriesGroupSpoofParamsTLSVersion]Optional

Filters results by TLS version.

const EmailSecurityTimeseriesGroupSpoofParamsTLSVersionTlSv1_0 EmailSecurityTimeseriesGroupSpoofParamsTLSVersion = "TLSv1_0"
const EmailSecurityTimeseriesGroupSpoofParamsTLSVersionTlSv1_1 EmailSecurityTimeseriesGroupSpoofParamsTLSVersion = "TLSv1_1"
const EmailSecurityTimeseriesGroupSpoofParamsTLSVersionTlSv1_2 EmailSecurityTimeseriesGroupSpoofParamsTLSVersion = "TLSv1_2"
const EmailSecurityTimeseriesGroupSpoofParamsTLSVersionTlSv1_3 EmailSecurityTimeseriesGroupSpoofParamsTLSVersion = "TLSv1_3"
ReturnsExpand Collapse
type EmailSecurityTimeseriesGroupSpoofResponse struct{…}
Meta EmailSecurityTimeseriesGroupSpoofResponseMeta

Metadata for the results.

AggInterval EmailSecurityTimeseriesGroupSpoofResponseMetaAggInterval

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals.

One of the following:
const EmailSecurityTimeseriesGroupSpoofResponseMetaAggIntervalFifteenMinutes EmailSecurityTimeseriesGroupSpoofResponseMetaAggInterval = "FIFTEEN_MINUTES"
const EmailSecurityTimeseriesGroupSpoofResponseMetaAggIntervalOneHour EmailSecurityTimeseriesGroupSpoofResponseMetaAggInterval = "ONE_HOUR"
const EmailSecurityTimeseriesGroupSpoofResponseMetaAggIntervalOneDay EmailSecurityTimeseriesGroupSpoofResponseMetaAggInterval = "ONE_DAY"
const EmailSecurityTimeseriesGroupSpoofResponseMetaAggIntervalOneWeek EmailSecurityTimeseriesGroupSpoofResponseMetaAggInterval = "ONE_WEEK"
const EmailSecurityTimeseriesGroupSpoofResponseMetaAggIntervalOneMonth EmailSecurityTimeseriesGroupSpoofResponseMetaAggInterval = "ONE_MONTH"
ConfidenceInfo EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfo
Annotations []EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotation
DataSource EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceCT EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"
IsInstantaneous bool

Whether event is a single point in time or a time range.

LinkedURL string
formaturi
StartDate Time
formatdate-time
Tags []stringOptional
Level int64

Provides an indication of how much confidence Cloudflare has in the data.

DateRange []EmailSecurityTimeseriesGroupSpoofResponseMetaDateRange
EndTime Time

Adjusted end of date range.

formatdate-time
StartTime Time

Adjusted start of date range.

formatdate-time
LastUpdated Time

Timestamp of the last dataset update.

formatdate-time
Normalization EmailSecurityTimeseriesGroupSpoofResponseMetaNormalization

Normalization method applied to the results. Refer to Normalization methods.

One of the following:
const EmailSecurityTimeseriesGroupSpoofResponseMetaNormalizationPercentage EmailSecurityTimeseriesGroupSpoofResponseMetaNormalization = "PERCENTAGE"
const EmailSecurityTimeseriesGroupSpoofResponseMetaNormalizationMin0Max EmailSecurityTimeseriesGroupSpoofResponseMetaNormalization = "MIN0_MAX"
const EmailSecurityTimeseriesGroupSpoofResponseMetaNormalizationMinMax EmailSecurityTimeseriesGroupSpoofResponseMetaNormalization = "MIN_MAX"
const EmailSecurityTimeseriesGroupSpoofResponseMetaNormalizationRawValues EmailSecurityTimeseriesGroupSpoofResponseMetaNormalization = "RAW_VALUES"
const EmailSecurityTimeseriesGroupSpoofResponseMetaNormalizationPercentageChange EmailSecurityTimeseriesGroupSpoofResponseMetaNormalization = "PERCENTAGE_CHANGE"
const EmailSecurityTimeseriesGroupSpoofResponseMetaNormalizationRollingAverage EmailSecurityTimeseriesGroupSpoofResponseMetaNormalization = "ROLLING_AVERAGE"
const EmailSecurityTimeseriesGroupSpoofResponseMetaNormalizationOverlappedPercentage EmailSecurityTimeseriesGroupSpoofResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const EmailSecurityTimeseriesGroupSpoofResponseMetaNormalizationRatio EmailSecurityTimeseriesGroupSpoofResponseMetaNormalization = "RATIO"
Units []EmailSecurityTimeseriesGroupSpoofResponseMetaUnit

Measurement units for the results.

Name string
Value string
Serie0 EmailSecurityTimeseriesGroupSpoofResponseSerie0
NotSpoof []string
Spoof []string

Get email spoof classification time series

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Radar.Email.Security.TimeseriesGroups.Spoof(context.TODO(), radar.EmailSecurityTimeseriesGroupSpoofParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "result": {
    "meta": {
      "aggInterval": "FIFTEEN_MINUTES",
      "confidenceInfo": {
        "annotations": [
          {
            "dataSource": "ALL",
            "description": "Cable cut in Tonga",
            "endDate": "2019-12-27T18:11:19.117Z",
            "eventType": "EVENT",
            "isInstantaneous": true,
            "linkedUrl": "https://example.com",
            "startDate": "2019-12-27T18:11:19.117Z",
            "tags": [
              "BOT_CLASS"
            ]
          }
        ],
        "level": 0
      },
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ],
      "lastUpdated": "2019-12-27T18:11:19.117Z",
      "normalization": "PERCENTAGE",
      "units": [
        {
          "name": "*",
          "value": "requests"
        }
      ]
    },
    "serie_0": {
      "NOT_SPOOF": [
        "10"
      ],
      "SPOOF": [
        "10"
      ]
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "meta": {
      "aggInterval": "FIFTEEN_MINUTES",
      "confidenceInfo": {
        "annotations": [
          {
            "dataSource": "ALL",
            "description": "Cable cut in Tonga",
            "endDate": "2019-12-27T18:11:19.117Z",
            "eventType": "EVENT",
            "isInstantaneous": true,
            "linkedUrl": "https://example.com",
            "startDate": "2019-12-27T18:11:19.117Z",
            "tags": [
              "BOT_CLASS"
            ]
          }
        ],
        "level": 0
      },
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ],
      "lastUpdated": "2019-12-27T18:11:19.117Z",
      "normalization": "PERCENTAGE",
      "units": [
        {
          "name": "*",
          "value": "requests"
        }
      ]
    },
    "serie_0": {
      "NOT_SPOOF": [
        "10"
      ],
      "SPOOF": [
        "10"
      ]
    }
  },
  "success": true
}