Skip to content
Start here

Get HTTP requests summary by dimension

radar.http.summary_v2(Literal["ADM1", "AS", "BOT_CLASS", 10 more]dimension, HTTPSummaryV2Params**kwargs) -> HTTPSummaryV2Response
GET/radar/http/summary/{dimension}

Retrieves the distribution of HTTP requests by the specified dimension.

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
dimension: Literal["ADM1", "AS", "BOT_CLASS", 10 more]

Specifies the HTTP attribute by which to group the results.

One of the following:
"ADM1"
"AS"
"BOT_CLASS"
"BROWSER"
"BROWSER_FAMILY"
"DEVICE_TYPE"
"HTTP_PROTOCOL"
"HTTP_VERSION"
"IP_VERSION"
"LOCATION"
"OS"
"POST_QUANTUM"
"TLS_VERSION"
asn: Optional[SequenceNotStr[str]]

Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with - to exclude ASNs from results. For example, -174, 3356 excludes results from AS174, but includes results from AS3356.

bot_class: Optional[List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]]]

Filters results by bot class. Refer to Bot classes.

One of the following:
"LIKELY_AUTOMATED"
"LIKELY_HUMAN"
continent: Optional[SequenceNotStr[str]]

Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with - to exclude continents from results. For example, -EU,NA excludes results from EU, but includes results from NA.

date_end: Optional[SequenceNotStr[Union[str, datetime]]]

End of the date range (inclusive).

date_range: Optional[SequenceNotStr[str]]

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).

date_start: Optional[SequenceNotStr[Union[str, datetime]]]

Start of the date range.

device_type: Optional[List[Literal["DESKTOP", "MOBILE", "OTHER"]]]

Filters results by device type.

One of the following:
"DESKTOP"
"MOBILE"
"OTHER"
format: Optional[Literal["JSON", "CSV"]]

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
geo_id: Optional[SequenceNotStr[str]]

Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with - to exclude geoIds from results. For example, -2267056,360689 excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York).

http_protocol: Optional[List[Literal["HTTP", "HTTPS"]]]

Filters results by HTTP protocol (HTTP vs. HTTPS).

One of the following:
"HTTP"
"HTTPS"
http_version: Optional[List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]]]

Filters results by HTTP version.

One of the following:
"HTTPv1"
"HTTPv2"
"HTTPv3"
ip_version: Optional[List[Literal["IPv4", "IPv6"]]]

Filters results by IP version (Ipv4 vs. IPv6).

One of the following:
"IPv4"
"IPv6"
limit_per_group: Optional[int]

Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category.

location: Optional[SequenceNotStr[str]]

Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with - to exclude locations from results. For example, -US,PT excludes results from the US, but includes results from PT.

name: Optional[SequenceNotStr[str]]

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

os: Optional[List[Literal["WINDOWS", "MACOSX", "IOS", 4 more]]]

Filters results by operating system.

One of the following:
"WINDOWS"
"MACOSX"
"IOS"
"ANDROID"
"CHROMEOS"
"LINUX"
"SMART_TV"
tls_version: Optional[List[Literal["TLSv1_0", "TLSv1_1", "TLSv1_2", 2 more]]]

Filters results by TLS version.

One of the following:
"TLSv1_0"
"TLSv1_1"
"TLSv1_2"
"TLSv1_3"
"TLSvQUIC"
ReturnsExpand Collapse
class HTTPSummaryV2Response:
meta: Meta

Metadata for the results.

confidence_info: MetaConfidenceInfo
annotations: List[MetaConfidenceInfoAnnotation]
data_source: Literal["ALL", "AI_BOTS", "AI_GATEWAY", 22 more]

Data source for annotations.

One of the following:
"ALL"
"AI_BOTS"
"AI_GATEWAY"
"BGP"
"BOTS"
"CONNECTION_ANOMALY"
"CT"
"DNS"
"DNS_MAGNITUDE"
"DNS_AS112"
"DOS"
"EMAIL_ROUTING"
"EMAIL_SECURITY"
"FW"
"FW_PG"
"HTTP"
"HTTP_CONTROL"
"HTTP_CRAWLER_REFERER"
"HTTP_ORIGINS"
"IQI"
"LEAKED_CREDENTIALS"
"NET"
"ROBOTS_TXT"
"SPEED"
"WORKERS_AI"
description: str
end_date: datetime
formatdate-time
event_type: Literal["EVENT", "GENERAL", "OUTAGE", 3 more]

Event type for annotations.

One of the following:
"EVENT"
"GENERAL"
"OUTAGE"
"PARTIAL_PROJECTION"
"PIPELINE"
"TRAFFIC_ANOMALY"
is_instantaneous: bool

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

linked_url: str
formaturi
start_date: datetime
formatdate-time
level: int

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

date_range: List[MetaDateRange]
end_time: datetime

Adjusted end of date range.

formatdate-time
start_time: datetime

Adjusted start of date range.

formatdate-time
last_updated: datetime

Timestamp of the last dataset update.

formatdate-time
normalization: Literal["PERCENTAGE", "MIN0_MAX", "MIN_MAX", 5 more]

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

One of the following:
"PERCENTAGE"
"MIN0_MAX"
"MIN_MAX"
"RAW_VALUES"
"PERCENTAGE_CHANGE"
"ROLLING_AVERAGE"
"OVERLAPPED_PERCENTAGE"
"RATIO"
units: List[MetaUnit]

Measurement units for the results.

name: str
value: str
summary_0: Dict[str, str]

Get HTTP requests summary by dimension

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
response = client.radar.http.summary_v2(
    dimension="ADM1",
)
print(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"
          }
        ],
        "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": {
      "Chrome": "50.168733",
      "Firefox": "25.084366"
    }
  },
  "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"
          }
        ],
        "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": {
      "Chrome": "50.168733",
      "Firefox": "25.084366"
    }
  },
  "success": true
}