## Get bots HTTP requests time series `client.Radar.Bots.Timeseries(ctx, query) (*BotTimeseriesResponse, error)` **get** `/radar/bots/timeseries` Retrieves bots HTTP request volume over time. ### Parameters - `query BotTimeseriesParams` - `AggInterval param.Field[BotTimeseriesParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const BotTimeseriesParamsAggInterval15m BotTimeseriesParamsAggInterval = "15m"` - `const BotTimeseriesParamsAggInterval1h BotTimeseriesParamsAggInterval = "1h"` - `const BotTimeseriesParamsAggInterval1d BotTimeseriesParamsAggInterval = "1d"` - `const BotTimeseriesParamsAggInterval1w BotTimeseriesParamsAggInterval = "1w"` - `ASN param.Field[[]string]` 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 param.Field[[]string]` Filters results by bot name. - `BotCategory param.Field[[]BotTimeseriesParamsBotCategory]` Filters results by bot category. - `const BotTimeseriesParamsBotCategorySearchEngineCrawler BotTimeseriesParamsBotCategory = "SEARCH_ENGINE_CRAWLER"` - `const BotTimeseriesParamsBotCategorySearchEngineOptimization BotTimeseriesParamsBotCategory = "SEARCH_ENGINE_OPTIMIZATION"` - `const BotTimeseriesParamsBotCategoryMonitoringAndAnalytics BotTimeseriesParamsBotCategory = "MONITORING_AND_ANALYTICS"` - `const BotTimeseriesParamsBotCategoryAdvertisingAndMarketing BotTimeseriesParamsBotCategory = "ADVERTISING_AND_MARKETING"` - `const BotTimeseriesParamsBotCategorySocialMediaMarketing BotTimeseriesParamsBotCategory = "SOCIAL_MEDIA_MARKETING"` - `const BotTimeseriesParamsBotCategoryPagePreview BotTimeseriesParamsBotCategory = "PAGE_PREVIEW"` - `const BotTimeseriesParamsBotCategoryAcademicResearch BotTimeseriesParamsBotCategory = "ACADEMIC_RESEARCH"` - `const BotTimeseriesParamsBotCategorySecurity BotTimeseriesParamsBotCategory = "SECURITY"` - `const BotTimeseriesParamsBotCategoryAccessibility BotTimeseriesParamsBotCategory = "ACCESSIBILITY"` - `const BotTimeseriesParamsBotCategoryWebhooks BotTimeseriesParamsBotCategory = "WEBHOOKS"` - `const BotTimeseriesParamsBotCategoryFeedFetcher BotTimeseriesParamsBotCategory = "FEED_FETCHER"` - `const BotTimeseriesParamsBotCategoryAICrawler BotTimeseriesParamsBotCategory = "AI_CRAWLER"` - `const BotTimeseriesParamsBotCategoryAggregator BotTimeseriesParamsBotCategory = "AGGREGATOR"` - `const BotTimeseriesParamsBotCategoryAIAssistant BotTimeseriesParamsBotCategory = "AI_ASSISTANT"` - `const BotTimeseriesParamsBotCategoryAISearch BotTimeseriesParamsBotCategory = "AI_SEARCH"` - `const BotTimeseriesParamsBotCategoryArchiver BotTimeseriesParamsBotCategory = "ARCHIVER"` - `BotKind param.Field[[]BotTimeseriesParamsBotKind]` Filters results by bot kind. - `const BotTimeseriesParamsBotKindAgent BotTimeseriesParamsBotKind = "AGENT"` - `const BotTimeseriesParamsBotKindBot BotTimeseriesParamsBotKind = "BOT"` - `BotOperator param.Field[[]string]` Filters results by bot operator. - `BotVerificationStatus param.Field[[]BotTimeseriesParamsBotVerificationStatus]` Filters results by bot verification status (Verified vs. Unverified). - `const BotTimeseriesParamsBotVerificationStatusVerified BotTimeseriesParamsBotVerificationStatus = "VERIFIED"` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[BotTimeseriesParamsFormat]` Format in which results will be returned. - `const BotTimeseriesParamsFormatJson BotTimeseriesParamsFormat = "JSON"` - `const BotTimeseriesParamsFormatCsv BotTimeseriesParamsFormat = "CSV"` - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. ### Returns - `type BotTimeseriesResponse struct{…}` - `Meta BotTimeseriesResponseMeta` Metadata for the results. - `AggInterval BotTimeseriesResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const BotTimeseriesResponseMetaAggIntervalFifteenMinutes BotTimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const BotTimeseriesResponseMetaAggIntervalOneHour BotTimeseriesResponseMetaAggInterval = "ONE_HOUR"` - `const BotTimeseriesResponseMetaAggIntervalOneDay BotTimeseriesResponseMetaAggInterval = "ONE_DAY"` - `const BotTimeseriesResponseMetaAggIntervalOneWeek BotTimeseriesResponseMetaAggInterval = "ONE_WEEK"` - `const BotTimeseriesResponseMetaAggIntervalOneMonth BotTimeseriesResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo BotTimeseriesResponseMetaConfidenceInfo` - `Annotations []BotTimeseriesResponseMetaConfidenceInfoAnnotation` - `DataSource BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []BotTimeseriesResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization BotTimeseriesResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const BotTimeseriesResponseMetaNormalizationPercentage BotTimeseriesResponseMetaNormalization = "PERCENTAGE"` - `const BotTimeseriesResponseMetaNormalizationMin0Max BotTimeseriesResponseMetaNormalization = "MIN0_MAX"` - `const BotTimeseriesResponseMetaNormalizationMinMax BotTimeseriesResponseMetaNormalization = "MIN_MAX"` - `const BotTimeseriesResponseMetaNormalizationRawValues BotTimeseriesResponseMetaNormalization = "RAW_VALUES"` - `const BotTimeseriesResponseMetaNormalizationPercentageChange BotTimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const BotTimeseriesResponseMetaNormalizationRollingAverage BotTimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"` - `const BotTimeseriesResponseMetaNormalizationOverlappedPercentage BotTimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const BotTimeseriesResponseMetaNormalizationRatio BotTimeseriesResponseMetaNormalization = "RATIO"` - `Units []BotTimeseriesResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` ### Example ```go 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.Bots.Timeseries(context.TODO(), radar.BotTimeseriesParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ], "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" } ] } }, "success": true } ```