## Get HTTP authentication requests distribution by dimension `client.Radar.LeakedCredentials.SummaryV2(ctx, dimension, query) (*LeakedCredentialSummaryV2Response, error)` **get** `/radar/leaked_credential_checks/summary/{dimension}` Retrieves an aggregated summary of HTTP authentication requests grouped by the specified dimension. ### Parameters - `dimension LeakedCredentialSummaryV2ParamsDimension` Specifies the attribute by which to group the results. - `const LeakedCredentialSummaryV2ParamsDimensionCompromised LeakedCredentialSummaryV2ParamsDimension = "COMPROMISED"` - `const LeakedCredentialSummaryV2ParamsDimensionBotClass LeakedCredentialSummaryV2ParamsDimension = "BOT_CLASS"` - `query LeakedCredentialSummaryV2Params` - `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. - `BotClass param.Field[[]LeakedCredentialSummaryV2ParamsBotClass]` Filters results by bot class. Refer to [Bot classes](https://edgetunnel-b2h.pages.dev/radar/concepts/bot-classes/). - `const LeakedCredentialSummaryV2ParamsBotClassLikelyAutomated LeakedCredentialSummaryV2ParamsBotClass = "LIKELY_AUTOMATED"` - `const LeakedCredentialSummaryV2ParamsBotClassLikelyHuman LeakedCredentialSummaryV2ParamsBotClass = "LIKELY_HUMAN"` - `Compromised param.Field[[]LeakedCredentialSummaryV2ParamsCompromised]` Filters results by compromised credential status (clean vs. compromised). - `const LeakedCredentialSummaryV2ParamsCompromisedClean LeakedCredentialSummaryV2ParamsCompromised = "CLEAN"` - `const LeakedCredentialSummaryV2ParamsCompromisedCompromised LeakedCredentialSummaryV2ParamsCompromised = "COMPROMISED"` - `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[LeakedCredentialSummaryV2ParamsFormat]` Format in which results will be returned. - `const LeakedCredentialSummaryV2ParamsFormatJson LeakedCredentialSummaryV2ParamsFormat = "JSON"` - `const LeakedCredentialSummaryV2ParamsFormatCsv LeakedCredentialSummaryV2ParamsFormat = "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 LeakedCredentialSummaryV2Response struct{…}` - `Meta LeakedCredentialSummaryV2ResponseMeta` Metadata for the results. - `ConfidenceInfo LeakedCredentialSummaryV2ResponseMetaConfidenceInfo` - `Annotations []LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotation` - `DataSource LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "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 []LeakedCredentialSummaryV2ResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization LeakedCredentialSummaryV2ResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const LeakedCredentialSummaryV2ResponseMetaNormalizationPercentage LeakedCredentialSummaryV2ResponseMetaNormalization = "PERCENTAGE"` - `const LeakedCredentialSummaryV2ResponseMetaNormalizationMin0Max LeakedCredentialSummaryV2ResponseMetaNormalization = "MIN0_MAX"` - `const LeakedCredentialSummaryV2ResponseMetaNormalizationMinMax LeakedCredentialSummaryV2ResponseMetaNormalization = "MIN_MAX"` - `const LeakedCredentialSummaryV2ResponseMetaNormalizationRawValues LeakedCredentialSummaryV2ResponseMetaNormalization = "RAW_VALUES"` - `const LeakedCredentialSummaryV2ResponseMetaNormalizationPercentageChange LeakedCredentialSummaryV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const LeakedCredentialSummaryV2ResponseMetaNormalizationRollingAverage LeakedCredentialSummaryV2ResponseMetaNormalization = "ROLLING_AVERAGE"` - `const LeakedCredentialSummaryV2ResponseMetaNormalizationOverlappedPercentage LeakedCredentialSummaryV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const LeakedCredentialSummaryV2ResponseMetaNormalizationRatio LeakedCredentialSummaryV2ResponseMetaNormalization = "RATIO"` - `Units []LeakedCredentialSummaryV2ResponseMetaUnit` 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.LeakedCredentials.SummaryV2( context.TODO(), radar.LeakedCredentialSummaryV2ParamsDimensionCompromised, radar.LeakedCredentialSummaryV2Params{ }, ) 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": { "CLEAN": "85.123456", "COMPROMISED": "14.876544" } }, "success": true } ```