From 988eb9c40ea1fe499bf820176e5de2bf9f174d85 Mon Sep 17 00:00:00 2001 From: netbirddev Date: Wed, 30 Apr 2025 11:24:29 +0000 Subject: [PATCH] Update API pages with v0.43.1 --- src/pages/ipa/resources/events.mdx | 242 ++++++++++++++++++----------- 1 file changed, 153 insertions(+), 89 deletions(-) diff --git a/src/pages/ipa/resources/events.mdx b/src/pages/ipa/resources/events.mdx index e00d232b..40f7d72f 100644 --- a/src/pages/ipa/resources/events.mdx +++ b/src/pages/ipa/resources/events.mdx @@ -216,7 +216,47 @@ echo $response; Returns a list of all network traffic events - + + ### Query Parameters + + + + Page number + + + + Number of items per page + + + + Filter by user ID + + + + Filter by protocol + + + + Filter by event type + + + + Filter by direction + + + + Filters events with a partial match on user email, source and destination names and source and destination addresses + + + + Start date for filtering events (ISO 8601 format, e.g., 2024-01-01T00:00:00Z). + + + + End date for filtering events (ISO 8601 format, e.g., 2024-01-31T23:59:59Z). + + + @@ -369,102 +409,126 @@ echo $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" +} ```