NetLogAnalyser / API
development Dashboard

REST + WebSocket API  ·  v0.1.0

Real-time network log
ingestion and analysis

Send network packet logs from any system using a simple HTTP POST. View live traffic, detect anomalies, and query historical data through the dashboard or directly via this API.

API checking…
Database checking…
Version v0.1.0
Uptime -

Base URL

endpoint http://localhost:8000

Documentation

Authentication

Dashboard users JWT

Log in at POST /auth/login to receive a short-lived access token. Pass it as Authorization: Bearer <token> on every dashboard request. Tokens refresh automatically via an httpOnly cookie.

Log ingestion clients API key

Generate an API key from your dashboard. Pass it as X-API-Key: <key> on every call to POST /ingest. Keys can be labelled, rotated, and revoked at any time.

Quick start

import requests
from datetime import datetime, timezone

url     = "http://localhost:8000/ingest"
headers = {"X-API-Key": "nw_live_your_key_here"}

# Send a batch of log entries - always batch, never one at a time.
payload = [
    {
        "src_ip":           "192.168.1.1",
        "dst_ip":           "10.0.0.1",
        "src_port":         52341,
        "dst_port":         443,
        "protocol":         "TCP",
        "packet_size_bytes": 128,
        "captured_at":      datetime.now(timezone.utc).isoformat(),
    }
]

response = requests.post(url, json=payload, headers=headers)
print(response.json())  # {"ingested": 1, "anomalies_detected": 0}
                

Endpoints

POST /auth/register Create an account
POST /auth/login Obtain access + refresh tokens
POST /ingest Submit a batch of log entries - requires API key
GET /logs Paginated log history with filters
GET /logs/{id} Single entry with raw payload
GET /analytics/traffic Time-bucketed packet counts
GET /analytics/protocols Protocol breakdown
GET /analytics/geo Source counts by country
GET /analytics/top-talkers Most active source IPs
GET /analytics/anomalies Recent high-score entries
GET /api-keys List your API keys
POST /api-keys Generate a new key
DEL /api-keys/{id} Revoke a key
WS /ws/live Real-time log stream - requires JWT as ?token=