GraphQL endpoint for event aggregation
client.CloudforceOne.ThreatEvents.Graphql.New(ctx, body) (*ThreatEventGraphqlNewResponse, error)
POST/accounts/{account_id}/cloudforce-one/events/graphql
Execute GraphQL aggregations over threat events. Supports multi-dimensional group-bys, optional date range filtering, and multi-dataset aggregation.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
GraphQL endpoint for event aggregation
package main
import (
"context"
"fmt"
"github.com/cloudflare/cloudflare-go"
"github.com/cloudflare/cloudflare-go/cloudforce_one"
"github.com/cloudflare/cloudflare-go/option"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
graphql, err := client.CloudforceOne.ThreatEvents.Graphql.New(context.TODO(), cloudforce_one.ThreatEventGraphqlNewParams{
AccountID: cloudflare.F("account_id"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", graphql.Data)
}
{
"data": {},
"errors": [
{}
]
}Returns Examples
{
"data": {},
"errors": [
{}
]
}