diff --git a/shared/management/http/api/openapi.yml b/shared/management/http/api/openapi.yml index 34088bb53..461df1b0d 100644 --- a/shared/management/http/api/openapi.yml +++ b/shared/management/http/api/openapi.yml @@ -2777,6 +2777,16 @@ components: type: integer description: "Number of drop events." example: 5 + window_start: + type: string + format: date-time + description: Timestamp of the start of the aggregation window. + example: 2025-03-20T16:23:58.125397Z + window_end: + type: string + format: date-time + description: Timestamp of the end of the aggregation window. + example: 2025-03-20T16:23:58.125397Z events: type: array description: "List of events that are correlated to this flow (e.g., start, end)." @@ -2798,6 +2808,11 @@ components: - rx_packets - tx_bytes - tx_packets + - num_of_starts + - num_of_ends + - num_of_drops + - window_start + - window_end - events NetworkTrafficEventsResponse: type: object diff --git a/shared/management/http/api/types.gen.go b/shared/management/http/api/types.gen.go index 3300e004c..844cd4f59 100644 --- a/shared/management/http/api/types.gen.go +++ b/shared/management/http/api/types.gen.go @@ -2909,13 +2909,13 @@ type NetworkTrafficEvent struct { Icmp NetworkTrafficICMP `json:"icmp"` // NumOfDrops Number of drop events. - NumOfDrops *int `json:"num_of_drops,omitempty"` + NumOfDrops int `json:"num_of_drops"` // NumOfEnds Number of end events. - NumOfEnds *int `json:"num_of_ends,omitempty"` + NumOfEnds int `json:"num_of_ends"` // NumOfStarts Number of start events. - NumOfStarts *int `json:"num_of_starts,omitempty"` + NumOfStarts int `json:"num_of_starts"` Policy NetworkTrafficPolicy `json:"policy"` // Protocol Protocol is the protocol of the traffic (e.g. 1 = ICMP, 6 = TCP, 17 = UDP, etc.). @@ -2937,6 +2937,12 @@ type NetworkTrafficEvent struct { // TxPackets Number of packets transmitted. TxPackets int `json:"tx_packets"` User NetworkTrafficUser `json:"user"` + + // WindowEnd Timestamp of the end of the aggregation window. + WindowEnd time.Time `json:"window_end"` + + // WindowStart Timestamp of the start of the aggregation window. + WindowStart time.Time `json:"window_start"` } // NetworkTrafficEventsResponse defines model for NetworkTrafficEventsResponse.