# AI # To Markdown ## Convert Files into Markdown `client.Radar.AI.ToMarkdown.New(ctx, params) (*SinglePage[AIToMarkdownNewResponse], error)` **post** `/accounts/{account_id}/ai/tomarkdown` Converts uploaded files into Markdown format using Workers AI. ### Parameters - `params AIToMarkdownNewParams` - `AccountID param.Field[string]` Path param - `Files param.Field[[]Reader]` Body param ### Returns - `type AIToMarkdownNewResponse struct{…}` - `Data string` - `Format string` - `MimeType string` - `Name string` - `Tokens string` ### Example ```go package main import ( "bytes" "context" "fmt" "io" "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"), ) page, err := client.Radar.AI.ToMarkdown.New(context.TODO(), radar.AIToMarkdownNewParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Files: cloudflare.F([]io.Reader{io.Reader(bytes.NewBuffer([]byte("Example data")))}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "result": [ { "data": "data", "format": "format", "mimeType": "mimeType", "name": "name", "tokens": "tokens" } ], "success": true } ``` # Inference ## Get Workers AI inference distribution by dimension `client.Radar.AI.Inference.SummaryV2(ctx, dimension, query) (*AIInferenceSummaryV2Response, error)` **get** `/radar/ai/inference/summary/{dimension}` Retrieves an aggregated summary of the number of inferences run on Workers AI, grouped by the specified dimension. ### Parameters - `dimension AIInferenceSummaryV2ParamsDimension` Specifies the attribute by which to group the results. - `const AIInferenceSummaryV2ParamsDimensionModel AIInferenceSummaryV2ParamsDimension = "MODEL"` - `const AIInferenceSummaryV2ParamsDimensionTask AIInferenceSummaryV2ParamsDimension = "TASK"` - `query AIInferenceSummaryV2Params` - `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. - `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). 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIInferenceSummaryV2ParamsFormat]` Format in which results will be returned. - `const AIInferenceSummaryV2ParamsFormatJson AIInferenceSummaryV2ParamsFormat = "JSON"` - `const AIInferenceSummaryV2ParamsFormatCsv AIInferenceSummaryV2ParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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 AIInferenceSummaryV2Response struct{…}` - `Meta AIInferenceSummaryV2ResponseMeta` Metadata for the results. - `ConfidenceInfo AIInferenceSummaryV2ResponseMetaConfidenceInfo` - `Annotations []AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotation` - `DataSource AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIInferenceSummaryV2ResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIInferenceSummaryV2ResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIInferenceSummaryV2ResponseMetaNormalizationPercentage AIInferenceSummaryV2ResponseMetaNormalization = "PERCENTAGE"` - `const AIInferenceSummaryV2ResponseMetaNormalizationMin0Max AIInferenceSummaryV2ResponseMetaNormalization = "MIN0_MAX"` - `const AIInferenceSummaryV2ResponseMetaNormalizationMinMax AIInferenceSummaryV2ResponseMetaNormalization = "MIN_MAX"` - `const AIInferenceSummaryV2ResponseMetaNormalizationRawValues AIInferenceSummaryV2ResponseMetaNormalization = "RAW_VALUES"` - `const AIInferenceSummaryV2ResponseMetaNormalizationPercentageChange AIInferenceSummaryV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIInferenceSummaryV2ResponseMetaNormalizationRollingAverage AIInferenceSummaryV2ResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIInferenceSummaryV2ResponseMetaNormalizationOverlappedPercentage AIInferenceSummaryV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIInferenceSummaryV2ResponseMetaNormalizationRatio AIInferenceSummaryV2ResponseMetaNormalization = "RATIO"` - `Units []AIInferenceSummaryV2ResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, 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.AI.Inference.SummaryV2( context.TODO(), radar.AIInferenceSummaryV2ParamsDimensionModel, radar.AIInferenceSummaryV2Params{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "@cf/meta/llama-3-8b-instruct": "8.381743", "@cf/meta/m2m100-1.2b": "22.904", "@cf/stabilityai/stable-diffusion-xl-base-1.0": "10.274394" } }, "success": true } ``` ## Get time series distribution of Workers AI inference by dimension. `client.Radar.AI.Inference.TimeseriesGroupsV2(ctx, dimension, query) (*AIInferenceTimeseriesGroupsV2Response, error)` **get** `/radar/ai/inference/timeseries_groups/{dimension}` Retrieves the distribution of the number of inferences run on Workers AI, grouped by the specified dimension over time. ### Parameters - `dimension AIInferenceTimeseriesGroupsV2ParamsDimension` Specifies the attribute by which to group the results. - `const AIInferenceTimeseriesGroupsV2ParamsDimensionModel AIInferenceTimeseriesGroupsV2ParamsDimension = "MODEL"` - `const AIInferenceTimeseriesGroupsV2ParamsDimensionTask AIInferenceTimeseriesGroupsV2ParamsDimension = "TASK"` - `query AIInferenceTimeseriesGroupsV2Params` - `AggInterval param.Field[AIInferenceTimeseriesGroupsV2ParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/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 AIInferenceTimeseriesGroupsV2ParamsAggInterval15m AIInferenceTimeseriesGroupsV2ParamsAggInterval = "15m"` - `const AIInferenceTimeseriesGroupsV2ParamsAggInterval1h AIInferenceTimeseriesGroupsV2ParamsAggInterval = "1h"` - `const AIInferenceTimeseriesGroupsV2ParamsAggInterval1d AIInferenceTimeseriesGroupsV2ParamsAggInterval = "1d"` - `const AIInferenceTimeseriesGroupsV2ParamsAggInterval1w AIInferenceTimeseriesGroupsV2ParamsAggInterval = "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. - `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). 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIInferenceTimeseriesGroupsV2ParamsFormat]` Format in which results will be returned. - `const AIInferenceTimeseriesGroupsV2ParamsFormatJson AIInferenceTimeseriesGroupsV2ParamsFormat = "JSON"` - `const AIInferenceTimeseriesGroupsV2ParamsFormatCsv AIInferenceTimeseriesGroupsV2ParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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. - `Normalization param.Field[AIInferenceTimeseriesGroupsV2ParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIInferenceTimeseriesGroupsV2ParamsNormalizationPercentage AIInferenceTimeseriesGroupsV2ParamsNormalization = "PERCENTAGE"` - `const AIInferenceTimeseriesGroupsV2ParamsNormalizationMin0Max AIInferenceTimeseriesGroupsV2ParamsNormalization = "MIN0_MAX"` ### Returns - `type AIInferenceTimeseriesGroupsV2Response struct{…}` - `Meta AIInferenceTimeseriesGroupsV2ResponseMeta` Metadata for the results. - `AggInterval AIInferenceTimeseriesGroupsV2ResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/aggregation-intervals/). - `const AIInferenceTimeseriesGroupsV2ResponseMetaAggIntervalFifteenMinutes AIInferenceTimeseriesGroupsV2ResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaAggIntervalOneHour AIInferenceTimeseriesGroupsV2ResponseMetaAggInterval = "ONE_HOUR"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaAggIntervalOneDay AIInferenceTimeseriesGroupsV2ResponseMetaAggInterval = "ONE_DAY"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaAggIntervalOneWeek AIInferenceTimeseriesGroupsV2ResponseMetaAggInterval = "ONE_WEEK"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaAggIntervalOneMonth AIInferenceTimeseriesGroupsV2ResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfo` - `Annotations []AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation` - `DataSource AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIInferenceTimeseriesGroupsV2ResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIInferenceTimeseriesGroupsV2ResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIInferenceTimeseriesGroupsV2ResponseMetaNormalizationPercentage AIInferenceTimeseriesGroupsV2ResponseMetaNormalization = "PERCENTAGE"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaNormalizationMin0Max AIInferenceTimeseriesGroupsV2ResponseMetaNormalization = "MIN0_MAX"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaNormalizationMinMax AIInferenceTimeseriesGroupsV2ResponseMetaNormalization = "MIN_MAX"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaNormalizationRawValues AIInferenceTimeseriesGroupsV2ResponseMetaNormalization = "RAW_VALUES"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaNormalizationPercentageChange AIInferenceTimeseriesGroupsV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaNormalizationRollingAverage AIInferenceTimeseriesGroupsV2ResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaNormalizationOverlappedPercentage AIInferenceTimeseriesGroupsV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIInferenceTimeseriesGroupsV2ResponseMetaNormalizationRatio AIInferenceTimeseriesGroupsV2ResponseMetaNormalization = "RATIO"` - `Units []AIInferenceTimeseriesGroupsV2ResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AIInferenceTimeseriesGroupsV2ResponseSerie0` - `Timestamps []Time` ### 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.AI.Inference.TimeseriesGroupsV2( context.TODO(), radar.AIInferenceTimeseriesGroupsV2ParamsDimensionModel, radar.AIInferenceTimeseriesGroupsV2Params{ }, ) 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", "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 } ``` # Summary ## Get Workers AI models summary `client.Radar.AI.Inference.Summary.Model(ctx, query) (*AIInferenceSummaryModelResponse, error)` **get** `/radar/ai/inference/summary/model` Retrieves the distribution of the number of inferences by model. ### Parameters - `query AIInferenceSummaryModelParams` - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIInferenceSummaryModelParamsFormat]` Format in which results will be returned. - `const AIInferenceSummaryModelParamsFormatJson AIInferenceSummaryModelParamsFormat = "JSON"` - `const AIInferenceSummaryModelParamsFormatCsv AIInferenceSummaryModelParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AIInferenceSummaryModelResponse struct{…}` - `Meta AIInferenceSummaryModelResponseMeta` Metadata for the results. - `ConfidenceInfo AIInferenceSummaryModelResponseMetaConfidenceInfo` - `Annotations []AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotation` - `DataSource AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceCT AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIInferenceSummaryModelResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIInferenceSummaryModelResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIInferenceSummaryModelResponseMetaNormalizationPercentage AIInferenceSummaryModelResponseMetaNormalization = "PERCENTAGE"` - `const AIInferenceSummaryModelResponseMetaNormalizationMin0Max AIInferenceSummaryModelResponseMetaNormalization = "MIN0_MAX"` - `const AIInferenceSummaryModelResponseMetaNormalizationMinMax AIInferenceSummaryModelResponseMetaNormalization = "MIN_MAX"` - `const AIInferenceSummaryModelResponseMetaNormalizationRawValues AIInferenceSummaryModelResponseMetaNormalization = "RAW_VALUES"` - `const AIInferenceSummaryModelResponseMetaNormalizationPercentageChange AIInferenceSummaryModelResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIInferenceSummaryModelResponseMetaNormalizationRollingAverage AIInferenceSummaryModelResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIInferenceSummaryModelResponseMetaNormalizationOverlappedPercentage AIInferenceSummaryModelResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIInferenceSummaryModelResponseMetaNormalizationRatio AIInferenceSummaryModelResponseMetaNormalization = "RATIO"` - `Units []AIInferenceSummaryModelResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, 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.AI.Inference.Summary.Model(context.TODO(), radar.AIInferenceSummaryModelParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "@cf/meta/llama-3-8b-instruct": "8.381743", "@cf/meta/m2m100-1.2b": "22.904", "@cf/stabilityai/stable-diffusion-xl-base-1.0": "10.274394" } }, "success": true } ``` ## Get Workers AI tasks summary `client.Radar.AI.Inference.Summary.Task(ctx, query) (*AIInferenceSummaryTaskResponse, error)` **get** `/radar/ai/inference/summary/task` Retrieves the distribution of the number of inferences by task. ### Parameters - `query AIInferenceSummaryTaskParams` - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIInferenceSummaryTaskParamsFormat]` Format in which results will be returned. - `const AIInferenceSummaryTaskParamsFormatJson AIInferenceSummaryTaskParamsFormat = "JSON"` - `const AIInferenceSummaryTaskParamsFormatCsv AIInferenceSummaryTaskParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AIInferenceSummaryTaskResponse struct{…}` - `Meta AIInferenceSummaryTaskResponseMeta` Metadata for the results. - `ConfidenceInfo AIInferenceSummaryTaskResponseMetaConfidenceInfo` - `Annotations []AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotation` - `DataSource AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceCT AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIInferenceSummaryTaskResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIInferenceSummaryTaskResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIInferenceSummaryTaskResponseMetaNormalizationPercentage AIInferenceSummaryTaskResponseMetaNormalization = "PERCENTAGE"` - `const AIInferenceSummaryTaskResponseMetaNormalizationMin0Max AIInferenceSummaryTaskResponseMetaNormalization = "MIN0_MAX"` - `const AIInferenceSummaryTaskResponseMetaNormalizationMinMax AIInferenceSummaryTaskResponseMetaNormalization = "MIN_MAX"` - `const AIInferenceSummaryTaskResponseMetaNormalizationRawValues AIInferenceSummaryTaskResponseMetaNormalization = "RAW_VALUES"` - `const AIInferenceSummaryTaskResponseMetaNormalizationPercentageChange AIInferenceSummaryTaskResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIInferenceSummaryTaskResponseMetaNormalizationRollingAverage AIInferenceSummaryTaskResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIInferenceSummaryTaskResponseMetaNormalizationOverlappedPercentage AIInferenceSummaryTaskResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIInferenceSummaryTaskResponseMetaNormalizationRatio AIInferenceSummaryTaskResponseMetaNormalization = "RATIO"` - `Units []AIInferenceSummaryTaskResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, 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.AI.Inference.Summary.Task(context.TODO(), radar.AIInferenceSummaryTaskParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "text generation": "10.274394", "text-to-image": "22.904" } }, "success": true } ``` # Timeseries Groups # Summary ## Get Workers AI models time series `client.Radar.AI.Inference.TimeseriesGroups.Summary.Model(ctx, query) (*AIInferenceTimeseriesGroupSummaryModelResponse, error)` **get** `/radar/ai/inference/timeseries_groups/model` Retrieves the distribution of the number of inferences by model over time. ### Parameters - `query AIInferenceTimeseriesGroupSummaryModelParams` - `AggInterval param.Field[AIInferenceTimeseriesGroupSummaryModelParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/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 AIInferenceTimeseriesGroupSummaryModelParamsAggInterval15m AIInferenceTimeseriesGroupSummaryModelParamsAggInterval = "15m"` - `const AIInferenceTimeseriesGroupSummaryModelParamsAggInterval1h AIInferenceTimeseriesGroupSummaryModelParamsAggInterval = "1h"` - `const AIInferenceTimeseriesGroupSummaryModelParamsAggInterval1d AIInferenceTimeseriesGroupSummaryModelParamsAggInterval = "1d"` - `const AIInferenceTimeseriesGroupSummaryModelParamsAggInterval1w AIInferenceTimeseriesGroupSummaryModelParamsAggInterval = "1w"` - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIInferenceTimeseriesGroupSummaryModelParamsFormat]` Format in which results will be returned. - `const AIInferenceTimeseriesGroupSummaryModelParamsFormatJson AIInferenceTimeseriesGroupSummaryModelParamsFormat = "JSON"` - `const AIInferenceTimeseriesGroupSummaryModelParamsFormatCsv AIInferenceTimeseriesGroupSummaryModelParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AIInferenceTimeseriesGroupSummaryModelResponse struct{…}` - `Meta AIInferenceTimeseriesGroupSummaryModelResponseMeta` Metadata for the results. - `AggInterval AIInferenceTimeseriesGroupSummaryModelResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/aggregation-intervals/). - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaAggIntervalFifteenMinutes AIInferenceTimeseriesGroupSummaryModelResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaAggIntervalOneHour AIInferenceTimeseriesGroupSummaryModelResponseMetaAggInterval = "ONE_HOUR"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaAggIntervalOneDay AIInferenceTimeseriesGroupSummaryModelResponseMetaAggInterval = "ONE_DAY"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaAggIntervalOneWeek AIInferenceTimeseriesGroupSummaryModelResponseMetaAggInterval = "ONE_WEEK"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaAggIntervalOneMonth AIInferenceTimeseriesGroupSummaryModelResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfo` - `Annotations []AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotation` - `DataSource AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceCT AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIInferenceTimeseriesGroupSummaryModelResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalizationPercentage AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalization = "PERCENTAGE"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalizationMin0Max AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalization = "MIN0_MAX"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalizationMinMax AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalization = "MIN_MAX"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalizationRawValues AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalization = "RAW_VALUES"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalizationPercentageChange AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalizationRollingAverage AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalizationOverlappedPercentage AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalizationRatio AIInferenceTimeseriesGroupSummaryModelResponseMetaNormalization = "RATIO"` - `Units []AIInferenceTimeseriesGroupSummaryModelResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AIInferenceTimeseriesGroupSummaryModelResponseSerie0` - `Timestamps []Time` ### 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.AI.Inference.TimeseriesGroups.Summary.Model(context.TODO(), radar.AIInferenceTimeseriesGroupSummaryModelParams{ }) 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", "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 } ``` ## Get Workers AI tasks time series `client.Radar.AI.Inference.TimeseriesGroups.Summary.Task(ctx, query) (*AIInferenceTimeseriesGroupSummaryTaskResponse, error)` **get** `/radar/ai/inference/timeseries_groups/task` Retrieves the distribution of the number of inferences by task over time. ### Parameters - `query AIInferenceTimeseriesGroupSummaryTaskParams` - `AggInterval param.Field[AIInferenceTimeseriesGroupSummaryTaskParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/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 AIInferenceTimeseriesGroupSummaryTaskParamsAggInterval15m AIInferenceTimeseriesGroupSummaryTaskParamsAggInterval = "15m"` - `const AIInferenceTimeseriesGroupSummaryTaskParamsAggInterval1h AIInferenceTimeseriesGroupSummaryTaskParamsAggInterval = "1h"` - `const AIInferenceTimeseriesGroupSummaryTaskParamsAggInterval1d AIInferenceTimeseriesGroupSummaryTaskParamsAggInterval = "1d"` - `const AIInferenceTimeseriesGroupSummaryTaskParamsAggInterval1w AIInferenceTimeseriesGroupSummaryTaskParamsAggInterval = "1w"` - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIInferenceTimeseriesGroupSummaryTaskParamsFormat]` Format in which results will be returned. - `const AIInferenceTimeseriesGroupSummaryTaskParamsFormatJson AIInferenceTimeseriesGroupSummaryTaskParamsFormat = "JSON"` - `const AIInferenceTimeseriesGroupSummaryTaskParamsFormatCsv AIInferenceTimeseriesGroupSummaryTaskParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AIInferenceTimeseriesGroupSummaryTaskResponse struct{…}` - `Meta AIInferenceTimeseriesGroupSummaryTaskResponseMeta` Metadata for the results. - `AggInterval AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/aggregation-intervals/). - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggIntervalFifteenMinutes AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggIntervalOneHour AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggInterval = "ONE_HOUR"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggIntervalOneDay AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggInterval = "ONE_DAY"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggIntervalOneWeek AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggInterval = "ONE_WEEK"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggIntervalOneMonth AIInferenceTimeseriesGroupSummaryTaskResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfo` - `Annotations []AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotation` - `DataSource AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceCT AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIInferenceTimeseriesGroupSummaryTaskResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalizationPercentage AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalization = "PERCENTAGE"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalizationMin0Max AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalization = "MIN0_MAX"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalizationMinMax AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalization = "MIN_MAX"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalizationRawValues AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalization = "RAW_VALUES"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalizationPercentageChange AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalizationRollingAverage AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalizationOverlappedPercentage AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalizationRatio AIInferenceTimeseriesGroupSummaryTaskResponseMetaNormalization = "RATIO"` - `Units []AIInferenceTimeseriesGroupSummaryTaskResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AIInferenceTimeseriesGroupSummaryTaskResponseSerie0` - `Timestamps []Time` ### 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.AI.Inference.TimeseriesGroups.Summary.Task(context.TODO(), radar.AIInferenceTimeseriesGroupSummaryTaskParams{ }) 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", "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 } ``` # Bots ## Get AI bots HTTP requests distribution by dimension `client.Radar.AI.Bots.SummaryV2(ctx, dimension, query) (*AIBotSummaryV2Response, error)` **get** `/radar/ai/bots/summary/{dimension}` Retrieves an aggregated summary of AI bots HTTP requests grouped by the specified dimension. ### Parameters - `dimension AIBotSummaryV2ParamsDimension` Specifies the attribute by which to group the results. - `const AIBotSummaryV2ParamsDimensionUserAgent AIBotSummaryV2ParamsDimension = "USER_AGENT"` - `const AIBotSummaryV2ParamsDimensionCrawlPurpose AIBotSummaryV2ParamsDimension = "CRAWL_PURPOSE"` - `const AIBotSummaryV2ParamsDimensionIndustry AIBotSummaryV2ParamsDimension = "INDUSTRY"` - `const AIBotSummaryV2ParamsDimensionVertical AIBotSummaryV2ParamsDimension = "VERTICAL"` - `const AIBotSummaryV2ParamsDimensionContentType AIBotSummaryV2ParamsDimension = "CONTENT_TYPE"` - `const AIBotSummaryV2ParamsDimensionResponseStatus AIBotSummaryV2ParamsDimension = "RESPONSE_STATUS"` - `const AIBotSummaryV2ParamsDimensionResponseStatusCategory AIBotSummaryV2ParamsDimension = "RESPONSE_STATUS_CATEGORY"` - `query AIBotSummaryV2Params` - `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. - `ContentType param.Field[[]AIBotSummaryV2ParamsContentType]` Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System. - `const AIBotSummaryV2ParamsContentTypeHTML AIBotSummaryV2ParamsContentType = "HTML"` - `const AIBotSummaryV2ParamsContentTypeImages AIBotSummaryV2ParamsContentType = "IMAGES"` - `const AIBotSummaryV2ParamsContentTypeJson AIBotSummaryV2ParamsContentType = "JSON"` - `const AIBotSummaryV2ParamsContentTypeJavascript AIBotSummaryV2ParamsContentType = "JAVASCRIPT"` - `const AIBotSummaryV2ParamsContentTypeCSS AIBotSummaryV2ParamsContentType = "CSS"` - `const AIBotSummaryV2ParamsContentTypePlainText AIBotSummaryV2ParamsContentType = "PLAIN_TEXT"` - `const AIBotSummaryV2ParamsContentTypeFonts AIBotSummaryV2ParamsContentType = "FONTS"` - `const AIBotSummaryV2ParamsContentTypeXml AIBotSummaryV2ParamsContentType = "XML"` - `const AIBotSummaryV2ParamsContentTypeYaml AIBotSummaryV2ParamsContentType = "YAML"` - `const AIBotSummaryV2ParamsContentTypeVideo AIBotSummaryV2ParamsContentType = "VIDEO"` - `const AIBotSummaryV2ParamsContentTypeAudio AIBotSummaryV2ParamsContentType = "AUDIO"` - `const AIBotSummaryV2ParamsContentTypeMarkdown AIBotSummaryV2ParamsContentType = "MARKDOWN"` - `const AIBotSummaryV2ParamsContentTypeDocuments AIBotSummaryV2ParamsContentType = "DOCUMENTS"` - `const AIBotSummaryV2ParamsContentTypeBinary AIBotSummaryV2ParamsContentType = "BINARY"` - `const AIBotSummaryV2ParamsContentTypeSerialization AIBotSummaryV2ParamsContentType = "SERIALIZATION"` - `const AIBotSummaryV2ParamsContentTypeOther AIBotSummaryV2ParamsContentType = "OTHER"` - `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. - `CrawlPurpose param.Field[[]string]` Filters results by bot crawl purpose. - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIBotSummaryV2ParamsFormat]` Format in which results will be returned. - `const AIBotSummaryV2ParamsFormatJson AIBotSummaryV2ParamsFormat = "JSON"` - `const AIBotSummaryV2ParamsFormatCsv AIBotSummaryV2ParamsFormat = "CSV"` - `Industry param.Field[[]string]` Filters results by industry. - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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. - `ResponseStatus param.Field[[]string]` Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted. - `ResponseStatusCategory param.Field[[]AIBotSummaryV2ParamsResponseStatusCategory]` Filters results by HTTP response status code category. - `const AIBotSummaryV2ParamsResponseStatusCategoryInformational AIBotSummaryV2ParamsResponseStatusCategory = "INFORMATIONAL"` - `const AIBotSummaryV2ParamsResponseStatusCategorySuccess AIBotSummaryV2ParamsResponseStatusCategory = "SUCCESS"` - `const AIBotSummaryV2ParamsResponseStatusCategoryRedirection AIBotSummaryV2ParamsResponseStatusCategory = "REDIRECTION"` - `const AIBotSummaryV2ParamsResponseStatusCategoryClientError AIBotSummaryV2ParamsResponseStatusCategory = "CLIENT_ERROR"` - `const AIBotSummaryV2ParamsResponseStatusCategoryServerError AIBotSummaryV2ParamsResponseStatusCategory = "SERVER_ERROR"` - `UserAgent param.Field[[]string]` Filters results by user agent. - `Vertical param.Field[[]string]` Filters results by vertical. ### Returns - `type AIBotSummaryV2Response struct{…}` - `Meta AIBotSummaryV2ResponseMeta` Metadata for the results. - `ConfidenceInfo AIBotSummaryV2ResponseMetaConfidenceInfo` - `Annotations []AIBotSummaryV2ResponseMetaConfidenceInfoAnnotation` - `DataSource AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIBotSummaryV2ResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIBotSummaryV2ResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIBotSummaryV2ResponseMetaNormalizationPercentage AIBotSummaryV2ResponseMetaNormalization = "PERCENTAGE"` - `const AIBotSummaryV2ResponseMetaNormalizationMin0Max AIBotSummaryV2ResponseMetaNormalization = "MIN0_MAX"` - `const AIBotSummaryV2ResponseMetaNormalizationMinMax AIBotSummaryV2ResponseMetaNormalization = "MIN_MAX"` - `const AIBotSummaryV2ResponseMetaNormalizationRawValues AIBotSummaryV2ResponseMetaNormalization = "RAW_VALUES"` - `const AIBotSummaryV2ResponseMetaNormalizationPercentageChange AIBotSummaryV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIBotSummaryV2ResponseMetaNormalizationRollingAverage AIBotSummaryV2ResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIBotSummaryV2ResponseMetaNormalizationOverlappedPercentage AIBotSummaryV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIBotSummaryV2ResponseMetaNormalizationRatio AIBotSummaryV2ResponseMetaNormalization = "RATIO"` - `Units []AIBotSummaryV2ResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, 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.AI.Bots.SummaryV2( context.TODO(), radar.AIBotSummaryV2ParamsDimensionUserAgent, radar.AIBotSummaryV2Params{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "Amazonbot": "10.274394", "Bytespider": "8.381743", "facebookexternalhit": "63.40249" } }, "success": true } ``` ## Get AI bots HTTP requests time series `client.Radar.AI.Bots.Timeseries(ctx, query) (*AIBotTimeseriesResponse, error)` **get** `/radar/ai/bots/timeseries` Retrieves AI bots HTTP request volume over time. ### Parameters - `query AIBotTimeseriesParams` - `AggInterval param.Field[AIBotTimeseriesParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/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 AIBotTimeseriesParamsAggInterval15m AIBotTimeseriesParamsAggInterval = "15m"` - `const AIBotTimeseriesParamsAggInterval1h AIBotTimeseriesParamsAggInterval = "1h"` - `const AIBotTimeseriesParamsAggInterval1d AIBotTimeseriesParamsAggInterval = "1d"` - `const AIBotTimeseriesParamsAggInterval1w AIBotTimeseriesParamsAggInterval = "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. - `ContentType param.Field[[]AIBotTimeseriesParamsContentType]` Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System. - `const AIBotTimeseriesParamsContentTypeHTML AIBotTimeseriesParamsContentType = "HTML"` - `const AIBotTimeseriesParamsContentTypeImages AIBotTimeseriesParamsContentType = "IMAGES"` - `const AIBotTimeseriesParamsContentTypeJson AIBotTimeseriesParamsContentType = "JSON"` - `const AIBotTimeseriesParamsContentTypeJavascript AIBotTimeseriesParamsContentType = "JAVASCRIPT"` - `const AIBotTimeseriesParamsContentTypeCSS AIBotTimeseriesParamsContentType = "CSS"` - `const AIBotTimeseriesParamsContentTypePlainText AIBotTimeseriesParamsContentType = "PLAIN_TEXT"` - `const AIBotTimeseriesParamsContentTypeFonts AIBotTimeseriesParamsContentType = "FONTS"` - `const AIBotTimeseriesParamsContentTypeXml AIBotTimeseriesParamsContentType = "XML"` - `const AIBotTimeseriesParamsContentTypeYaml AIBotTimeseriesParamsContentType = "YAML"` - `const AIBotTimeseriesParamsContentTypeVideo AIBotTimeseriesParamsContentType = "VIDEO"` - `const AIBotTimeseriesParamsContentTypeAudio AIBotTimeseriesParamsContentType = "AUDIO"` - `const AIBotTimeseriesParamsContentTypeMarkdown AIBotTimeseriesParamsContentType = "MARKDOWN"` - `const AIBotTimeseriesParamsContentTypeDocuments AIBotTimeseriesParamsContentType = "DOCUMENTS"` - `const AIBotTimeseriesParamsContentTypeBinary AIBotTimeseriesParamsContentType = "BINARY"` - `const AIBotTimeseriesParamsContentTypeSerialization AIBotTimeseriesParamsContentType = "SERIALIZATION"` - `const AIBotTimeseriesParamsContentTypeOther AIBotTimeseriesParamsContentType = "OTHER"` - `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. - `CrawlPurpose param.Field[[]string]` Filters results by bot crawl purpose. - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIBotTimeseriesParamsFormat]` Format in which results will be returned. - `const AIBotTimeseriesParamsFormatJson AIBotTimeseriesParamsFormat = "JSON"` - `const AIBotTimeseriesParamsFormatCsv AIBotTimeseriesParamsFormat = "CSV"` - `Industry param.Field[[]string]` Filters results by industry. - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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. - `ResponseStatus param.Field[[]string]` Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted. - `ResponseStatusCategory param.Field[[]AIBotTimeseriesParamsResponseStatusCategory]` Filters results by HTTP response status code category. - `const AIBotTimeseriesParamsResponseStatusCategoryInformational AIBotTimeseriesParamsResponseStatusCategory = "INFORMATIONAL"` - `const AIBotTimeseriesParamsResponseStatusCategorySuccess AIBotTimeseriesParamsResponseStatusCategory = "SUCCESS"` - `const AIBotTimeseriesParamsResponseStatusCategoryRedirection AIBotTimeseriesParamsResponseStatusCategory = "REDIRECTION"` - `const AIBotTimeseriesParamsResponseStatusCategoryClientError AIBotTimeseriesParamsResponseStatusCategory = "CLIENT_ERROR"` - `const AIBotTimeseriesParamsResponseStatusCategoryServerError AIBotTimeseriesParamsResponseStatusCategory = "SERVER_ERROR"` - `UserAgent param.Field[[]string]` Filters results by user agent. - `Vertical param.Field[[]string]` Filters results by vertical. ### Returns - `type AIBotTimeseriesResponse struct{…}` - `Meta AIBotTimeseriesResponseMeta` Metadata for the results. - `AggInterval AIBotTimeseriesResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/aggregation-intervals/). - `const AIBotTimeseriesResponseMetaAggIntervalFifteenMinutes AIBotTimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AIBotTimeseriesResponseMetaAggIntervalOneHour AIBotTimeseriesResponseMetaAggInterval = "ONE_HOUR"` - `const AIBotTimeseriesResponseMetaAggIntervalOneDay AIBotTimeseriesResponseMetaAggInterval = "ONE_DAY"` - `const AIBotTimeseriesResponseMetaAggIntervalOneWeek AIBotTimeseriesResponseMetaAggInterval = "ONE_WEEK"` - `const AIBotTimeseriesResponseMetaAggIntervalOneMonth AIBotTimeseriesResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AIBotTimeseriesResponseMetaConfidenceInfo` - `Annotations []AIBotTimeseriesResponseMetaConfidenceInfoAnnotation` - `DataSource AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIBotTimeseriesResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIBotTimeseriesResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIBotTimeseriesResponseMetaNormalizationPercentage AIBotTimeseriesResponseMetaNormalization = "PERCENTAGE"` - `const AIBotTimeseriesResponseMetaNormalizationMin0Max AIBotTimeseriesResponseMetaNormalization = "MIN0_MAX"` - `const AIBotTimeseriesResponseMetaNormalizationMinMax AIBotTimeseriesResponseMetaNormalization = "MIN_MAX"` - `const AIBotTimeseriesResponseMetaNormalizationRawValues AIBotTimeseriesResponseMetaNormalization = "RAW_VALUES"` - `const AIBotTimeseriesResponseMetaNormalizationPercentageChange AIBotTimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIBotTimeseriesResponseMetaNormalizationRollingAverage AIBotTimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIBotTimeseriesResponseMetaNormalizationOverlappedPercentage AIBotTimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIBotTimeseriesResponseMetaNormalizationRatio AIBotTimeseriesResponseMetaNormalization = "RATIO"` - `Units []AIBotTimeseriesResponseMetaUnit` 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.AI.Bots.Timeseries(context.TODO(), radar.AIBotTimeseriesParams{ }) 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", "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" } ] } }, "success": true } ``` ## Get time series distribution of AI bots HTTP requests by dimension. `client.Radar.AI.Bots.TimeseriesGroups(ctx, dimension, query) (*AIBotTimeseriesGroupsResponse, error)` **get** `/radar/ai/bots/timeseries_groups/{dimension}` Retrieves the distribution of HTTP requests from AI bots, grouped by the specified dimension over time. ### Parameters - `dimension AIBotTimeseriesGroupsParamsDimension` Specifies the attribute by which to group the results. - `const AIBotTimeseriesGroupsParamsDimensionUserAgent AIBotTimeseriesGroupsParamsDimension = "USER_AGENT"` - `const AIBotTimeseriesGroupsParamsDimensionCrawlPurpose AIBotTimeseriesGroupsParamsDimension = "CRAWL_PURPOSE"` - `const AIBotTimeseriesGroupsParamsDimensionIndustry AIBotTimeseriesGroupsParamsDimension = "INDUSTRY"` - `const AIBotTimeseriesGroupsParamsDimensionVertical AIBotTimeseriesGroupsParamsDimension = "VERTICAL"` - `const AIBotTimeseriesGroupsParamsDimensionContentType AIBotTimeseriesGroupsParamsDimension = "CONTENT_TYPE"` - `const AIBotTimeseriesGroupsParamsDimensionResponseStatus AIBotTimeseriesGroupsParamsDimension = "RESPONSE_STATUS"` - `const AIBotTimeseriesGroupsParamsDimensionResponseStatusCategory AIBotTimeseriesGroupsParamsDimension = "RESPONSE_STATUS_CATEGORY"` - `query AIBotTimeseriesGroupsParams` - `AggInterval param.Field[AIBotTimeseriesGroupsParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/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 AIBotTimeseriesGroupsParamsAggInterval15m AIBotTimeseriesGroupsParamsAggInterval = "15m"` - `const AIBotTimeseriesGroupsParamsAggInterval1h AIBotTimeseriesGroupsParamsAggInterval = "1h"` - `const AIBotTimeseriesGroupsParamsAggInterval1d AIBotTimeseriesGroupsParamsAggInterval = "1d"` - `const AIBotTimeseriesGroupsParamsAggInterval1w AIBotTimeseriesGroupsParamsAggInterval = "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. - `ContentType param.Field[[]AIBotTimeseriesGroupsParamsContentType]` Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System. - `const AIBotTimeseriesGroupsParamsContentTypeHTML AIBotTimeseriesGroupsParamsContentType = "HTML"` - `const AIBotTimeseriesGroupsParamsContentTypeImages AIBotTimeseriesGroupsParamsContentType = "IMAGES"` - `const AIBotTimeseriesGroupsParamsContentTypeJson AIBotTimeseriesGroupsParamsContentType = "JSON"` - `const AIBotTimeseriesGroupsParamsContentTypeJavascript AIBotTimeseriesGroupsParamsContentType = "JAVASCRIPT"` - `const AIBotTimeseriesGroupsParamsContentTypeCSS AIBotTimeseriesGroupsParamsContentType = "CSS"` - `const AIBotTimeseriesGroupsParamsContentTypePlainText AIBotTimeseriesGroupsParamsContentType = "PLAIN_TEXT"` - `const AIBotTimeseriesGroupsParamsContentTypeFonts AIBotTimeseriesGroupsParamsContentType = "FONTS"` - `const AIBotTimeseriesGroupsParamsContentTypeXml AIBotTimeseriesGroupsParamsContentType = "XML"` - `const AIBotTimeseriesGroupsParamsContentTypeYaml AIBotTimeseriesGroupsParamsContentType = "YAML"` - `const AIBotTimeseriesGroupsParamsContentTypeVideo AIBotTimeseriesGroupsParamsContentType = "VIDEO"` - `const AIBotTimeseriesGroupsParamsContentTypeAudio AIBotTimeseriesGroupsParamsContentType = "AUDIO"` - `const AIBotTimeseriesGroupsParamsContentTypeMarkdown AIBotTimeseriesGroupsParamsContentType = "MARKDOWN"` - `const AIBotTimeseriesGroupsParamsContentTypeDocuments AIBotTimeseriesGroupsParamsContentType = "DOCUMENTS"` - `const AIBotTimeseriesGroupsParamsContentTypeBinary AIBotTimeseriesGroupsParamsContentType = "BINARY"` - `const AIBotTimeseriesGroupsParamsContentTypeSerialization AIBotTimeseriesGroupsParamsContentType = "SERIALIZATION"` - `const AIBotTimeseriesGroupsParamsContentTypeOther AIBotTimeseriesGroupsParamsContentType = "OTHER"` - `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. - `CrawlPurpose param.Field[[]string]` Filters results by bot crawl purpose. - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIBotTimeseriesGroupsParamsFormat]` Format in which results will be returned. - `const AIBotTimeseriesGroupsParamsFormatJson AIBotTimeseriesGroupsParamsFormat = "JSON"` - `const AIBotTimeseriesGroupsParamsFormatCsv AIBotTimeseriesGroupsParamsFormat = "CSV"` - `Industry param.Field[[]string]` Filters results by industry. - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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. - `Normalization param.Field[AIBotTimeseriesGroupsParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range). - `const AIBotTimeseriesGroupsParamsNormalizationPercentage AIBotTimeseriesGroupsParamsNormalization = "PERCENTAGE"` - `const AIBotTimeseriesGroupsParamsNormalizationMin0Max AIBotTimeseriesGroupsParamsNormalization = "MIN0_MAX"` - `const AIBotTimeseriesGroupsParamsNormalizationPercentageChange AIBotTimeseriesGroupsParamsNormalization = "PERCENTAGE_CHANGE"` - `ResponseStatus param.Field[[]string]` Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted. - `ResponseStatusCategory param.Field[[]AIBotTimeseriesGroupsParamsResponseStatusCategory]` Filters results by HTTP response status code category. - `const AIBotTimeseriesGroupsParamsResponseStatusCategoryInformational AIBotTimeseriesGroupsParamsResponseStatusCategory = "INFORMATIONAL"` - `const AIBotTimeseriesGroupsParamsResponseStatusCategorySuccess AIBotTimeseriesGroupsParamsResponseStatusCategory = "SUCCESS"` - `const AIBotTimeseriesGroupsParamsResponseStatusCategoryRedirection AIBotTimeseriesGroupsParamsResponseStatusCategory = "REDIRECTION"` - `const AIBotTimeseriesGroupsParamsResponseStatusCategoryClientError AIBotTimeseriesGroupsParamsResponseStatusCategory = "CLIENT_ERROR"` - `const AIBotTimeseriesGroupsParamsResponseStatusCategoryServerError AIBotTimeseriesGroupsParamsResponseStatusCategory = "SERVER_ERROR"` - `UserAgent param.Field[[]string]` Filters results by user agent. - `Vertical param.Field[[]string]` Filters results by vertical. ### Returns - `type AIBotTimeseriesGroupsResponse struct{…}` - `Meta AIBotTimeseriesGroupsResponseMeta` Metadata for the results. - `AggInterval AIBotTimeseriesGroupsResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/aggregation-intervals/). - `const AIBotTimeseriesGroupsResponseMetaAggIntervalFifteenMinutes AIBotTimeseriesGroupsResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AIBotTimeseriesGroupsResponseMetaAggIntervalOneHour AIBotTimeseriesGroupsResponseMetaAggInterval = "ONE_HOUR"` - `const AIBotTimeseriesGroupsResponseMetaAggIntervalOneDay AIBotTimeseriesGroupsResponseMetaAggInterval = "ONE_DAY"` - `const AIBotTimeseriesGroupsResponseMetaAggIntervalOneWeek AIBotTimeseriesGroupsResponseMetaAggInterval = "ONE_WEEK"` - `const AIBotTimeseriesGroupsResponseMetaAggIntervalOneMonth AIBotTimeseriesGroupsResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AIBotTimeseriesGroupsResponseMetaConfidenceInfo` - `Annotations []AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotation` - `DataSource AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCT AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIBotTimeseriesGroupsResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIBotTimeseriesGroupsResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIBotTimeseriesGroupsResponseMetaNormalizationPercentage AIBotTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE"` - `const AIBotTimeseriesGroupsResponseMetaNormalizationMin0Max AIBotTimeseriesGroupsResponseMetaNormalization = "MIN0_MAX"` - `const AIBotTimeseriesGroupsResponseMetaNormalizationMinMax AIBotTimeseriesGroupsResponseMetaNormalization = "MIN_MAX"` - `const AIBotTimeseriesGroupsResponseMetaNormalizationRawValues AIBotTimeseriesGroupsResponseMetaNormalization = "RAW_VALUES"` - `const AIBotTimeseriesGroupsResponseMetaNormalizationPercentageChange AIBotTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIBotTimeseriesGroupsResponseMetaNormalizationRollingAverage AIBotTimeseriesGroupsResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIBotTimeseriesGroupsResponseMetaNormalizationOverlappedPercentage AIBotTimeseriesGroupsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIBotTimeseriesGroupsResponseMetaNormalizationRatio AIBotTimeseriesGroupsResponseMetaNormalization = "RATIO"` - `Units []AIBotTimeseriesGroupsResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AIBotTimeseriesGroupsResponseSerie0` - `Timestamps []Time` ### 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.AI.Bots.TimeseriesGroups( context.TODO(), radar.AIBotTimeseriesGroupsParamsDimensionUserAgent, radar.AIBotTimeseriesGroupsParams{ }, ) 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", "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 } ``` # Summary ## Get AI user agents summary `client.Radar.AI.Bots.Summary.UserAgent(ctx, query) (*AIBotSummaryUserAgentResponse, error)` **get** `/radar/ai/bots/summary/user_agent` Retrieves the distribution of traffic by AI user agent. ### Parameters - `query AIBotSummaryUserAgentParams` - `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. - `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). 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIBotSummaryUserAgentParamsFormat]` Format in which results will be returned. - `const AIBotSummaryUserAgentParamsFormatJson AIBotSummaryUserAgentParamsFormat = "JSON"` - `const AIBotSummaryUserAgentParamsFormatCsv AIBotSummaryUserAgentParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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 AIBotSummaryUserAgentResponse struct{…}` - `Meta AIBotSummaryUserAgentResponseMeta` Metadata for the results. - `ConfidenceInfo AIBotSummaryUserAgentResponseMetaConfidenceInfo` - `Annotations []AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotation` - `DataSource AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceCT AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIBotSummaryUserAgentResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIBotSummaryUserAgentResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIBotSummaryUserAgentResponseMetaNormalizationPercentage AIBotSummaryUserAgentResponseMetaNormalization = "PERCENTAGE"` - `const AIBotSummaryUserAgentResponseMetaNormalizationMin0Max AIBotSummaryUserAgentResponseMetaNormalization = "MIN0_MAX"` - `const AIBotSummaryUserAgentResponseMetaNormalizationMinMax AIBotSummaryUserAgentResponseMetaNormalization = "MIN_MAX"` - `const AIBotSummaryUserAgentResponseMetaNormalizationRawValues AIBotSummaryUserAgentResponseMetaNormalization = "RAW_VALUES"` - `const AIBotSummaryUserAgentResponseMetaNormalizationPercentageChange AIBotSummaryUserAgentResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIBotSummaryUserAgentResponseMetaNormalizationRollingAverage AIBotSummaryUserAgentResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIBotSummaryUserAgentResponseMetaNormalizationOverlappedPercentage AIBotSummaryUserAgentResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIBotSummaryUserAgentResponseMetaNormalizationRatio AIBotSummaryUserAgentResponseMetaNormalization = "RATIO"` - `Units []AIBotSummaryUserAgentResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, 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.AI.Bots.Summary.UserAgent(context.TODO(), radar.AIBotSummaryUserAgentParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "Amazonbot": "10.274394", "Bytespider": "8.381743", "facebookexternalhit": "63.40249" } }, "success": true } ``` # Timeseries Groups ## Get AI user agents time series `client.Radar.AI.TimeseriesGroups.UserAgent(ctx, query) (*AITimeseriesGroupUserAgentResponse, error)` **get** `/radar/ai/bots/timeseries_groups/user_agent` Retrieves the distribution of traffic by AI user agent over time. ### Parameters - `query AITimeseriesGroupUserAgentParams` - `AggInterval param.Field[AITimeseriesGroupUserAgentParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/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 AITimeseriesGroupUserAgentParamsAggInterval15m AITimeseriesGroupUserAgentParamsAggInterval = "15m"` - `const AITimeseriesGroupUserAgentParamsAggInterval1h AITimeseriesGroupUserAgentParamsAggInterval = "1h"` - `const AITimeseriesGroupUserAgentParamsAggInterval1d AITimeseriesGroupUserAgentParamsAggInterval = "1d"` - `const AITimeseriesGroupUserAgentParamsAggInterval1w AITimeseriesGroupUserAgentParamsAggInterval = "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. - `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). 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AITimeseriesGroupUserAgentParamsFormat]` Format in which results will be returned. - `const AITimeseriesGroupUserAgentParamsFormatJson AITimeseriesGroupUserAgentParamsFormat = "JSON"` - `const AITimeseriesGroupUserAgentParamsFormatCsv AITimeseriesGroupUserAgentParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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 AITimeseriesGroupUserAgentResponse struct{…}` - `Meta AITimeseriesGroupUserAgentResponseMeta` Metadata for the results. - `AggInterval AITimeseriesGroupUserAgentResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/aggregation-intervals/). - `const AITimeseriesGroupUserAgentResponseMetaAggIntervalFifteenMinutes AITimeseriesGroupUserAgentResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AITimeseriesGroupUserAgentResponseMetaAggIntervalOneHour AITimeseriesGroupUserAgentResponseMetaAggInterval = "ONE_HOUR"` - `const AITimeseriesGroupUserAgentResponseMetaAggIntervalOneDay AITimeseriesGroupUserAgentResponseMetaAggInterval = "ONE_DAY"` - `const AITimeseriesGroupUserAgentResponseMetaAggIntervalOneWeek AITimeseriesGroupUserAgentResponseMetaAggInterval = "ONE_WEEK"` - `const AITimeseriesGroupUserAgentResponseMetaAggIntervalOneMonth AITimeseriesGroupUserAgentResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AITimeseriesGroupUserAgentResponseMetaConfidenceInfo` - `Annotations []AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotation` - `DataSource AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAll AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBGP AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBots AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceCT AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNS AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDos AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFw AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceIQI AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceNet AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeEvent AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeOutage AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePipeline AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AITimeseriesGroupUserAgentResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AITimeseriesGroupUserAgentResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AITimeseriesGroupUserAgentResponseMetaNormalizationPercentage AITimeseriesGroupUserAgentResponseMetaNormalization = "PERCENTAGE"` - `const AITimeseriesGroupUserAgentResponseMetaNormalizationMin0Max AITimeseriesGroupUserAgentResponseMetaNormalization = "MIN0_MAX"` - `const AITimeseriesGroupUserAgentResponseMetaNormalizationMinMax AITimeseriesGroupUserAgentResponseMetaNormalization = "MIN_MAX"` - `const AITimeseriesGroupUserAgentResponseMetaNormalizationRawValues AITimeseriesGroupUserAgentResponseMetaNormalization = "RAW_VALUES"` - `const AITimeseriesGroupUserAgentResponseMetaNormalizationPercentageChange AITimeseriesGroupUserAgentResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AITimeseriesGroupUserAgentResponseMetaNormalizationRollingAverage AITimeseriesGroupUserAgentResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AITimeseriesGroupUserAgentResponseMetaNormalizationOverlappedPercentage AITimeseriesGroupUserAgentResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AITimeseriesGroupUserAgentResponseMetaNormalizationRatio AITimeseriesGroupUserAgentResponseMetaNormalization = "RATIO"` - `Units []AITimeseriesGroupUserAgentResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AITimeseriesGroupUserAgentResponseSerie0` - `Timestamps []Time` ### 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.AI.TimeseriesGroups.UserAgent(context.TODO(), radar.AITimeseriesGroupUserAgentParams{ }) 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", "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 } ``` ## Get AI bots HTTP requests distribution by dimension `client.Radar.AI.TimeseriesGroups.Summary(ctx, dimension, query) (*AITimeseriesGroupSummaryResponse, error)` **get** `/radar/ai/bots/summary/{dimension}` Retrieves an aggregated summary of AI bots HTTP requests grouped by the specified dimension. ### Parameters - `dimension AITimeseriesGroupSummaryParamsDimension` Specifies the attribute by which to group the results. - `const AITimeseriesGroupSummaryParamsDimensionUserAgent AITimeseriesGroupSummaryParamsDimension = "USER_AGENT"` - `const AITimeseriesGroupSummaryParamsDimensionCrawlPurpose AITimeseriesGroupSummaryParamsDimension = "CRAWL_PURPOSE"` - `const AITimeseriesGroupSummaryParamsDimensionIndustry AITimeseriesGroupSummaryParamsDimension = "INDUSTRY"` - `const AITimeseriesGroupSummaryParamsDimensionVertical AITimeseriesGroupSummaryParamsDimension = "VERTICAL"` - `const AITimeseriesGroupSummaryParamsDimensionContentType AITimeseriesGroupSummaryParamsDimension = "CONTENT_TYPE"` - `const AITimeseriesGroupSummaryParamsDimensionResponseStatus AITimeseriesGroupSummaryParamsDimension = "RESPONSE_STATUS"` - `const AITimeseriesGroupSummaryParamsDimensionResponseStatusCategory AITimeseriesGroupSummaryParamsDimension = "RESPONSE_STATUS_CATEGORY"` - `query AITimeseriesGroupSummaryParams` - `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. - `ContentType param.Field[[]AITimeseriesGroupSummaryParamsContentType]` Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System. - `const AITimeseriesGroupSummaryParamsContentTypeHTML AITimeseriesGroupSummaryParamsContentType = "HTML"` - `const AITimeseriesGroupSummaryParamsContentTypeImages AITimeseriesGroupSummaryParamsContentType = "IMAGES"` - `const AITimeseriesGroupSummaryParamsContentTypeJson AITimeseriesGroupSummaryParamsContentType = "JSON"` - `const AITimeseriesGroupSummaryParamsContentTypeJavascript AITimeseriesGroupSummaryParamsContentType = "JAVASCRIPT"` - `const AITimeseriesGroupSummaryParamsContentTypeCSS AITimeseriesGroupSummaryParamsContentType = "CSS"` - `const AITimeseriesGroupSummaryParamsContentTypePlainText AITimeseriesGroupSummaryParamsContentType = "PLAIN_TEXT"` - `const AITimeseriesGroupSummaryParamsContentTypeFonts AITimeseriesGroupSummaryParamsContentType = "FONTS"` - `const AITimeseriesGroupSummaryParamsContentTypeXml AITimeseriesGroupSummaryParamsContentType = "XML"` - `const AITimeseriesGroupSummaryParamsContentTypeYaml AITimeseriesGroupSummaryParamsContentType = "YAML"` - `const AITimeseriesGroupSummaryParamsContentTypeVideo AITimeseriesGroupSummaryParamsContentType = "VIDEO"` - `const AITimeseriesGroupSummaryParamsContentTypeAudio AITimeseriesGroupSummaryParamsContentType = "AUDIO"` - `const AITimeseriesGroupSummaryParamsContentTypeMarkdown AITimeseriesGroupSummaryParamsContentType = "MARKDOWN"` - `const AITimeseriesGroupSummaryParamsContentTypeDocuments AITimeseriesGroupSummaryParamsContentType = "DOCUMENTS"` - `const AITimeseriesGroupSummaryParamsContentTypeBinary AITimeseriesGroupSummaryParamsContentType = "BINARY"` - `const AITimeseriesGroupSummaryParamsContentTypeSerialization AITimeseriesGroupSummaryParamsContentType = "SERIALIZATION"` - `const AITimeseriesGroupSummaryParamsContentTypeOther AITimeseriesGroupSummaryParamsContentType = "OTHER"` - `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. - `CrawlPurpose param.Field[[]string]` Filters results by bot crawl purpose. - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AITimeseriesGroupSummaryParamsFormat]` Format in which results will be returned. - `const AITimeseriesGroupSummaryParamsFormatJson AITimeseriesGroupSummaryParamsFormat = "JSON"` - `const AITimeseriesGroupSummaryParamsFormatCsv AITimeseriesGroupSummaryParamsFormat = "CSV"` - `Industry param.Field[[]string]` Filters results by industry. - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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. - `ResponseStatus param.Field[[]string]` Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted. - `ResponseStatusCategory param.Field[[]AITimeseriesGroupSummaryParamsResponseStatusCategory]` Filters results by HTTP response status code category. - `const AITimeseriesGroupSummaryParamsResponseStatusCategoryInformational AITimeseriesGroupSummaryParamsResponseStatusCategory = "INFORMATIONAL"` - `const AITimeseriesGroupSummaryParamsResponseStatusCategorySuccess AITimeseriesGroupSummaryParamsResponseStatusCategory = "SUCCESS"` - `const AITimeseriesGroupSummaryParamsResponseStatusCategoryRedirection AITimeseriesGroupSummaryParamsResponseStatusCategory = "REDIRECTION"` - `const AITimeseriesGroupSummaryParamsResponseStatusCategoryClientError AITimeseriesGroupSummaryParamsResponseStatusCategory = "CLIENT_ERROR"` - `const AITimeseriesGroupSummaryParamsResponseStatusCategoryServerError AITimeseriesGroupSummaryParamsResponseStatusCategory = "SERVER_ERROR"` - `UserAgent param.Field[[]string]` Filters results by user agent. - `Vertical param.Field[[]string]` Filters results by vertical. ### Returns - `type AITimeseriesGroupSummaryResponse struct{…}` - `Meta AITimeseriesGroupSummaryResponseMeta` Metadata for the results. - `ConfidenceInfo AITimeseriesGroupSummaryResponseMetaConfidenceInfo` - `Annotations []AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotation` - `DataSource AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCT AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AITimeseriesGroupSummaryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AITimeseriesGroupSummaryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AITimeseriesGroupSummaryResponseMetaNormalizationPercentage AITimeseriesGroupSummaryResponseMetaNormalization = "PERCENTAGE"` - `const AITimeseriesGroupSummaryResponseMetaNormalizationMin0Max AITimeseriesGroupSummaryResponseMetaNormalization = "MIN0_MAX"` - `const AITimeseriesGroupSummaryResponseMetaNormalizationMinMax AITimeseriesGroupSummaryResponseMetaNormalization = "MIN_MAX"` - `const AITimeseriesGroupSummaryResponseMetaNormalizationRawValues AITimeseriesGroupSummaryResponseMetaNormalization = "RAW_VALUES"` - `const AITimeseriesGroupSummaryResponseMetaNormalizationPercentageChange AITimeseriesGroupSummaryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AITimeseriesGroupSummaryResponseMetaNormalizationRollingAverage AITimeseriesGroupSummaryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AITimeseriesGroupSummaryResponseMetaNormalizationOverlappedPercentage AITimeseriesGroupSummaryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AITimeseriesGroupSummaryResponseMetaNormalizationRatio AITimeseriesGroupSummaryResponseMetaNormalization = "RATIO"` - `Units []AITimeseriesGroupSummaryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, 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.AI.TimeseriesGroups.Summary( context.TODO(), radar.AITimeseriesGroupSummaryParamsDimensionUserAgent, radar.AITimeseriesGroupSummaryParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "Amazonbot": "10.274394", "Bytespider": "8.381743", "facebookexternalhit": "63.40249" } }, "success": true } ``` ## Get AI bots HTTP requests time series `client.Radar.AI.TimeseriesGroups.Timeseries(ctx, query) (*AITimeseriesGroupTimeseriesResponse, error)` **get** `/radar/ai/bots/timeseries` Retrieves AI bots HTTP request volume over time. ### Parameters - `query AITimeseriesGroupTimeseriesParams` - `AggInterval param.Field[AITimeseriesGroupTimeseriesParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/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 AITimeseriesGroupTimeseriesParamsAggInterval15m AITimeseriesGroupTimeseriesParamsAggInterval = "15m"` - `const AITimeseriesGroupTimeseriesParamsAggInterval1h AITimeseriesGroupTimeseriesParamsAggInterval = "1h"` - `const AITimeseriesGroupTimeseriesParamsAggInterval1d AITimeseriesGroupTimeseriesParamsAggInterval = "1d"` - `const AITimeseriesGroupTimeseriesParamsAggInterval1w AITimeseriesGroupTimeseriesParamsAggInterval = "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. - `ContentType param.Field[[]AITimeseriesGroupTimeseriesParamsContentType]` Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System. - `const AITimeseriesGroupTimeseriesParamsContentTypeHTML AITimeseriesGroupTimeseriesParamsContentType = "HTML"` - `const AITimeseriesGroupTimeseriesParamsContentTypeImages AITimeseriesGroupTimeseriesParamsContentType = "IMAGES"` - `const AITimeseriesGroupTimeseriesParamsContentTypeJson AITimeseriesGroupTimeseriesParamsContentType = "JSON"` - `const AITimeseriesGroupTimeseriesParamsContentTypeJavascript AITimeseriesGroupTimeseriesParamsContentType = "JAVASCRIPT"` - `const AITimeseriesGroupTimeseriesParamsContentTypeCSS AITimeseriesGroupTimeseriesParamsContentType = "CSS"` - `const AITimeseriesGroupTimeseriesParamsContentTypePlainText AITimeseriesGroupTimeseriesParamsContentType = "PLAIN_TEXT"` - `const AITimeseriesGroupTimeseriesParamsContentTypeFonts AITimeseriesGroupTimeseriesParamsContentType = "FONTS"` - `const AITimeseriesGroupTimeseriesParamsContentTypeXml AITimeseriesGroupTimeseriesParamsContentType = "XML"` - `const AITimeseriesGroupTimeseriesParamsContentTypeYaml AITimeseriesGroupTimeseriesParamsContentType = "YAML"` - `const AITimeseriesGroupTimeseriesParamsContentTypeVideo AITimeseriesGroupTimeseriesParamsContentType = "VIDEO"` - `const AITimeseriesGroupTimeseriesParamsContentTypeAudio AITimeseriesGroupTimeseriesParamsContentType = "AUDIO"` - `const AITimeseriesGroupTimeseriesParamsContentTypeMarkdown AITimeseriesGroupTimeseriesParamsContentType = "MARKDOWN"` - `const AITimeseriesGroupTimeseriesParamsContentTypeDocuments AITimeseriesGroupTimeseriesParamsContentType = "DOCUMENTS"` - `const AITimeseriesGroupTimeseriesParamsContentTypeBinary AITimeseriesGroupTimeseriesParamsContentType = "BINARY"` - `const AITimeseriesGroupTimeseriesParamsContentTypeSerialization AITimeseriesGroupTimeseriesParamsContentType = "SERIALIZATION"` - `const AITimeseriesGroupTimeseriesParamsContentTypeOther AITimeseriesGroupTimeseriesParamsContentType = "OTHER"` - `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. - `CrawlPurpose param.Field[[]string]` Filters results by bot crawl purpose. - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AITimeseriesGroupTimeseriesParamsFormat]` Format in which results will be returned. - `const AITimeseriesGroupTimeseriesParamsFormatJson AITimeseriesGroupTimeseriesParamsFormat = "JSON"` - `const AITimeseriesGroupTimeseriesParamsFormatCsv AITimeseriesGroupTimeseriesParamsFormat = "CSV"` - `Industry param.Field[[]string]` Filters results by industry. - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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. - `ResponseStatus param.Field[[]string]` Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted. - `ResponseStatusCategory param.Field[[]AITimeseriesGroupTimeseriesParamsResponseStatusCategory]` Filters results by HTTP response status code category. - `const AITimeseriesGroupTimeseriesParamsResponseStatusCategoryInformational AITimeseriesGroupTimeseriesParamsResponseStatusCategory = "INFORMATIONAL"` - `const AITimeseriesGroupTimeseriesParamsResponseStatusCategorySuccess AITimeseriesGroupTimeseriesParamsResponseStatusCategory = "SUCCESS"` - `const AITimeseriesGroupTimeseriesParamsResponseStatusCategoryRedirection AITimeseriesGroupTimeseriesParamsResponseStatusCategory = "REDIRECTION"` - `const AITimeseriesGroupTimeseriesParamsResponseStatusCategoryClientError AITimeseriesGroupTimeseriesParamsResponseStatusCategory = "CLIENT_ERROR"` - `const AITimeseriesGroupTimeseriesParamsResponseStatusCategoryServerError AITimeseriesGroupTimeseriesParamsResponseStatusCategory = "SERVER_ERROR"` - `UserAgent param.Field[[]string]` Filters results by user agent. - `Vertical param.Field[[]string]` Filters results by vertical. ### Returns - `type AITimeseriesGroupTimeseriesResponse struct{…}` - `Meta AITimeseriesGroupTimeseriesResponseMeta` Metadata for the results. - `AggInterval AITimeseriesGroupTimeseriesResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/aggregation-intervals/). - `const AITimeseriesGroupTimeseriesResponseMetaAggIntervalFifteenMinutes AITimeseriesGroupTimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AITimeseriesGroupTimeseriesResponseMetaAggIntervalOneHour AITimeseriesGroupTimeseriesResponseMetaAggInterval = "ONE_HOUR"` - `const AITimeseriesGroupTimeseriesResponseMetaAggIntervalOneDay AITimeseriesGroupTimeseriesResponseMetaAggInterval = "ONE_DAY"` - `const AITimeseriesGroupTimeseriesResponseMetaAggIntervalOneWeek AITimeseriesGroupTimeseriesResponseMetaAggInterval = "ONE_WEEK"` - `const AITimeseriesGroupTimeseriesResponseMetaAggIntervalOneMonth AITimeseriesGroupTimeseriesResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AITimeseriesGroupTimeseriesResponseMetaConfidenceInfo` - `Annotations []AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotation` - `DataSource AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AITimeseriesGroupTimeseriesResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AITimeseriesGroupTimeseriesResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AITimeseriesGroupTimeseriesResponseMetaNormalizationPercentage AITimeseriesGroupTimeseriesResponseMetaNormalization = "PERCENTAGE"` - `const AITimeseriesGroupTimeseriesResponseMetaNormalizationMin0Max AITimeseriesGroupTimeseriesResponseMetaNormalization = "MIN0_MAX"` - `const AITimeseriesGroupTimeseriesResponseMetaNormalizationMinMax AITimeseriesGroupTimeseriesResponseMetaNormalization = "MIN_MAX"` - `const AITimeseriesGroupTimeseriesResponseMetaNormalizationRawValues AITimeseriesGroupTimeseriesResponseMetaNormalization = "RAW_VALUES"` - `const AITimeseriesGroupTimeseriesResponseMetaNormalizationPercentageChange AITimeseriesGroupTimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AITimeseriesGroupTimeseriesResponseMetaNormalizationRollingAverage AITimeseriesGroupTimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AITimeseriesGroupTimeseriesResponseMetaNormalizationOverlappedPercentage AITimeseriesGroupTimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AITimeseriesGroupTimeseriesResponseMetaNormalizationRatio AITimeseriesGroupTimeseriesResponseMetaNormalization = "RATIO"` - `Units []AITimeseriesGroupTimeseriesResponseMetaUnit` 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.AI.TimeseriesGroups.Timeseries(context.TODO(), radar.AITimeseriesGroupTimeseriesParams{ }) 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", "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" } ] } }, "success": true } ``` ## Get time series distribution of AI bots HTTP requests by dimension. `client.Radar.AI.TimeseriesGroups.TimeseriesGroups(ctx, dimension, query) (*AITimeseriesGroupTimeseriesGroupsResponse, error)` **get** `/radar/ai/bots/timeseries_groups/{dimension}` Retrieves the distribution of HTTP requests from AI bots, grouped by the specified dimension over time. ### Parameters - `dimension AITimeseriesGroupTimeseriesGroupsParamsDimension` Specifies the attribute by which to group the results. - `const AITimeseriesGroupTimeseriesGroupsParamsDimensionUserAgent AITimeseriesGroupTimeseriesGroupsParamsDimension = "USER_AGENT"` - `const AITimeseriesGroupTimeseriesGroupsParamsDimensionCrawlPurpose AITimeseriesGroupTimeseriesGroupsParamsDimension = "CRAWL_PURPOSE"` - `const AITimeseriesGroupTimeseriesGroupsParamsDimensionIndustry AITimeseriesGroupTimeseriesGroupsParamsDimension = "INDUSTRY"` - `const AITimeseriesGroupTimeseriesGroupsParamsDimensionVertical AITimeseriesGroupTimeseriesGroupsParamsDimension = "VERTICAL"` - `const AITimeseriesGroupTimeseriesGroupsParamsDimensionContentType AITimeseriesGroupTimeseriesGroupsParamsDimension = "CONTENT_TYPE"` - `const AITimeseriesGroupTimeseriesGroupsParamsDimensionResponseStatus AITimeseriesGroupTimeseriesGroupsParamsDimension = "RESPONSE_STATUS"` - `const AITimeseriesGroupTimeseriesGroupsParamsDimensionResponseStatusCategory AITimeseriesGroupTimeseriesGroupsParamsDimension = "RESPONSE_STATUS_CATEGORY"` - `query AITimeseriesGroupTimeseriesGroupsParams` - `AggInterval param.Field[AITimeseriesGroupTimeseriesGroupsParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/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 AITimeseriesGroupTimeseriesGroupsParamsAggInterval15m AITimeseriesGroupTimeseriesGroupsParamsAggInterval = "15m"` - `const AITimeseriesGroupTimeseriesGroupsParamsAggInterval1h AITimeseriesGroupTimeseriesGroupsParamsAggInterval = "1h"` - `const AITimeseriesGroupTimeseriesGroupsParamsAggInterval1d AITimeseriesGroupTimeseriesGroupsParamsAggInterval = "1d"` - `const AITimeseriesGroupTimeseriesGroupsParamsAggInterval1w AITimeseriesGroupTimeseriesGroupsParamsAggInterval = "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. - `ContentType param.Field[[]AITimeseriesGroupTimeseriesGroupsParamsContentType]` Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System. - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeHTML AITimeseriesGroupTimeseriesGroupsParamsContentType = "HTML"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeImages AITimeseriesGroupTimeseriesGroupsParamsContentType = "IMAGES"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeJson AITimeseriesGroupTimeseriesGroupsParamsContentType = "JSON"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeJavascript AITimeseriesGroupTimeseriesGroupsParamsContentType = "JAVASCRIPT"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeCSS AITimeseriesGroupTimeseriesGroupsParamsContentType = "CSS"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypePlainText AITimeseriesGroupTimeseriesGroupsParamsContentType = "PLAIN_TEXT"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeFonts AITimeseriesGroupTimeseriesGroupsParamsContentType = "FONTS"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeXml AITimeseriesGroupTimeseriesGroupsParamsContentType = "XML"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeYaml AITimeseriesGroupTimeseriesGroupsParamsContentType = "YAML"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeVideo AITimeseriesGroupTimeseriesGroupsParamsContentType = "VIDEO"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeAudio AITimeseriesGroupTimeseriesGroupsParamsContentType = "AUDIO"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeMarkdown AITimeseriesGroupTimeseriesGroupsParamsContentType = "MARKDOWN"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeDocuments AITimeseriesGroupTimeseriesGroupsParamsContentType = "DOCUMENTS"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeBinary AITimeseriesGroupTimeseriesGroupsParamsContentType = "BINARY"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeSerialization AITimeseriesGroupTimeseriesGroupsParamsContentType = "SERIALIZATION"` - `const AITimeseriesGroupTimeseriesGroupsParamsContentTypeOther AITimeseriesGroupTimeseriesGroupsParamsContentType = "OTHER"` - `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. - `CrawlPurpose param.Field[[]string]` Filters results by bot crawl purpose. - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AITimeseriesGroupTimeseriesGroupsParamsFormat]` Format in which results will be returned. - `const AITimeseriesGroupTimeseriesGroupsParamsFormatJson AITimeseriesGroupTimeseriesGroupsParamsFormat = "JSON"` - `const AITimeseriesGroupTimeseriesGroupsParamsFormatCsv AITimeseriesGroupTimeseriesGroupsParamsFormat = "CSV"` - `Industry param.Field[[]string]` Filters results by industry. - `LimitPerGroup param.Field[int64]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `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. - `Normalization param.Field[AITimeseriesGroupTimeseriesGroupsParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range). - `const AITimeseriesGroupTimeseriesGroupsParamsNormalizationPercentage AITimeseriesGroupTimeseriesGroupsParamsNormalization = "PERCENTAGE"` - `const AITimeseriesGroupTimeseriesGroupsParamsNormalizationMin0Max AITimeseriesGroupTimeseriesGroupsParamsNormalization = "MIN0_MAX"` - `const AITimeseriesGroupTimeseriesGroupsParamsNormalizationPercentageChange AITimeseriesGroupTimeseriesGroupsParamsNormalization = "PERCENTAGE_CHANGE"` - `ResponseStatus param.Field[[]string]` Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted. - `ResponseStatusCategory param.Field[[]AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategory]` Filters results by HTTP response status code category. - `const AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategoryInformational AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategory = "INFORMATIONAL"` - `const AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategorySuccess AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategory = "SUCCESS"` - `const AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategoryRedirection AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategory = "REDIRECTION"` - `const AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategoryClientError AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategory = "CLIENT_ERROR"` - `const AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategoryServerError AITimeseriesGroupTimeseriesGroupsParamsResponseStatusCategory = "SERVER_ERROR"` - `UserAgent param.Field[[]string]` Filters results by user agent. - `Vertical param.Field[[]string]` Filters results by vertical. ### Returns - `type AITimeseriesGroupTimeseriesGroupsResponse struct{…}` - `Meta AITimeseriesGroupTimeseriesGroupsResponseMeta` Metadata for the results. - `AggInterval AITimeseriesGroupTimeseriesGroupsResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/aggregation-intervals/). - `const AITimeseriesGroupTimeseriesGroupsResponseMetaAggIntervalFifteenMinutes AITimeseriesGroupTimeseriesGroupsResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaAggIntervalOneHour AITimeseriesGroupTimeseriesGroupsResponseMetaAggInterval = "ONE_HOUR"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaAggIntervalOneDay AITimeseriesGroupTimeseriesGroupsResponseMetaAggInterval = "ONE_DAY"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaAggIntervalOneWeek AITimeseriesGroupTimeseriesGroupsResponseMetaAggInterval = "ONE_WEEK"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaAggIntervalOneMonth AITimeseriesGroupTimeseriesGroupsResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfo` - `Annotations []AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotation` - `DataSource AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCT AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AITimeseriesGroupTimeseriesGroupsResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AITimeseriesGroupTimeseriesGroupsResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AITimeseriesGroupTimeseriesGroupsResponseMetaNormalizationPercentage AITimeseriesGroupTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaNormalizationMin0Max AITimeseriesGroupTimeseriesGroupsResponseMetaNormalization = "MIN0_MAX"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaNormalizationMinMax AITimeseriesGroupTimeseriesGroupsResponseMetaNormalization = "MIN_MAX"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaNormalizationRawValues AITimeseriesGroupTimeseriesGroupsResponseMetaNormalization = "RAW_VALUES"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaNormalizationPercentageChange AITimeseriesGroupTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaNormalizationRollingAverage AITimeseriesGroupTimeseriesGroupsResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaNormalizationOverlappedPercentage AITimeseriesGroupTimeseriesGroupsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AITimeseriesGroupTimeseriesGroupsResponseMetaNormalizationRatio AITimeseriesGroupTimeseriesGroupsResponseMetaNormalization = "RATIO"` - `Units []AITimeseriesGroupTimeseriesGroupsResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AITimeseriesGroupTimeseriesGroupsResponseSerie0` - `Timestamps []Time` ### 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.AI.TimeseriesGroups.TimeseriesGroups( context.TODO(), radar.AITimeseriesGroupTimeseriesGroupsParamsDimensionUserAgent, radar.AITimeseriesGroupTimeseriesGroupsParams{ }, ) 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", "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 } ``` # Markdown For Agents ## Get AI markdown for agents reduction ratio summary `client.Radar.AI.MarkdownForAgents.Summary(ctx, query) (*AIMarkdownForAgentSummaryResponse, error)` **get** `/radar/ai/markdown_for_agents/summary` Retrieves the overall median HTML-to-markdown reduction ratio for AI agent requests over the given date range. ### Parameters - `query AIMarkdownForAgentSummaryParams` - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIMarkdownForAgentSummaryParamsFormat]` Format in which results will be returned. - `const AIMarkdownForAgentSummaryParamsFormatJson AIMarkdownForAgentSummaryParamsFormat = "JSON"` - `const AIMarkdownForAgentSummaryParamsFormatCsv AIMarkdownForAgentSummaryParamsFormat = "CSV"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AIMarkdownForAgentSummaryResponse struct{…}` - `Meta AIMarkdownForAgentSummaryResponseMeta` Metadata for the results. - `ConfidenceInfo AIMarkdownForAgentSummaryResponseMetaConfidenceInfo` - `Annotations []AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotation` - `DataSource AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCT AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIMarkdownForAgentSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIMarkdownForAgentSummaryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIMarkdownForAgentSummaryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIMarkdownForAgentSummaryResponseMetaNormalizationPercentage AIMarkdownForAgentSummaryResponseMetaNormalization = "PERCENTAGE"` - `const AIMarkdownForAgentSummaryResponseMetaNormalizationMin0Max AIMarkdownForAgentSummaryResponseMetaNormalization = "MIN0_MAX"` - `const AIMarkdownForAgentSummaryResponseMetaNormalizationMinMax AIMarkdownForAgentSummaryResponseMetaNormalization = "MIN_MAX"` - `const AIMarkdownForAgentSummaryResponseMetaNormalizationRawValues AIMarkdownForAgentSummaryResponseMetaNormalization = "RAW_VALUES"` - `const AIMarkdownForAgentSummaryResponseMetaNormalizationPercentageChange AIMarkdownForAgentSummaryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIMarkdownForAgentSummaryResponseMetaNormalizationRollingAverage AIMarkdownForAgentSummaryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIMarkdownForAgentSummaryResponseMetaNormalizationOverlappedPercentage AIMarkdownForAgentSummaryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIMarkdownForAgentSummaryResponseMetaNormalizationRatio AIMarkdownForAgentSummaryResponseMetaNormalization = "RATIO"` - `Units []AIMarkdownForAgentSummaryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 AIMarkdownForAgentSummaryResponseSummary0` - `Value string` A numeric string that can include decimals and infinity values. ### 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.AI.MarkdownForAgents.Summary(context.TODO(), radar.AIMarkdownForAgentSummaryParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "value": "10.6" } }, "success": true } ``` ## Get AI markdown for agents reduction ratio time series `client.Radar.AI.MarkdownForAgents.Timeseries(ctx, query) (*AIMarkdownForAgentTimeseriesResponse, error)` **get** `/radar/ai/markdown_for_agents/timeseries` Retrieves the median HTML-to-markdown reduction ratio over time for AI agent requests. ### Parameters - `query AIMarkdownForAgentTimeseriesParams` - `AggInterval param.Field[AIMarkdownForAgentTimeseriesParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/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 AIMarkdownForAgentTimeseriesParamsAggInterval15m AIMarkdownForAgentTimeseriesParamsAggInterval = "15m"` - `const AIMarkdownForAgentTimeseriesParamsAggInterval1h AIMarkdownForAgentTimeseriesParamsAggInterval = "1h"` - `const AIMarkdownForAgentTimeseriesParamsAggInterval1d AIMarkdownForAgentTimeseriesParamsAggInterval = "1d"` - `const AIMarkdownForAgentTimeseriesParamsAggInterval1w AIMarkdownForAgentTimeseriesParamsAggInterval = "1w"` - `DateEnd param.Field[[]Time]` 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]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `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]` 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. - `Format param.Field[AIMarkdownForAgentTimeseriesParamsFormat]` Format in which results will be returned. - `const AIMarkdownForAgentTimeseriesParamsFormatJson AIMarkdownForAgentTimeseriesParamsFormat = "JSON"` - `const AIMarkdownForAgentTimeseriesParamsFormatCsv AIMarkdownForAgentTimeseriesParamsFormat = "CSV"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AIMarkdownForAgentTimeseriesResponse struct{…}` - `Meta AIMarkdownForAgentTimeseriesResponseMeta` Metadata for the results. - `AggInterval AIMarkdownForAgentTimeseriesResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://edgetunnel-b2h.pages.dev/radar/concepts/aggregation-intervals/). - `const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalFifteenMinutes AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalOneHour AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "ONE_HOUR"` - `const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalOneDay AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "ONE_DAY"` - `const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalOneWeek AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "ONE_WEEK"` - `const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalOneMonth AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfo` - `Annotations []AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotation` - `DataSource AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Tags []string` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AIMarkdownForAgentTimeseriesResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AIMarkdownForAgentTimeseriesResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const AIMarkdownForAgentTimeseriesResponseMetaNormalizationPercentage AIMarkdownForAgentTimeseriesResponseMetaNormalization = "PERCENTAGE"` - `const AIMarkdownForAgentTimeseriesResponseMetaNormalizationMin0Max AIMarkdownForAgentTimeseriesResponseMetaNormalization = "MIN0_MAX"` - `const AIMarkdownForAgentTimeseriesResponseMetaNormalizationMinMax AIMarkdownForAgentTimeseriesResponseMetaNormalization = "MIN_MAX"` - `const AIMarkdownForAgentTimeseriesResponseMetaNormalizationRawValues AIMarkdownForAgentTimeseriesResponseMetaNormalization = "RAW_VALUES"` - `const AIMarkdownForAgentTimeseriesResponseMetaNormalizationPercentageChange AIMarkdownForAgentTimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AIMarkdownForAgentTimeseriesResponseMetaNormalizationRollingAverage AIMarkdownForAgentTimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AIMarkdownForAgentTimeseriesResponseMetaNormalizationOverlappedPercentage AIMarkdownForAgentTimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AIMarkdownForAgentTimeseriesResponseMetaNormalizationRatio AIMarkdownForAgentTimeseriesResponseMetaNormalization = "RATIO"` - `Units []AIMarkdownForAgentTimeseriesResponseMetaUnit` 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.AI.MarkdownForAgents.Timeseries(context.TODO(), radar.AIMarkdownForAgentTimeseriesParams{ }) 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", "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" } ] } }, "success": true } ```