## Get domains rank time series `client.Radar.Ranking.TimeseriesGroups(ctx, query) (*RankingTimeseriesGroupsResponse, error)` **get** `/radar/ranking/timeseries_groups` Retrieves domains rank over time. ### Parameters - `query RankingTimeseriesGroupsParams` - `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. - `DomainCategory param.Field[[]string]` Filters results by domain category. - `Domains param.Field[[]string]` Filters results by domain name. Specify a comma-separated list of domain names. - `Format param.Field[RankingTimeseriesGroupsParamsFormat]` Format in which results will be returned. - `const RankingTimeseriesGroupsParamsFormatJson RankingTimeseriesGroupsParamsFormat = "JSON"` - `const RankingTimeseriesGroupsParamsFormatCsv RankingTimeseriesGroupsParamsFormat = "CSV"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` Filters results by location. Specify a comma-separated list of alpha-2 location codes. - `Name param.Field[[]string]` Array of names used to label the series in the response. - `RankingType param.Field[RankingTimeseriesGroupsParamsRankingType]` The ranking type. - `const RankingTimeseriesGroupsParamsRankingTypePopular RankingTimeseriesGroupsParamsRankingType = "POPULAR"` - `const RankingTimeseriesGroupsParamsRankingTypeTrendingRise RankingTimeseriesGroupsParamsRankingType = "TRENDING_RISE"` - `const RankingTimeseriesGroupsParamsRankingTypeTrendingSteady RankingTimeseriesGroupsParamsRankingType = "TRENDING_STEADY"` ### Returns - `type RankingTimeseriesGroupsResponse struct{…}` - `Meta RankingTimeseriesGroupsResponseMeta` Metadata for the results. - `AggInterval RankingTimeseriesGroupsResponseMetaAggInterval` 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 RankingTimeseriesGroupsResponseMetaAggIntervalFifteenMinutes RankingTimeseriesGroupsResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const RankingTimeseriesGroupsResponseMetaAggIntervalOneHour RankingTimeseriesGroupsResponseMetaAggInterval = "ONE_HOUR"` - `const RankingTimeseriesGroupsResponseMetaAggIntervalOneDay RankingTimeseriesGroupsResponseMetaAggInterval = "ONE_DAY"` - `const RankingTimeseriesGroupsResponseMetaAggIntervalOneWeek RankingTimeseriesGroupsResponseMetaAggInterval = "ONE_WEEK"` - `const RankingTimeseriesGroupsResponseMetaAggIntervalOneMonth RankingTimeseriesGroupsResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo RankingTimeseriesGroupsResponseMetaConfidenceInfo` - `Annotations []RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotation` - `DataSource RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCT RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "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 []RankingTimeseriesGroupsResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization RankingTimeseriesGroupsResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `const RankingTimeseriesGroupsResponseMetaNormalizationPercentage RankingTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE"` - `const RankingTimeseriesGroupsResponseMetaNormalizationMin0Max RankingTimeseriesGroupsResponseMetaNormalization = "MIN0_MAX"` - `const RankingTimeseriesGroupsResponseMetaNormalizationMinMax RankingTimeseriesGroupsResponseMetaNormalization = "MIN_MAX"` - `const RankingTimeseriesGroupsResponseMetaNormalizationRawValues RankingTimeseriesGroupsResponseMetaNormalization = "RAW_VALUES"` - `const RankingTimeseriesGroupsResponseMetaNormalizationPercentageChange RankingTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const RankingTimeseriesGroupsResponseMetaNormalizationRollingAverage RankingTimeseriesGroupsResponseMetaNormalization = "ROLLING_AVERAGE"` - `const RankingTimeseriesGroupsResponseMetaNormalizationOverlappedPercentage RankingTimeseriesGroupsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const RankingTimeseriesGroupsResponseMetaNormalizationRatio RankingTimeseriesGroupsResponseMetaNormalization = "RATIO"` - `Units []RankingTimeseriesGroupsResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 RankingTimeseriesGroupsResponseSerie0` - `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.Ranking.TimeseriesGroups(context.TODO(), radar.RankingTimeseriesGroupsParams{ }) 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": [ "2019-12-27T18:11:19.117Z" ] } }, "success": true } ```