List Events
client.MagicTransit.Connectors.Events.List(ctx, connectorID, params) (*ConnectorEventListResponse, error)
GET/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/events
List Events
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)
List Events
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/cloudflare-go"
"github.com/stainless-sdks/cloudflare-go/magic_transit"
"github.com/stainless-sdks/cloudflare-go/option"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
events, err := client.MagicTransit.Connectors.Events.List(
context.TODO(),
"connector_id",
magic_transit.ConnectorEventListParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
From: cloudflare.F(0.000000),
To: cloudflare.F(0.000000),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", events.Count)
}
{
"result": {
"count": 0,
"items": [
{
"a": 0,
"k": "k",
"n": 0,
"t": 0
}
],
"cursor": "cursor"
},
"success": true,
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
]
}Returns Examples
{
"result": {
"count": 0,
"items": [
{
"a": 0,
"k": "k",
"n": 0,
"t": 0
}
],
"cursor": "cursor"
},
"success": true,
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
]
}