mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-20 01:38:41 +02:00
[docs] add examples to events and tag to ingress port (#3552)
This commit is contained in:
parent
c02e236196
commit
8f0aa8352a
@ -1687,7 +1687,6 @@ components:
|
|||||||
- connected
|
- connected
|
||||||
- fallback
|
- fallback
|
||||||
- region
|
- region
|
||||||
|
|
||||||
AvailablePorts:
|
AvailablePorts:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -1785,7 +1784,7 @@ components:
|
|||||||
ingress_ip:
|
ingress_ip:
|
||||||
description: Ingress IP address of the ingress peer where the traffic arrives
|
description: Ingress IP address of the ingress peer where the traffic arrives
|
||||||
type: string
|
type: string
|
||||||
example:
|
example: 192.34.0.123
|
||||||
port_range_mappings:
|
port_range_mappings:
|
||||||
description: List of port ranges that are allowed to be used by the ingress peer
|
description: List of port ranges that are allowed to be used by the ingress peer
|
||||||
type: array
|
type: array
|
||||||
@ -1835,9 +1834,11 @@ components:
|
|||||||
city_name:
|
city_name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name of the city (if known)."
|
description: "Name of the city (if known)."
|
||||||
|
example: "Berlin"
|
||||||
country_code:
|
country_code:
|
||||||
type: string
|
type: string
|
||||||
description: "ISO country code (if known)."
|
description: "ISO country code (if known)."
|
||||||
|
example: "DE"
|
||||||
required:
|
required:
|
||||||
- city_name
|
- city_name
|
||||||
- country_code
|
- country_code
|
||||||
@ -1847,18 +1848,22 @@ components:
|
|||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "ID of this endpoint (e.g., peer ID or resource ID)."
|
description: "ID of this endpoint (e.g., peer ID or resource ID)."
|
||||||
|
example: "ch8i4ug6lnn4g9hqv7m0"
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
description: "Type of the endpoint object (e.g., UNKNOWN, PEER, HOST_RESOURCE)."
|
description: "Type of the endpoint object (e.g., UNKNOWN, PEER, HOST_RESOURCE)."
|
||||||
|
example: "PEER"
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name is the name of the endpoint object (e.g., a peer name)."
|
description: "Name is the name of the endpoint object (e.g., a peer name)."
|
||||||
|
example: "My Peer"
|
||||||
geo_location:
|
geo_location:
|
||||||
$ref: '#/components/schemas/NetworkTrafficLocation'
|
$ref: '#/components/schemas/NetworkTrafficLocation'
|
||||||
os:
|
os:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
description: "Operating system of the peer, if applicable."
|
description: "Operating system of the peer, if applicable."
|
||||||
|
example: "Linux"
|
||||||
address:
|
address:
|
||||||
type: string
|
type: string
|
||||||
description: "IP address (and possibly port) in string form."
|
description: "IP address (and possibly port) in string form."
|
||||||
@ -1867,6 +1872,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
description: "DNS label/name if available."
|
description: "DNS label/name if available."
|
||||||
|
example: "*.mydomain.com"
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- type
|
- type
|
||||||
@ -1881,65 +1887,83 @@ components:
|
|||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "ID of the event. Unique."
|
description: "ID of the event. Unique."
|
||||||
|
example: "18e204d6-f7c6-405d-8025-70becb216add"
|
||||||
flow_id:
|
flow_id:
|
||||||
type: string
|
type: string
|
||||||
description: "FlowID is the ID of the connection flow. Not unique because it can be the same for multiple events (e.g., start and end of the connection)."
|
description: "FlowID is the ID of the connection flow. Not unique because it can be the same for multiple events (e.g., start and end of the connection)."
|
||||||
|
example: "61092452-b17c-4b14-b7cf-a2158c549826"
|
||||||
reporter_id:
|
reporter_id:
|
||||||
type: string
|
type: string
|
||||||
description: "ID of the reporter of the event (e.g., the peer that reported the event)."
|
description: "ID of the reporter of the event (e.g., the peer that reported the event)."
|
||||||
|
example: "ch8i4ug6lnn4g9hqv7m0"
|
||||||
timestamp:
|
timestamp:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
description: "Timestamp of the event."
|
description: "Timestamp of the event."
|
||||||
|
example: "2025-03-20T16:23:58.125397Z"
|
||||||
source:
|
source:
|
||||||
$ref: '#/components/schemas/NetworkTrafficEndpoint'
|
$ref: '#/components/schemas/NetworkTrafficEndpoint'
|
||||||
user_id:
|
user_id:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
description: "UserID is the ID of the user that initiated the event (can be empty as not every event is user-initiated)."
|
description: "UserID is the ID of the user that initiated the event (can be empty as not every event is user-initiated)."
|
||||||
|
example: "google-oauth2|123456789012345678901"
|
||||||
user_email:
|
user_email:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
description: "Email of the user who initiated the event (if any)."
|
description: "Email of the user who initiated the event (if any)."
|
||||||
|
example: "alice@netbird.io"
|
||||||
user_name:
|
user_name:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
description: "Name of the user who initiated the event (if any)."
|
description: "Name of the user who initiated the event (if any)."
|
||||||
|
example: "Alice Smith"
|
||||||
destination:
|
destination:
|
||||||
$ref: '#/components/schemas/NetworkTrafficEndpoint'
|
$ref: '#/components/schemas/NetworkTrafficEndpoint'
|
||||||
protocol:
|
protocol:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Protocol is the protocol of the traffic (e.g. 1 = ICMP, 6 = TCP, 17 = UDP, etc.)."
|
description: "Protocol is the protocol of the traffic (e.g. 1 = ICMP, 6 = TCP, 17 = UDP, etc.)."
|
||||||
|
example: 6
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
description: "Type of the event (e.g. TYPE_UNKNOWN, TYPE_START, TYPE_END, TYPE_DROP)."
|
description: "Type of the event (e.g. TYPE_UNKNOWN, TYPE_START, TYPE_END, TYPE_DROP)."
|
||||||
|
example: "TYPE_START"
|
||||||
direction:
|
direction:
|
||||||
type: string
|
type: string
|
||||||
description: "Direction of the traffic (e.g. DIRECTION_UNKNOWN, INGRESS, EGRESS)."
|
description: "Direction of the traffic (e.g. DIRECTION_UNKNOWN, INGRESS, EGRESS)."
|
||||||
|
example: "INGRESS"
|
||||||
rx_bytes:
|
rx_bytes:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Number of bytes received."
|
description: "Number of bytes received."
|
||||||
|
example: 1234
|
||||||
rx_packets:
|
rx_packets:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Number of packets received."
|
description: "Number of packets received."
|
||||||
|
example: 5
|
||||||
tx_bytes:
|
tx_bytes:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Number of bytes transmitted."
|
description: "Number of bytes transmitted."
|
||||||
|
example: 1234
|
||||||
tx_packets:
|
tx_packets:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Number of packets transmitted."
|
description: "Number of packets transmitted."
|
||||||
|
example: 5
|
||||||
policy_id:
|
policy_id:
|
||||||
type: string
|
type: string
|
||||||
description: "ID of the policy that allowed this event."
|
description: "ID of the policy that allowed this event."
|
||||||
|
example: "ch8i4ug6lnn4g9hqv7m0"
|
||||||
policy_name:
|
policy_name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name of the policy that allowed this event."
|
description: "Name of the policy that allowed this event."
|
||||||
|
example: "All to All"
|
||||||
icmp_type:
|
icmp_type:
|
||||||
type: integer
|
type: integer
|
||||||
description: "ICMP type (if applicable)."
|
description: "ICMP type (if applicable)."
|
||||||
|
example: 8
|
||||||
icmp_code:
|
icmp_code:
|
||||||
type: integer
|
type: integer
|
||||||
description: "ICMP code (if applicable)."
|
description: "ICMP code (if applicable)."
|
||||||
|
example: 0
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- flow_id
|
- flow_id
|
||||||
@ -2529,7 +2553,7 @@ paths:
|
|||||||
/api/peers/{peerId}/ingress/ports:
|
/api/peers/{peerId}/ingress/ports:
|
||||||
get:
|
get:
|
||||||
x-cloud-only: true
|
x-cloud-only: true
|
||||||
summary: List all Ingress Port Allocations for a Peer
|
summary: List all Port Allocations
|
||||||
description: Returns a list of all ingress port allocations for a peer
|
description: Returns a list of all ingress port allocations for a peer
|
||||||
tags: [ Ingress Ports ]
|
tags: [ Ingress Ports ]
|
||||||
security:
|
security:
|
||||||
@ -2566,7 +2590,7 @@ paths:
|
|||||||
"$ref": "#/components/responses/internal_error"
|
"$ref": "#/components/responses/internal_error"
|
||||||
post:
|
post:
|
||||||
x-cloud-only: true
|
x-cloud-only: true
|
||||||
summary: Create a Ingress Port Allocation
|
summary: Create a Port Allocation
|
||||||
description: Creates a new ingress port allocation for a peer
|
description: Creates a new ingress port allocation for a peer
|
||||||
tags: [ Ingress Ports ]
|
tags: [ Ingress Ports ]
|
||||||
security:
|
security:
|
||||||
@ -2603,7 +2627,7 @@ paths:
|
|||||||
/api/peers/{peerId}/ingress/ports/{allocationId}:
|
/api/peers/{peerId}/ingress/ports/{allocationId}:
|
||||||
get:
|
get:
|
||||||
x-cloud-only: true
|
x-cloud-only: true
|
||||||
summary: Retrieve a Ingress Port Allocation
|
summary: Retrieve a Port Allocation
|
||||||
description: Get information about an ingress port allocation
|
description: Get information about an ingress port allocation
|
||||||
tags: [ Ingress Ports ]
|
tags: [ Ingress Ports ]
|
||||||
security:
|
security:
|
||||||
@ -2639,6 +2663,12 @@ paths:
|
|||||||
"$ref": "#/components/responses/internal_error"
|
"$ref": "#/components/responses/internal_error"
|
||||||
put:
|
put:
|
||||||
x-cloud-only: true
|
x-cloud-only: true
|
||||||
|
summary: Update a Port Allocation
|
||||||
|
description: Update information about an ingress port allocation
|
||||||
|
tags: [ Ingress Ports ]
|
||||||
|
security:
|
||||||
|
- BearerAuth: [ ]
|
||||||
|
- TokenAuth: [ ]
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: peerId
|
name: peerId
|
||||||
@ -2675,7 +2705,7 @@ paths:
|
|||||||
"$ref": "#/components/responses/internal_error"
|
"$ref": "#/components/responses/internal_error"
|
||||||
delete:
|
delete:
|
||||||
x-cloud-only: true
|
x-cloud-only: true
|
||||||
summary: Delete a Ingress Port Allocation
|
summary: Delete a Port Allocation
|
||||||
description: Delete an ingress port allocation
|
description: Delete an ingress port allocation
|
||||||
tags: [ Ingress Ports ]
|
tags: [ Ingress Ports ]
|
||||||
security:
|
security:
|
||||||
@ -4156,10 +4186,14 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/NetworkTrafficEvent"
|
$ref: "#/components/schemas/NetworkTrafficEvent"
|
||||||
"401":
|
'400':
|
||||||
$ref: "#/components/responses/requires_authentication"
|
"$ref": "#/components/responses/bad_request"
|
||||||
"500":
|
'401':
|
||||||
$ref: "#/components/responses/internal_error"
|
"$ref": "#/components/responses/requires_authentication"
|
||||||
|
'403':
|
||||||
|
"$ref": "#/components/responses/forbidden"
|
||||||
|
'500':
|
||||||
|
"$ref": "#/components/responses/internal_error"
|
||||||
/api/posture-checks:
|
/api/posture-checks:
|
||||||
get:
|
get:
|
||||||
summary: List all Posture Checks
|
summary: List all Posture Checks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user