Get latest annotations
client.Radar.Annotations.List(ctx, query) (*AnnotationListResponse, error)
GET/radar/annotations
Retrieves the latest annotations.
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 latest annotations
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"),
)
annotations, err := client.Radar.Annotations.List(context.TODO(), radar.AnnotationListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", annotations.Annotations)
}
{
"result": {
"annotations": [
{
"id": "550",
"asns": [
189
],
"asnsDetails": [
{
"asn": "189",
"name": "LUMEN-LEGACY-L3-PARTITION",
"locations": {
"code": "US",
"name": "United States"
}
}
],
"dataSource": "ALL",
"eventType": "OUTAGE",
"locations": [
"US"
],
"locationsDetails": [
{
"code": "US",
"name": "United States"
}
],
"origins": [
"amazon-us-east-1"
],
"originsDetails": [
{
"name": "us-east-1 Amazon Web Services",
"origin": "amazon-us-east-1"
}
],
"outage": {
"outageCause": "CABLE_CUT",
"outageType": "NATIONWIDE"
},
"startDate": "2022-09-06T10:00:28Z",
"description": "example",
"endDate": "2022-09-08T10:00:28Z",
"linkedUrl": "http://example.com",
"scope": "Colima, Michoacán, México"
}
]
},
"success": true
}Returns Examples
{
"result": {
"annotations": [
{
"id": "550",
"asns": [
189
],
"asnsDetails": [
{
"asn": "189",
"name": "LUMEN-LEGACY-L3-PARTITION",
"locations": {
"code": "US",
"name": "United States"
}
}
],
"dataSource": "ALL",
"eventType": "OUTAGE",
"locations": [
"US"
],
"locationsDetails": [
{
"code": "US",
"name": "United States"
}
],
"origins": [
"amazon-us-east-1"
],
"originsDetails": [
{
"name": "us-east-1 Amazon Web Services",
"origin": "amazon-us-east-1"
}
],
"outage": {
"outageCause": "CABLE_CUT",
"outageType": "NATIONWIDE"
},
"startDate": "2022-09-06T10:00:28Z",
"description": "example",
"endDate": "2022-09-08T10:00:28Z",
"linkedUrl": "http://example.com",
"scope": "Colima, Michoacán, México"
}
]
},
"success": true
}