Skip to content
Start here

Lists all datasets in an account

client.CloudforceOne.ThreatEvents.Datasets.List(ctx, params) (*[]ThreatEventDatasetListResponse, error)
GET/accounts/{account_id}/cloudforce-one/events/dataset

Lists all datasets in an account

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Cloudforce One WriteCloudforce One Read
ParametersExpand Collapse
params ThreatEventDatasetListParams
AccountID param.Field[string]

Path param: Account ID.

IncludeDeleted param.Field[bool]Optional

Query param: When true, include soft-deleted datasets in the response. Each item includes a deletedAt field (ISO 8601 or null). Default: false.

ReturnsExpand Collapse
type ThreatEventDatasetListResponse []ThreatEventDatasetListResponse
IsPublic bool
Name string
UUID string
DeletedAt stringOptional

Lists all datasets in an account

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/cloudforce_one"
  "github.com/stainless-sdks/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  datasets, err := client.CloudforceOne.ThreatEvents.Datasets.List(context.TODO(), cloudforce_one.ThreatEventDatasetListParams{
    AccountID: cloudflare.F("account_id"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", datasets)
}
[
  {
    "isPublic": true,
    "name": "friendly dataset name",
    "uuid": "12345678-1234-1234-1234-1234567890ab",
    "deletedAt": "deletedAt"
  }
]
Returns Examples
[
  {
    "isPublic": true,
    "name": "friendly dataset name",
    "uuid": "12345678-1234-1234-1234-1234567890ab",
    "deletedAt": "deletedAt"
  }
]