Update API pages with v0.43.1

This commit is contained in:
netbirddev
2025-04-30 11:24:29 +00:00
parent e7a017b755
commit 988eb9c40e

View File

@@ -216,7 +216,47 @@ echo $response;
<Row>
<Col>
Returns a list of all network traffic events
</Col>
### Query Parameters
<Properties>
<Property name="page" type="integer" required={false}>
Page number
</Property>
<Property name="page_size" type="integer" required={false}>
Number of items per page
</Property>
<Property name="user_id" type="string" required={false}>
Filter by user ID
</Property>
<Property name="protocol" type="integer" required={false}>
Filter by protocol
</Property>
<Property name="type" type="string" required={false}>
Filter by event type
</Property>
<Property name="direction" type="string" required={false}>
Filter by direction
</Property>
<Property name="search" type="string" required={false}>
Filters events with a partial match on user email, source and destination names and source and destination addresses
</Property>
<Property name="start_date" type="string" required={false}>
Start date for filtering events (ISO 8601 format, e.g., 2024-01-01T00:00:00Z).
</Property>
<Property name="end_date" type="string" required={false}>
End date for filtering events (ISO 8601 format, e.g., 2024-01-31T23:59:59Z).
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/events/network-traffic">
@@ -369,102 +409,126 @@ echo $response;
<CodeGroup title="Response">
```json {{ title: 'Example' }}
[
{
"id": "18e204d6-f7c6-405d-8025-70becb216add",
"flow_id": "61092452-b17c-4b14-b7cf-a2158c549826",
"reporter_id": "ch8i4ug6lnn4g9hqv7m0",
"timestamp": "2025-03-20T16:23:58.125397Z",
"receive_timestamp": "2025-03-20T16:23:58.125397Z",
"source": {
"id": "ch8i4ug6lnn4g9hqv7m0",
"type": "PEER",
"name": "My Peer",
"geo_location": {
"city_name": "Berlin",
"country_code": "DE"
{
"data": [
{
"id": "18e204d6-f7c6-405d-8025-70becb216add",
"flow_id": "61092452-b17c-4b14-b7cf-a2158c549826",
"reporter_id": "ch8i4ug6lnn4g9hqv7m0",
"timestamp": "2025-03-20T16:23:58.125397Z",
"receive_timestamp": "2025-03-20T16:23:58.125397Z",
"source": {
"id": "ch8i4ug6lnn4g9hqv7m0",
"type": "PEER",
"name": "My Peer",
"geo_location": {
"city_name": "Berlin",
"country_code": "DE"
},
"os": "Linux",
"address": "100.64.0.10:51820",
"dns_label": "*.mydomain.com"
},
"os": "Linux",
"address": "100.64.0.10:51820",
"dns_label": "*.mydomain.com"
},
"user_id": "google-oauth2|123456789012345678901",
"user_email": "alice@netbird.io",
"user_name": "Alice Smith",
"destination": {
"id": "ch8i4ug6lnn4g9hqv7m0",
"type": "PEER",
"name": "My Peer",
"geo_location": {
"city_name": "Berlin",
"country_code": "DE"
"user_id": "google-oauth2|123456789012345678901",
"user_email": "alice@netbird.io",
"user_name": "Alice Smith",
"destination": {
"id": "ch8i4ug6lnn4g9hqv7m0",
"type": "PEER",
"name": "My Peer",
"geo_location": {
"city_name": "Berlin",
"country_code": "DE"
},
"os": "Linux",
"address": "100.64.0.10:51820",
"dns_label": "*.mydomain.com"
},
"os": "Linux",
"address": "100.64.0.10:51820",
"dns_label": "*.mydomain.com"
},
"protocol": 6,
"type": "TYPE_START",
"direction": "INGRESS",
"rx_bytes": 1234,
"rx_packets": 5,
"tx_bytes": 1234,
"tx_packets": 5,
"policy_id": "ch8i4ug6lnn4g9hqv7m0",
"policy_name": "All to All",
"icmp_type": 8,
"icmp_code": 0
"protocol": 6,
"type": "TYPE_START",
"direction": "INGRESS",
"rx_bytes": 1234,
"rx_packets": 5,
"tx_bytes": 1234,
"tx_packets": 5,
"policy_id": "ch8i4ug6lnn4g9hqv7m0",
"policy_name": "All to All",
"icmp_type": 8,
"icmp_code": 0
}
],
"page": {
"type": "integer",
"description": "Current page number"
},
"page_size": {
"type": "integer",
"description": "Number of items per page"
},
"total_records": {
"type": "integer",
"description": "Total number of event records available"
},
"total_pages": {
"type": "integer",
"description": "Total number of pages available"
}
]
}
```
```json {{ title: 'Schema' }}
[
{
"id": "string",
"flow_id": "string",
"reporter_id": "string",
"timestamp": "string",
"receive_timestamp": "string",
"source": {
{
"data": [
{
"id": "string",
"type": "string",
"name": "string",
"geo_location": {
"city_name": "string",
"country_code": "string"
"flow_id": "string",
"reporter_id": "string",
"timestamp": "string",
"receive_timestamp": "string",
"source": {
"id": "string",
"type": "string",
"name": "string",
"geo_location": {
"city_name": "string",
"country_code": "string"
},
"os": "string",
"address": "string",
"dns_label": "string"
},
"os": "string",
"address": "string",
"dns_label": "string"
},
"user_id": "string",
"user_email": "string",
"user_name": "string",
"destination": {
"id": "string",
"type": "string",
"name": "string",
"geo_location": {
"city_name": "string",
"country_code": "string"
"user_id": "string",
"user_email": "string",
"user_name": "string",
"destination": {
"id": "string",
"type": "string",
"name": "string",
"geo_location": {
"city_name": "string",
"country_code": "string"
},
"os": "string",
"address": "string",
"dns_label": "string"
},
"os": "string",
"address": "string",
"dns_label": "string"
},
"protocol": "integer",
"type": "string",
"direction": "string",
"rx_bytes": "integer",
"rx_packets": "integer",
"tx_bytes": "integer",
"tx_packets": "integer",
"policy_id": "string",
"policy_name": "string",
"icmp_type": "integer",
"icmp_code": "integer"
}
]
"protocol": "integer",
"type": "string",
"direction": "string",
"rx_bytes": "integer",
"rx_packets": "integer",
"tx_bytes": "integer",
"tx_packets": "integer",
"policy_id": "string",
"policy_name": "string",
"icmp_type": "integer",
"icmp_code": "integer"
}
],
"page": "integer",
"page_size": "integer",
"total_records": "integer",
"total_pages": "integer"
}
```
</CodeGroup>