Skip to content
Start here

Get HTTP authentication requests by bot class summary

client.Radar.LeakedCredentials.Summary.BotClass(ctx, query) (*LeakedCredentialSummaryBotClassResponse, error)
GET/radar/leaked_credential_checks/summary/bot_class

Retrieves the distribution of HTTP authentication requests by bot class.

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 LeakedCredentialSummaryBotClassParams
Compromised param.Field[[]LeakedCredentialSummaryBotClassParamsCompromised]Optional

Filters results by compromised credential status (clean vs. compromised).

const LeakedCredentialSummaryBotClassParamsCompromisedClean LeakedCredentialSummaryBotClassParamsCompromised = "CLEAN"
const LeakedCredentialSummaryBotClassParamsCompromisedCompromised LeakedCredentialSummaryBotClassParamsCompromised = "COMPROMISED"
DateEnd param.Field[[]Time]Optional

End of the date range (inclusive).

DateRange param.Field[[]string]Optional

Filters results by date range. For example, use 7d and 7dcontrol to compare this week with the previous week. Use this parameter or set specific start and end dates (dateStart and dateEnd parameters).

DateStart param.Field[[]Time]Optional

Start of the date range.

Format in which results will be returned.

const LeakedCredentialSummaryBotClassParamsFormatJson LeakedCredentialSummaryBotClassParamsFormat = "JSON"
const LeakedCredentialSummaryBotClassParamsFormatCsv LeakedCredentialSummaryBotClassParamsFormat = "CSV"
Name param.Field[[]string]Optional

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

ReturnsExpand Collapse
type LeakedCredentialSummaryBotClassResponse struct{…}
Meta LeakedCredentialSummaryBotClassResponseMeta

Metadata for the results.

ConfidenceInfo LeakedCredentialSummaryBotClassResponseMetaConfidenceInfo
Annotations []LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotation
DataSource LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAll LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIBots LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBGP LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBots LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceCT LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNS LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDos LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFw LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFwPg LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTP LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceIQI LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceNet LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceSpeed LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeEvent LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeGeneral LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeOutage LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePipeline LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "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 []LeakedCredentialSummaryBotClassResponseMetaDateRange
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 LeakedCredentialSummaryBotClassResponseMetaNormalization

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

One of the following:
const LeakedCredentialSummaryBotClassResponseMetaNormalizationPercentage LeakedCredentialSummaryBotClassResponseMetaNormalization = "PERCENTAGE"
const LeakedCredentialSummaryBotClassResponseMetaNormalizationMin0Max LeakedCredentialSummaryBotClassResponseMetaNormalization = "MIN0_MAX"
const LeakedCredentialSummaryBotClassResponseMetaNormalizationMinMax LeakedCredentialSummaryBotClassResponseMetaNormalization = "MIN_MAX"
const LeakedCredentialSummaryBotClassResponseMetaNormalizationRawValues LeakedCredentialSummaryBotClassResponseMetaNormalization = "RAW_VALUES"
const LeakedCredentialSummaryBotClassResponseMetaNormalizationPercentageChange LeakedCredentialSummaryBotClassResponseMetaNormalization = "PERCENTAGE_CHANGE"
const LeakedCredentialSummaryBotClassResponseMetaNormalizationRollingAverage LeakedCredentialSummaryBotClassResponseMetaNormalization = "ROLLING_AVERAGE"
const LeakedCredentialSummaryBotClassResponseMetaNormalizationOverlappedPercentage LeakedCredentialSummaryBotClassResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const LeakedCredentialSummaryBotClassResponseMetaNormalizationRatio LeakedCredentialSummaryBotClassResponseMetaNormalization = "RATIO"
Units []LeakedCredentialSummaryBotClassResponseMetaUnit

Measurement units for the results.

Name string
Value string
Summary0 LeakedCredentialSummaryBotClassResponseSummary0
Bot string

A numeric string.

Human string

A numeric string.

Get HTTP authentication requests by bot class summary

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Radar.LeakedCredentials.Summary.BotClass(context.TODO(), radar.LeakedCredentialSummaryBotClassParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "result": {
    "meta": {
      "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"
        }
      ]
    },
    "summary_0": {
      "bot": "10",
      "human": "10"
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "meta": {
      "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"
        }
      ]
    },
    "summary_0": {
      "bot": "10",
      "human": "10"
    }
  },
  "success": true
}