Skip to content
Start here

Get HTTP requests by OS time series

client.Radar.HTTP.TimeseriesGroups.OS(ctx, query) (*HTTPTimeseriesGroupOSResponse, error)
GET/radar/http/timeseries_groups/os

Retrieves the distribution of HTTP requests by operating system 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 HTTPTimeseriesGroupOSParams
AggInterval param.Field[HTTPTimeseriesGroupOSParamsAggInterval]Optional

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

const HTTPTimeseriesGroupOSParamsAggInterval15m HTTPTimeseriesGroupOSParamsAggInterval = "15m"
const HTTPTimeseriesGroupOSParamsAggInterval1h HTTPTimeseriesGroupOSParamsAggInterval = "1h"
const HTTPTimeseriesGroupOSParamsAggInterval1d HTTPTimeseriesGroupOSParamsAggInterval = "1d"
const HTTPTimeseriesGroupOSParamsAggInterval1w HTTPTimeseriesGroupOSParamsAggInterval = "1w"
ASN param.Field[[]string]Optional

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.

BotClass param.Field[[]HTTPTimeseriesGroupOSParamsBotClass]Optional

Filters results by bot class. Refer to Bot classes.

const HTTPTimeseriesGroupOSParamsBotClassLikelyAutomated HTTPTimeseriesGroupOSParamsBotClass = "LIKELY_AUTOMATED"
const HTTPTimeseriesGroupOSParamsBotClassLikelyHuman HTTPTimeseriesGroupOSParamsBotClass = "LIKELY_HUMAN"
BrowserFamily param.Field[[]HTTPTimeseriesGroupOSParamsBrowserFamily]Optional

Filters results by browser family.

const HTTPTimeseriesGroupOSParamsBrowserFamilyChrome HTTPTimeseriesGroupOSParamsBrowserFamily = "CHROME"
const HTTPTimeseriesGroupOSParamsBrowserFamilyEdge HTTPTimeseriesGroupOSParamsBrowserFamily = "EDGE"
const HTTPTimeseriesGroupOSParamsBrowserFamilyFirefox HTTPTimeseriesGroupOSParamsBrowserFamily = "FIREFOX"
const HTTPTimeseriesGroupOSParamsBrowserFamilySafari HTTPTimeseriesGroupOSParamsBrowserFamily = "SAFARI"
Continent param.Field[[]string]Optional

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.

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.

DeviceType param.Field[[]HTTPTimeseriesGroupOSParamsDeviceType]Optional

Filters results by device type.

const HTTPTimeseriesGroupOSParamsDeviceTypeDesktop HTTPTimeseriesGroupOSParamsDeviceType = "DESKTOP"
const HTTPTimeseriesGroupOSParamsDeviceTypeMobile HTTPTimeseriesGroupOSParamsDeviceType = "MOBILE"
const HTTPTimeseriesGroupOSParamsDeviceTypeOther HTTPTimeseriesGroupOSParamsDeviceType = "OTHER"
Format param.Field[HTTPTimeseriesGroupOSParamsFormat]Optional

Format in which results will be returned.

const HTTPTimeseriesGroupOSParamsFormatJson HTTPTimeseriesGroupOSParamsFormat = "JSON"
const HTTPTimeseriesGroupOSParamsFormatCsv HTTPTimeseriesGroupOSParamsFormat = "CSV"
GeoID param.Field[[]string]Optional

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

HTTPProtocol param.Field[[]HTTPTimeseriesGroupOSParamsHTTPProtocol]Optional

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

const HTTPTimeseriesGroupOSParamsHTTPProtocolHTTP HTTPTimeseriesGroupOSParamsHTTPProtocol = "HTTP"
const HTTPTimeseriesGroupOSParamsHTTPProtocolHTTPS HTTPTimeseriesGroupOSParamsHTTPProtocol = "HTTPS"
HTTPVersion param.Field[[]HTTPTimeseriesGroupOSParamsHTTPVersion]Optional

Filters results by HTTP version.

const HTTPTimeseriesGroupOSParamsHTTPVersionHttPv1 HTTPTimeseriesGroupOSParamsHTTPVersion = "HTTPv1"
const HTTPTimeseriesGroupOSParamsHTTPVersionHttPv2 HTTPTimeseriesGroupOSParamsHTTPVersion = "HTTPv2"
const HTTPTimeseriesGroupOSParamsHTTPVersionHttPv3 HTTPTimeseriesGroupOSParamsHTTPVersion = "HTTPv3"
IPVersion param.Field[[]HTTPTimeseriesGroupOSParamsIPVersion]Optional

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

