## Creates bulk DOS event with relationships and indicators `client.CloudforceOne.ThreatEvents.BulkNewRelationships(ctx, params) (*ThreatEventBulkNewRelationshipsResponse, error)` **post** `/accounts/{account_id}/cloudforce-one/events/create/bulk/relationships` This method is deprecated. Please use `event_create_bulk` instead ### Parameters - `params ThreatEventBulkNewRelationshipsParams` - `AccountID param.Field[string]` Path param: Account ID. - `Data param.Field[[]ThreatEventBulkNewRelationshipsParamsData]` Body param - `Category string` - `Date Time` - `Event string` - `Raw ThreatEventBulkNewRelationshipsParamsDataRaw` - `Data map[string, unknown]` - `Source string` - `TLP string` - `TLP string` - `AccountID float64` - `Attacker string` - `AttackerCountry string` - `DatasetID string` - `Indicator string` - `Indicators []ThreatEventBulkNewRelationshipsParamsDataIndicator` Array of indicators for this event. Supports multiple indicators per event for complex scenarios. - `IndicatorType string` The type of indicator (e.g., DOMAIN, IP, JA3, HASH) - `Value string` The indicator value (e.g., domain name, IP address, hash) - `IndicatorType string` - `Insight string` - `Tags []string` - `TargetCountry string` - `TargetIndustry string` - `DatasetID param.Field[string]` Body param ### Returns - `type ThreatEventBulkNewRelationshipsResponse struct{…}` Result of bulk relationship creation operation - `CreatedEventsCount float64` Number of events created - `CreatedIndicatorsCount float64` Number of indicators created - `CreatedRelationshipsCount float64` Number of relationships created - `ErrorCount float64` Number of errors encountered - `Errors []ThreatEventBulkNewRelationshipsResponseError` Array of error details - `Error string` Error message - `EventIndex float64` Index of the event that caused the error ### Example ```go package main import ( "context" "fmt" "time" "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"), ) response, err := client.CloudforceOne.ThreatEvents.BulkNewRelationships(context.TODO(), cloudforce_one.ThreatEventBulkNewRelationshipsParams{ AccountID: cloudflare.F("account_id"), Data: cloudflare.F([]cloudforce_one.ThreatEventBulkNewRelationshipsParamsData{cloudforce_one.ThreatEventBulkNewRelationshipsParamsData{ Category: cloudflare.F("Domain Resolution"), Date: cloudflare.F(time.Now()), Event: cloudflare.F("An attacker registered the domain domain.com"), Raw: cloudflare.F(cloudforce_one.ThreatEventBulkNewRelationshipsParamsDataRaw{ Data: cloudflare.F(map[string]interface{}{ "foo": "bar", }), }), TLP: cloudflare.F("amber"), }}), DatasetID: cloudflare.F("durableObjectName"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.CreatedEventsCount) } ``` #### Response ```json { "createdEventsCount": 0, "createdIndicatorsCount": 0, "createdRelationshipsCount": 0, "errorCount": 0, "errors": [ { "error": "error", "eventIndex": 0 } ] } ```