Get BGP time series
client.Radar.BGP.Timeseries(ctx, query) (*BGPTimeseriesResponse, error)
GET/radar/bgp/timeseries
Retrieves BGP updates over time. When requesting updates for an autonomous system, only BGP updates of type announcement are returned.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Get BGP time series
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.BGP.Timeseries(context.TODO(), radar.BGPTimeseriesParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Meta)
}
{
"result": {
"meta": {
"aggInterval": "15m",
"confidenceInfo": {
"annotations": [
{
"dataSource": "ALL",
"description": "Cable cut in Tonga",
"endDate": "2019-12-27T18:11:19.117Z",
"eventType": "EVENT",
"isInstantaneous": true,
"linkedUrl": "https://example.com",
"startDate": "2019-12-27T18:11:19.117Z"
}
],
"level": 0
},
"dateRange": [
{
"endTime": "2022-09-17T10:22:57.555Z",
"startTime": "2022-09-16T10:22:57.555Z"
}
],
"lastUpdated": "2019-12-27T18:11:19.117Z"
},
"serie_0": {
"timestamps": [
"2019-12-27T18:11:19.117Z"
],
"values": [
"10"
]
}
},
"success": true
}Returns Examples
{
"result": {
"meta": {
"aggInterval": "15m",
"confidenceInfo": {
"annotations": [
{
"dataSource": "ALL",
"description": "Cable cut in Tonga",
"endDate": "2019-12-27T18:11:19.117Z",
"eventType": "EVENT",
"isInstantaneous": true,
"linkedUrl": "https://example.com",
"startDate": "2019-12-27T18:11:19.117Z"
}
],
"level": 0
},
"dateRange": [
{
"endTime": "2022-09-17T10:22:57.555Z",
"startTime": "2022-09-16T10:22:57.555Z"
}
],
"lastUpdated": "2019-12-27T18:11:19.117Z"
},
"serie_0": {
"timestamps": [
"2019-12-27T18:11:19.117Z"
],
"values": [
"10"
]
}
},
"success": true
}