const HTTPTimeseriesGroupOSParamsIPVersionIPv4 HTTPTimeseriesGroupOSParamsIPVersion = "IPv4"
const HTTPTimeseriesGroupOSParamsIPVersionIPv6 HTTPTimeseriesGroupOSParamsIPVersion = "IPv6"
Location param.Field[[]string]Optional

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 param.Field[[]string]Optional

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

TLSVersion param.Field[[]HTTPTimeseriesGroupOSParamsTLSVersion]Optional

Filters results by TLS version.

const HTTPTimeseriesGroupOSParamsTLSVersionTlSv1_0 HTTPTimeseriesGroupOSParamsTLSVersion = "TLSv1_0"
const HTTPTimeseriesGroupOSParamsTLSVersionTlSv1_1 HTTPTimeseriesGroupOSParamsTLSVersion = "TLSv1_1"
const HTTPTimeseriesGroupOSParamsTLSVersionTlSv1_2 HTTPTimeseriesGroupOSParamsTLSVersion = "TLSv1_2"
const HTTPTimeseriesGroupOSParamsTLSVersionTlSv1_3 HTTPTimeseriesGroupOSParamsTLSVersion = "TLSv1_3"
const HTTPTimeseriesGroupOSParamsTLSVersionTlSvQuic HTTPTimeseriesGroupOSParamsTLSVersion = "TLSvQUIC"
ReturnsExpand Collapse
type HTTPTimeseriesGroupOSResponse struct{…}
Meta HTTPTimeseriesGroupOSResponseMeta

Metadata for the results.

AggInterval HTTPTimeseriesGroupOSResponseMetaAggInterval

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

One of the following:
const HTTPTimeseriesGroupOSResponseMetaAggIntervalFifteenMinutes HTTPTimeseriesGroupOSResponseMetaAggInterval = "FIFTEEN_MINUTES"
const HTTPTimeseriesGroupOSResponseMetaAggIntervalOneHour HTTPTimeseriesGroupOSResponseMetaAggInterval = "ONE_HOUR"
const HTTPTimeseriesGroupOSResponseMetaAggIntervalOneDay HTTPTimeseriesGroupOSResponseMetaAggInterval = "ONE_DAY"
const HTTPTimeseriesGroupOSResponseMetaAggIntervalOneWeek HTTPTimeseriesGroupOSResponseMetaAggInterval = "ONE_WEEK"
const HTTPTimeseriesGroupOSResponseMetaAggIntervalOneMonth HTTPTimeseriesGroupOSResponseMetaAggInterval = "ONE_MONTH"
ConfidenceInfo HTTPTimeseriesGroupOSResponseMetaConfidenceInfo
Annotations []HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotation
DataSource HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceCT HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "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 []HTTPTimeseriesGroupOSResponseMetaDateRange
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 HTTPTimeseriesGroupOSResponseMetaNormalization

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

One of the following:
const HTTPTimeseriesGroupOSResponseMetaNormalizationPercentage HTTPTimeseriesGroupOSResponseMetaNormalization = "PERCENTAGE"
const HTTPTimeseriesGroupOSResponseMetaNormalizationMin0Max HTTPTimeseriesGroupOSResponseMetaNormalization = "MIN0_MAX"
const HTTPTimeseriesGroupOSResponseMetaNormalizationMinMax HTTPTimeseriesGroupOSResponseMetaNormalization = "MIN_MAX"
const HTTPTimeseriesGroupOSResponseMetaNormalizationRawValues HTTPTimeseriesGroupOSResponseMetaNormalization = "RAW_VALUES"
const HTTPTimeseriesGroupOSResponseMetaNormalizationPercentageChange HTTPTimeseriesGroupOSResponseMetaNormalization = "PERCENTAGE_CHANGE"
const HTTPTimeseriesGroupOSResponseMetaNormalizationRollingAverage HTTPTimeseriesGroupOSResponseMetaNormalization = "ROLLING_AVERAGE"
const HTTPTimeseriesGroupOSResponseMetaNormalizationOverlappedPercentage HTTPTimeseriesGroupOSResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const HTTPTimeseriesGroupOSResponseMetaNormalizationRatio HTTPTimeseriesGroupOSResponseMetaNormalization = "RATIO"
Units []HTTPTimeseriesGroupOSResponseMetaUnit

Measurement units for the results.

Name string
Value string
Serie0 HTTPTimeseriesGroupOSResponseSerie0
Timestamps []Time

Get HTTP requests by OS time series

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.HTTP.TimeseriesGroups.OS(context.TODO(), radar.HTTPTimeseriesGroupOSParams{

  })
  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": {
      "timestamps": [
        "2023-08-08T10:15:00Z"
      ]
    }
  },
  "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": {
      "timestamps": [
        "2023-08-08T10:15:00Z"
      ]
    }
  },
  "success": true
}