updated openapi spec

Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
Dmitri
2026-06-15 18:05:29 +02:00
committed by Dmitri Dolguikh
parent 0e95b6d1c9
commit fd763ec0dd
2 changed files with 24 additions and 3 deletions

View File

@@ -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

View File

@@ -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.