Files
NetAlertX/API_OLD/index.html

4979 lines
85 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="The main documentation resource for NetAlertX - a network scanner and presence detector">
<link rel="canonical" href="https://jokob-sk.github.io/NetAlertX/API_OLD/">
<link rel="prev" href="../API_TESTS/">
<link rel="next" href="../WEBHOOK_SECRET/">
<link rel="icon" href="../img/netalertx_docs.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.0">
<title>SUPERSEDED OLD API Overview - NetAlertX Docs</title>
<link rel="stylesheet" href="../assets/stylesheets/main.618322db.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.ab4e12ef.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
<!-- Google Tag Manager -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KCRSGLP8J2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-KCRSGLP8J2');
</script>
<!-- End Google Tag Manager -->
</head>
<body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="deep-purple">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#deprecated-api-endpoints" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KCRSGLP8J2"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="NetAlertX Docs" class="md-header__button md-logo" aria-label="NetAlertX Docs" data-md-component="logo">
<img src="../img/netalertx_docs.png" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
NetAlertX Docs
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
SUPERSEDED OLD API Overview
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="deep-purple" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26c1.81-1.27 3-3.36 3-5.74a7 7 0 0 0-7-7M9 21a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1H9z"/></svg>
</label>
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="black" data-md-color-accent="deep-purple" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7M9 21v-1h6v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1m3-17a5 5 0 0 0-5 5c0 2.05 1.23 3.81 3 4.58V16h4v-2.42c1.77-.77 3-2.53 3-4.58a5 5 0 0 0-5-5"/></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91s2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08"/></svg>
</a>
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
<div class="md-search__suggest" data-md-component="search-suggest"></div>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/jokob-sk/NetAlertX/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
<div class="md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item">
<a href=".." class="md-tabs__link">
Home
</a>
</li>
<li class="md-tabs__item">
<a href="../INSTALLATION/" class="md-tabs__link">
Installation
</a>
</li>
<li class="md-tabs__item">
<a href="../SUBNETS/" class="md-tabs__link">
Setup
</a>
</li>
<li class="md-tabs__item">
<a href="../DEVICE_MANAGEMENT/" class="md-tabs__link">
Device guides
</a>
</li>
<li class="md-tabs__item">
<a href="../DEBUG_TIPS/" class="md-tabs__link">
Troubleshooting
</a>
</li>
<li class="md-tabs__item md-tabs__item--active">
<a href="../DEV_ENV_SETUP/" class="md-tabs__link">
Development
</a>
</li>
</ul>
</div>
</nav>
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href=".." title="NetAlertX Docs" class="md-nav__button md-logo" aria-label="NetAlertX Docs" data-md-component="logo">
<img src="../img/netalertx_docs.png" alt="logo">
</a>
NetAlertX Docs
</label>
<div class="md-nav__source">
<a href="https://github.com/jokob-sk/NetAlertX/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href=".." class="md-nav__link">
<span class="md-ellipsis">
Home
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
<span class="md-ellipsis">
Installation
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Installation
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../INSTALLATION/" class="md-nav__link">
<span class="md-ellipsis">
Installation options
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../INITIAL_SETUP/" class="md-nav__link">
<span class="md-ellipsis">
Quick setup
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_3" >
<label class="md-nav__link" for="__nav_2_3" id="__nav_2_3_label" tabindex="0">
<span class="md-ellipsis">
Docker
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_2_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2_3">
<span class="md-nav__icon md-icon"></span>
Docker
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../DOCKER_INSTALLATION/" class="md-nav__link">
<span class="md-ellipsis">
Docker Guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DOCKER_COMPOSE/" class="md-nav__link">
<span class="md-ellipsis">
Docker Compose
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../FILE_PERMISSIONS/" class="md-nav__link">
<span class="md-ellipsis">
Docker File Permissions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../UPDATES/" class="md-nav__link">
<span class="md-ellipsis">
Docker Updates
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DOCKER_MAINTENANCE/" class="md-nav__link">
<span class="md-ellipsis">
Docker Maintenance
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_4" >
<label class="md-nav__link" for="__nav_2_4" id="__nav_2_4_label" tabindex="0">
<span class="md-ellipsis">
Other
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_2_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2_4">
<span class="md-nav__icon md-icon"></span>
Other
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../SYNOLOGY_GUIDE/" class="md-nav__link">
<span class="md-ellipsis">
Synology Guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DOCKER_PORTAINER/" class="md-nav__link">
<span class="md-ellipsis">
Portainer Stacks
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../COMMUNITY_GUIDES/" class="md-nav__link">
<span class="md-ellipsis">
Community Guides
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../HW_INSTALL/" class="md-nav__link">
<span class="md-ellipsis">
Bare-metal (Experimental)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../MIGRATION/" class="md-nav__link">
<span class="md-ellipsis">
Migration Guide
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_5" >
<label class="md-nav__link" for="__nav_2_5" id="__nav_2_5_label" tabindex="0">
<span class="md-ellipsis">
Help
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_2_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2_5">
<span class="md-nav__icon md-icon"></span>
Help
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../COMMON_ISSUES/" class="md-nav__link">
<span class="md-ellipsis">
Common issues
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
<span class="md-ellipsis">
Setup
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Setup
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_1" >
<label class="md-nav__link" for="__nav_3_1" id="__nav_3_1_label" tabindex="0">
<span class="md-ellipsis">
Getting started
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_1">
<span class="md-nav__icon md-icon"></span>
Getting started
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../SUBNETS/" class="md-nav__link">
<span class="md-ellipsis">
Subnets
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../PLUGINS/" class="md-nav__link">
<span class="md-ellipsis">
Enable Plugins
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../PIHOLE_GUIDE/" class="md-nav__link">
<span class="md-ellipsis">
Pi-hole Guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../HOME_ASSISTANT/" class="md-nav__link">
<span class="md-ellipsis">
Home Assistant
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../SMTP/" class="md-nav__link">
<span class="md-ellipsis">
Emails
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../BACKUPS/" class="md-nav__link">
<span class="md-ellipsis">
Backups
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../SECURITY_FEATURES/" class="md-nav__link">
<span class="md-ellipsis">
Security Features
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../SECURITY/" class="md-nav__link">
<span class="md-ellipsis">
Security Considerations
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_2" >
<label class="md-nav__link" for="__nav_3_2" id="__nav_3_2_label" tabindex="0">
<span class="md-ellipsis">
Advanced guides
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_2">
<span class="md-nav__icon md-icon"></span>
Advanced guides
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../REMOTE_NETWORKS/" class="md-nav__link">
<span class="md-ellipsis">
Remote Networks
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../NOTIFICATIONS/" class="md-nav__link">
<span class="md-ellipsis">
Notifications Guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../NAME_RESOLUTION/" class="md-nav__link">
<span class="md-ellipsis">
Name Resolution
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../AUTHELIA/" class="md-nav__link">
<span class="md-ellipsis">
Authelia
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../PERFORMANCE/" class="md-nav__link">
<span class="md-ellipsis">
Performance
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../REVERSE_DNS/" class="md-nav__link">
<span class="md-ellipsis">
Reverse DNS
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../REVERSE_PROXY/" class="md-nav__link">
<span class="md-ellipsis">
Reverse Proxy
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../WEBHOOK_N8N/" class="md-nav__link">
<span class="md-ellipsis">
Webhooks (n8n)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../WORKFLOWS/" class="md-nav__link">
<span class="md-ellipsis">
Workflows
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../WORKFLOW_EXAMPLES/" class="md-nav__link">
<span class="md-ellipsis">
Workflow Examples
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DOCKER_SWARM/" class="md-nav__link">
<span class="md-ellipsis">
Docker Swarm
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_3" >
<label class="md-nav__link" for="__nav_3_3" id="__nav_3_3_label" tabindex="0">
<span class="md-ellipsis">
Help
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_3">
<span class="md-nav__icon md-icon"></span>
Help
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../COMMON_ISSUES/" class="md-nav__link">
<span class="md-ellipsis">
Common issues
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../RANDOM_MAC/" class="md-nav__link">
<span class="md-ellipsis">
Random MAC
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../FIX_OFFLINE_DETECTION/" class="md-nav__link">
<span class="md-ellipsis">
Incorrect Offline Detection
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
<span class="md-ellipsis">
Device guides
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Device guides
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_1" >
<label class="md-nav__link" for="__nav_4_1" id="__nav_4_1_label" tabindex="0">
<span class="md-ellipsis">
Editing Devices
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_1">
<span class="md-nav__icon md-icon"></span>
Editing Devices
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../DEVICE_MANAGEMENT/" class="md-nav__link">
<span class="md-ellipsis">
Management
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DEVICES_BULK_EDITING/" class="md-nav__link">
<span class="md-ellipsis">
Bulk Editing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../CUSTOM_PROPERTIES/" class="md-nav__link">
<span class="md-ellipsis">
Custom Properties
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DEVICE_DISPLAY_SETTINGS/" class="md-nav__link">
<span class="md-ellipsis">
Device Display Settings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../SESSION_INFO/" class="md-nav__link">
<span class="md-ellipsis">
Session Info
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_2" >
<label class="md-nav__link" for="__nav_4_2" id="__nav_4_2_label" tabindex="0">
<span class="md-ellipsis">
Icons and Topology
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_2">
<span class="md-nav__icon md-icon"></span>
Icons and Topology
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../ICONS/" class="md-nav__link">
<span class="md-ellipsis">
Icons
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../NETWORK_TREE/" class="md-nav__link">
<span class="md-ellipsis">
Network Topology
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
<span class="md-ellipsis">
Troubleshooting
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Troubleshooting
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../DEBUG_TIPS/" class="md-nav__link">
<span class="md-ellipsis">
General Tips
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../COMMON_ISSUES/" class="md-nav__link">
<span class="md-ellipsis">
Common issues
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../LOGGING/" class="md-nav__link">
<span class="md-ellipsis">
Inspecting Logs
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DEBUG_API_SERVER/" class="md-nav__link">
<span class="md-ellipsis">
API Server Issues
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DEBUG_INVALID_JSON/" class="md-nav__link">
<span class="md-ellipsis">
Invalid JSON Issues
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DEBUG_PHP/" class="md-nav__link">
<span class="md-ellipsis">
PHP Issues
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DEBUG_PLUGINS/" class="md-nav__link">
<span class="md-ellipsis">
Plugin Issues
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../WEB_UI_PORT_DEBUG/" class="md-nav__link">
<span class="md-ellipsis">
Web UI Port Issues
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../WORKFLOWS_DEBUGGING/" class="md-nav__link">
<span class="md-ellipsis">
Workflows Issues
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" checked>
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="">
<span class="md-ellipsis">
Development
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_6">
<span class="md-nav__icon md-icon"></span>
Development
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6_1" >
<label class="md-nav__link" for="__nav_6_1" id="__nav_6_1_label" tabindex="">
<span class="md-ellipsis">
Plugin and app development
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_6_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6_1">
<span class="md-nav__icon md-icon"></span>
Plugin and app development
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../DEV_ENV_SETUP/" class="md-nav__link">
<span class="md-ellipsis">
Environment Setup
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../BUILDS/" class="md-nav__link">
<span class="md-ellipsis">
Builds
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DEV_DEVCONTAINER/" class="md-nav__link">
<span class="md-ellipsis">
Devcontainer
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../PLUGINS_DEV/" class="md-nav__link">
<span class="md-ellipsis">
Custom Plugins
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../PLUGINS_DEV_CONFIG/" class="md-nav__link">
<span class="md-ellipsis">
Plugin Config
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../FRONTEND_DEVELOPMENT/" class="md-nav__link">
<span class="md-ellipsis">
Frontend Development
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DATABASE/" class="md-nav__link">
<span class="md-ellipsis">
Database
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../SETTINGS_SYSTEM/" class="md-nav__link">
<span class="md-ellipsis">
Settings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../VERSIONS/" class="md-nav__link">
<span class="md-ellipsis">
Versions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../DEVICE_HEURISTICS/" class="md-nav__link">
<span class="md-ellipsis">
Icon and Type guessing
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6_2" checked>
<label class="md-nav__link" for="__nav_6_2" id="__nav_6_2_label" tabindex="">
<span class="md-ellipsis">
API
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_6_2_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_6_2">
<span class="md-nav__icon md-icon"></span>
API
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../API/" class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_DEVICES/" class="md-nav__link">
<span class="md-ellipsis">
Devices Collection
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_DEVICE/" class="md-nav__link">
<span class="md-ellipsis">
Device
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_SESSIONS/" class="md-nav__link">
<span class="md-ellipsis">
Sessions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_SETTINGS/" class="md-nav__link">
<span class="md-ellipsis">
Settings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_EVENTS/" class="md-nav__link">
<span class="md-ellipsis">
Events
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_MESSAGING_IN_APP/" class="md-nav__link">
<span class="md-ellipsis">
Messaging in-app
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_METRICS/" class="md-nav__link">
<span class="md-ellipsis">
Metrics
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_NETTOOLS/" class="md-nav__link">
<span class="md-ellipsis">
Net Tools
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_ONLINEHISTORY/" class="md-nav__link">
<span class="md-ellipsis">
Online History
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_SYNC/" class="md-nav__link">
<span class="md-ellipsis">
Sync
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_GRAPHQL/" class="md-nav__link">
<span class="md-ellipsis">
GraphQL
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_DBQUERY/" class="md-nav__link">
<span class="md-ellipsis">
DB query
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../API_TESTS/" class="md-nav__link">
<span class="md-ellipsis">
Tests
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
SUPERSEDED OLD API Overview
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
SUPERSEDED OLD API Overview
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#api-endpoint-graphql" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: GraphQL
</span>
</a>
<nav class="md-nav" aria-label="API Endpoint: GraphQL">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#example-query-to-fetch-devices" class="md-nav__link">
<span class="md-ellipsis">
Example Query to Fetch Devices
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#curl-command" class="md-nav__link">
<span class="md-ellipsis">
curl Command
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#explanation" class="md-nav__link">
<span class="md-ellipsis">
Explanation:
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#sample-response" class="md-nav__link">
<span class="md-ellipsis">
Sample Response
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#api-endpoint-json-files" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: JSON files
</span>
</a>
<nav class="md-nav" aria-label="API Endpoint: JSON files">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#when-are-the-endpoints-updated" class="md-nav__link">
<span class="md-ellipsis">
When are the endpoints updated
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#location-of-the-endpoints" class="md-nav__link">
<span class="md-ellipsis">
Location of the endpoints
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#available-endpoints" class="md-nav__link">
<span class="md-ellipsis">
Available endpoints
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#json-data-format" class="md-nav__link">
<span class="md-ellipsis">
JSON Data format
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#api-endpoint-prometheus-exporter" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: Prometheus Exporter
</span>
</a>
<nav class="md-nav" aria-label="API Endpoint: Prometheus Exporter">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#example-output-of-the-metrics-endpoint" class="md-nav__link">
<span class="md-ellipsis">
Example Output of the /metrics Endpoint
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#metrics-explanation" class="md-nav__link">
<span class="md-ellipsis">
Metrics Explanation
</span>
</a>
<nav class="md-nav" aria-label="Metrics Explanation">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#1-aggregate-device-counts" class="md-nav__link">
<span class="md-ellipsis">
1. Aggregate Device Counts
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#2-perdevice-status-with-labels" class="md-nav__link">
<span class="md-ellipsis">
2. PerDevice Status with Labels
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#how-to-query-with-curl" class="md-nav__link">
<span class="md-ellipsis">
How to Query with curl
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#summary" class="md-nav__link">
<span class="md-ellipsis">
Summary
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#prometheus-scraping-configuration" class="md-nav__link">
<span class="md-ellipsis">
Prometheus Scraping Configuration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#grafana-template" class="md-nav__link">
<span class="md-ellipsis">
Grafana template
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#api-endpoint-log-files" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: /log files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#api-endpoint-config-files" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: /config files
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6_3" >
<label class="md-nav__link" for="__nav_6_3" id="__nav_6_3_label" tabindex="">
<span class="md-ellipsis">
Integrations
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_6_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6_3">
<span class="md-nav__icon md-icon"></span>
Integrations
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../WEBHOOK_SECRET/" class="md-nav__link">
<span class="md-ellipsis">
Webhook Secret
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../HELPER_SCRIPTS/" class="md-nav__link">
<span class="md-ellipsis">
Helper scripts
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#api-endpoint-graphql" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: GraphQL
</span>
</a>
<nav class="md-nav" aria-label="API Endpoint: GraphQL">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#example-query-to-fetch-devices" class="md-nav__link">
<span class="md-ellipsis">
Example Query to Fetch Devices
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#curl-command" class="md-nav__link">
<span class="md-ellipsis">
curl Command
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#explanation" class="md-nav__link">
<span class="md-ellipsis">
Explanation:
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#sample-response" class="md-nav__link">
<span class="md-ellipsis">
Sample Response
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#api-endpoint-json-files" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: JSON files
</span>
</a>
<nav class="md-nav" aria-label="API Endpoint: JSON files">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#when-are-the-endpoints-updated" class="md-nav__link">
<span class="md-ellipsis">
When are the endpoints updated
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#location-of-the-endpoints" class="md-nav__link">
<span class="md-ellipsis">
Location of the endpoints
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#available-endpoints" class="md-nav__link">
<span class="md-ellipsis">
Available endpoints
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#json-data-format" class="md-nav__link">
<span class="md-ellipsis">
JSON Data format
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#api-endpoint-prometheus-exporter" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: Prometheus Exporter
</span>
</a>
<nav class="md-nav" aria-label="API Endpoint: Prometheus Exporter">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#example-output-of-the-metrics-endpoint" class="md-nav__link">
<span class="md-ellipsis">
Example Output of the /metrics Endpoint
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#metrics-explanation" class="md-nav__link">
<span class="md-ellipsis">
Metrics Explanation
</span>
</a>
<nav class="md-nav" aria-label="Metrics Explanation">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#1-aggregate-device-counts" class="md-nav__link">
<span class="md-ellipsis">
1. Aggregate Device Counts
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#2-perdevice-status-with-labels" class="md-nav__link">
<span class="md-ellipsis">
2. PerDevice Status with Labels
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#how-to-query-with-curl" class="md-nav__link">
<span class="md-ellipsis">
How to Query with curl
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#summary" class="md-nav__link">
<span class="md-ellipsis">
Summary
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#prometheus-scraping-configuration" class="md-nav__link">
<span class="md-ellipsis">
Prometheus Scraping Configuration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#grafana-template" class="md-nav__link">
<span class="md-ellipsis">
Grafana template
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#api-endpoint-log-files" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: /log files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#api-endpoint-config-files" class="md-nav__link">
<span class="md-ellipsis">
API Endpoint: /config files
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<a href="https://github.com/jokob-sk/NetAlertX/blob/main/docs/API_OLD.md" title="Edit this page" class="md-content__button md-icon" rel="edit">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg>
</a>
<a href="https://github.com/jokob-sk/NetAlertX/raw/main/docs/API_OLD.md" title="View source of this page" class="md-content__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 18c.56 0 1 .44 1 1s-.44 1-1 1-1-.44-1-1 .44-1 1-1m0-3c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5M9.27 20H6V4h7v5h5v4.07c.7.08 1.36.25 2 .49V8l-6-6H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4.5a8.2 8.2 0 0 1-1.23-2"/></svg>
</a>
<h1 id="deprecated-api-endpoints">[Deprecated] API endpoints</h1>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Some of these endpoints will be deprecated soon. Please refere to the new <a href="../API/">API</a> endpoints docs for details on the new API layer.</p>
</div>
<p>NetAlertX comes with a couple of API endpoints. All requests need to be authorized (executed in a logged in browser session) or you have to pass the value of the <code>API_TOKEN</code> settings as authorization bearer, for example:</p>
<pre><code class="language-graphql">curl 'http://host:GRAPHQL_PORT/graphql' \
-X POST \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
--data '{
&quot;query&quot;: &quot;query GetDevices($options: PageQueryOptionsInput) { devices(options: $options) { devices { rowid devMac devName devOwner devType devVendor devLastConnection devStatus } count } }&quot;,
&quot;variables&quot;: {
&quot;options&quot;: {
&quot;page&quot;: 1,
&quot;limit&quot;: 10,
&quot;sort&quot;: [{ &quot;field&quot;: &quot;devName&quot;, &quot;order&quot;: &quot;asc&quot; }],
&quot;search&quot;: &quot;&quot;,
&quot;status&quot;: &quot;connected&quot;
}
}
}'
</code></pre>
<h2 id="api-endpoint-graphql">API Endpoint: GraphQL</h2>
<ul>
<li>Endpoint URL: <code>php/server/query_graphql.php</code></li>
<li>Host: <code>same as front end (web ui)</code></li>
<li>Port: <code>20212</code> or as defined by the <code>GRAPHQL_PORT</code> setting</li>
</ul>
<h3 id="example-query-to-fetch-devices">Example Query to Fetch Devices</h3>
<p>First, let's define the GraphQL query to fetch devices with pagination and sorting options.</p>
<pre><code class="language-graphql">query GetDevices($options: PageQueryOptionsInput) {
devices(options: $options) {
devices {
rowid
devMac
devName
devOwner
devType
devVendor
devLastConnection
devStatus
}
count
}
}
</code></pre>
<p>See also: <a href="../DEBUG_API_SERVER/">Debugging GraphQL issues</a></p>
<h3 id="curl-command"><code>curl</code> Command</h3>
<p>You can use the following <code>curl</code> command to execute the query. </p>
<pre><code class="language-sh">curl 'http://host:GRAPHQL_PORT/graphql' -X POST -H 'Authorization: Bearer API_TOKEN' -H 'Content-Type: application/json' --data '{
&quot;query&quot;: &quot;query GetDevices($options: PageQueryOptionsInput) { devices(options: $options) { devices { rowid devMac devName devOwner devType devVendor devLastConnection devStatus } count } }&quot;,
&quot;variables&quot;: {
&quot;options&quot;: {
&quot;page&quot;: 1,
&quot;limit&quot;: 10,
&quot;sort&quot;: [{ &quot;field&quot;: &quot;devName&quot;, &quot;order&quot;: &quot;asc&quot; }],
&quot;search&quot;: &quot;&quot;,
&quot;status&quot;: &quot;connected&quot;
}
}
}'
</code></pre>
<h3 id="explanation">Explanation:</h3>
<ol>
<li><strong>GraphQL Query</strong>:</li>
<li>The <code>query</code> parameter contains the GraphQL query as a string.</li>
<li>
<p>The <code>variables</code> parameter contains the input variables for the query.</p>
</li>
<li>
<p><strong>Query Variables</strong>:</p>
</li>
<li><code>page</code>: Specifies the page number of results to fetch.</li>
<li><code>limit</code>: Specifies the number of results per page.</li>
<li><code>sort</code>: Specifies the sorting options, with <code>field</code> being the field to sort by and <code>order</code> being the sort order (<code>asc</code> for ascending or <code>desc</code> for descending).</li>
<li><code>search</code>: A search term to filter the devices.</li>
<li>
<p><code>status</code>: The status filter to apply (valid values are <code>my_devices</code> (determined by the <code>UI_MY_DEVICES</code> setting), <code>connected</code>, <code>favorites</code>, <code>new</code>, <code>down</code>, <code>archived</code>, <code>offline</code>).</p>
</li>
<li>
<p><strong><code>curl</code> Command</strong>:</p>
</li>
<li>The <code>-X POST</code> option specifies that we are making a POST request.</li>
<li>The <code>-H "Content-Type: application/json"</code> option sets the content type of the request to JSON.</li>
<li>The <code>-d</code> option provides the request payload, which includes the GraphQL query and variables.</li>
</ol>
<h3 id="sample-response">Sample Response</h3>
<p>The response will be in JSON format, similar to the following:</p>
<pre><code class="language-json">{
&quot;data&quot;: {
&quot;devices&quot;: {
&quot;devices&quot;: [
{
&quot;rowid&quot;: 1,
&quot;devMac&quot;: &quot;00:11:22:33:44:55&quot;,
&quot;devName&quot;: &quot;Device 1&quot;,
&quot;devOwner&quot;: &quot;Owner 1&quot;,
&quot;devType&quot;: &quot;Type 1&quot;,
&quot;devVendor&quot;: &quot;Vendor 1&quot;,
&quot;devLastConnection&quot;: &quot;2025-01-01T00:00:00Z&quot;,
&quot;devStatus&quot;: &quot;connected&quot;
},
{
&quot;rowid&quot;: 2,
&quot;devMac&quot;: &quot;66:77:88:99:AA:BB&quot;,
&quot;devName&quot;: &quot;Device 2&quot;,
&quot;devOwner&quot;: &quot;Owner 2&quot;,
&quot;devType&quot;: &quot;Type 2&quot;,
&quot;devVendor&quot;: &quot;Vendor 2&quot;,
&quot;devLastConnection&quot;: &quot;2025-01-02T00:00:00Z&quot;,
&quot;devStatus&quot;: &quot;connected&quot;
}
],
&quot;count&quot;: 2
}
}
}
</code></pre>
<h2 id="api-endpoint-json-files">API Endpoint: JSON files</h2>
<p>This API endpoint retrieves static files, that are periodically updated. </p>
<ul>
<li>Endpoint URL: <code>php/server/query_json.php?file=&lt;file name&gt;</code></li>
<li>Host: <code>same as front end (web ui)</code></li>
<li>Port: <code>20211</code> or as defined by the $PORT docker environment variable (same as the port for the web ui)</li>
</ul>
<h3 id="when-are-the-endpoints-updated">When are the endpoints updated</h3>
<p>The endpoints are updated when objects in the API endpoints are changed.</p>
<h3 id="location-of-the-endpoints">Location of the endpoints</h3>
<p>In the container, these files are located under the API directory (default: <code>/tmp/api/</code>, configurable via <code>NETALERTX_API</code> environment variable). You can access them via the <code>/php/server/query_json.php?file=user_notifications.json</code> endpoint.</p>
<h3 id="available-endpoints">Available endpoints</h3>
<p>You can access the following files:</p>
<table>
<thead>
<tr>
<th>File name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>notification_json_final.json</code></td>
<td>The json version of the last notification (e.g. used for webhooks - <a href="https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json">sample JSON</a>).</td>
</tr>
<tr>
<td><code>table_devices.json</code></td>
<td>All of the available Devices detected by the app.</td>
</tr>
<tr>
<td><code>table_plugins_events.json</code></td>
<td>The list of the unprocessed (pending) notification events (plugins_events DB table).</td>
</tr>
<tr>
<td><code>table_plugins_history.json</code></td>
<td>The list of notification events history.</td>
</tr>
<tr>
<td><code>table_plugins_objects.json</code></td>
<td>The content of the plugins_objects table. Find more info on the <a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs/PLUGINS.md">Plugin system here</a></td>
</tr>
<tr>
<td><code>language_strings.json</code></td>
<td>The content of the language_strings table, which in turn is loaded from the plugins <code>config.json</code> definitions.</td>
</tr>
<tr>
<td><code>table_custom_endpoint.json</code></td>
<td>A custom endpoint generated by the SQL query specified by the <code>API_CUSTOM_SQL</code> setting.</td>
</tr>
<tr>
<td><code>table_settings.json</code></td>
<td>The content of the settings table.</td>
</tr>
<tr>
<td><code>app_state.json</code></td>
<td>Contains the current application state.</td>
</tr>
</tbody>
</table>
<h3 id="json-data-format">JSON Data format</h3>
<p>The endpoints starting with the <code>table_</code> prefix contain most, if not all, data contained in the corresponding database table. The common format for those is:</p>
<pre><code class="language-JSON">{
&quot;data&quot;: [
{
&quot;db_column_name&quot;: &quot;data&quot;,
&quot;db_column_name2&quot;: &quot;data2&quot;
},
{
&quot;db_column_name&quot;: &quot;data3&quot;,
&quot;db_column_name2&quot;: &quot;data4&quot;
}
]
}
</code></pre>
<p>Example JSON of the <code>table_devices.json</code> endpoint with two Devices (database rows):</p>
<pre><code class="language-JSON">{
&quot;data&quot;: [
{
&quot;devMac&quot;: &quot;Internet&quot;,
&quot;devName&quot;: &quot;Net - Huawei&quot;,
&quot;devType&quot;: &quot;Router&quot;,
&quot;devVendor&quot;: null,
&quot;devGroup&quot;: &quot;Always on&quot;,
&quot;devFirstConnection&quot;: &quot;2021-01-01 00:00:00&quot;,
&quot;devLastConnection&quot;: &quot;2021-01-28 22:22:11&quot;,
&quot;devLastIP&quot;: &quot;192.168.1.24&quot;,
&quot;devStaticIP&quot;: 0,
&quot;devPresentLastScan&quot;: 1,
&quot;devLastNotification&quot;: &quot;2023-01-28 22:22:28.998715&quot;,
&quot;devIsNew&quot;: 0,
&quot;devParentMAC&quot;: &quot;&quot;,
&quot;devParentPort&quot;: &quot;&quot;,
&quot;devIcon&quot;: &quot;globe&quot;
},
{
&quot;devMac&quot;: &quot;a4:8f:ff:aa:ba:1f&quot;,
&quot;devName&quot;: &quot;Net - USG&quot;,
&quot;devType&quot;: &quot;Firewall&quot;,
&quot;devVendor&quot;: &quot;Ubiquiti Inc&quot;,
&quot;devGroup&quot;: &quot;&quot;,
&quot;devFirstConnection&quot;: &quot;2021-02-12 22:05:00&quot;,
&quot;devLastConnection&quot;: &quot;2021-07-17 15:40:00&quot;,
&quot;devLastIP&quot;: &quot;192.168.1.1&quot;,
&quot;devStaticIP&quot;: 1,
&quot;devPresentLastScan&quot;: 1,
&quot;devLastNotification&quot;: &quot;2021-07-17 15:40:10.667717&quot;,
&quot;devIsNew&quot;: 0,
&quot;devParentMAC&quot;: &quot;Internet&quot;,
&quot;devParentPort&quot;: 1,
&quot;devIcon&quot;: &quot;shield-halved&quot;
}
]
}
</code></pre>
<h2 id="api-endpoint-prometheus-exporter">API Endpoint: Prometheus Exporter</h2>
<ul>
<li><strong>Endpoint URL</strong>: <code>/metrics</code></li>
<li><strong>Host</strong>: (where NetAlertX exporter is running)</li>
<li><strong>Port</strong>: as configured in the <code>GRAPHQL_PORT</code> setting (<code>20212</code> by default)</li>
</ul>
<hr />
<h3 id="example-output-of-the-metrics-endpoint">Example Output of the <code>/metrics</code> Endpoint</h3>
<p>Below is a representative snippet of the metrics you may find when querying the <code>/metrics</code> endpoint for <code>netalertx</code>. It includes both aggregate counters and <code>device_status</code> labels per device.</p>
<pre><code>netalertx_connected_devices 31
netalertx_offline_devices 54
netalertx_down_devices 0
netalertx_new_devices 0
netalertx_archived_devices 31
netalertx_favorite_devices 2
netalertx_my_devices 54
netalertx_device_status{device=&quot;Net - Huawei&quot;, mac=&quot;Internet&quot;, ip=&quot;1111.111.111.111&quot;, vendor=&quot;None&quot;, first_connection=&quot;2021-01-01 00:00:00&quot;, last_connection=&quot;2025-08-04 17:57:00&quot;, dev_type=&quot;Router&quot;, device_status=&quot;Online&quot;} 1
netalertx_device_status{device=&quot;Net - USG&quot;, mac=&quot;74:ac:74:ac:74:ac&quot;, ip=&quot;192.168.1.1&quot;, vendor=&quot;Ubiquiti Networks Inc.&quot;, first_connection=&quot;2022-02-12 22:05:00&quot;, last_connection=&quot;2025-06-07 08:16:49&quot;, dev_type=&quot;Firewall&quot;, device_status=&quot;Archived&quot;} 1
netalertx_device_status{device=&quot;Raspberry Pi 4 LAN&quot;, mac=&quot;74:ac:74:ac:74:74&quot;, ip=&quot;192.168.1.9&quot;, vendor=&quot;Raspberry Pi Trading Ltd&quot;, first_connection=&quot;2022-02-12 22:05:00&quot;, last_connection=&quot;2025-08-04 17:57:00&quot;, dev_type=&quot;Singleboard Computer (SBC)&quot;, device_status=&quot;Online&quot;} 1
...
</code></pre>
<hr />
<h3 id="metrics-explanation">Metrics Explanation</h3>
<h4 id="1-aggregate-device-counts">1. Aggregate Device Counts</h4>
<p>Metric names prefixed with <code>netalertx_</code> provide aggregated counts by device status:</p>
<ul>
<li><code>netalertx_connected_devices</code>: number of devices currently connected</li>
<li><code>netalertx_offline_devices</code>: devices currently offline</li>
<li><code>netalertx_down_devices</code>: down/unreachable devices</li>
<li><code>netalertx_new_devices</code>: devices recently detected</li>
<li><code>netalertx_archived_devices</code>: archived devices</li>
<li><code>netalertx_favorite_devices</code>: user-marked favorite devices</li>
<li><code>netalertx_my_devices</code>: devices associated with the current user context</li>
</ul>
<p>These numeric values give a high-level overview of device distribution.</p>
<h4 id="2-perdevice-status-with-labels">2. PerDevice Status with Labels</h4>
<p>Each individual device is represented by a <code>netalertx_device_status</code> metric, with descriptive labels:</p>
<ul>
<li><code>device</code>: friendly name of the device</li>
<li><code>mac</code>: MAC address (or placeholder)</li>
<li><code>ip</code>: last recorded IP address</li>
<li><code>vendor</code>: manufacturer or "None" if unknown</li>
<li><code>first_connection</code>: timestamp when the device was first observed</li>
<li><code>last_connection</code>: most recent contact timestamp</li>
<li><code>dev_type</code>: device category or type</li>
<li><code>device_status</code>: current status (Online / Offline / Archived / Down / ...)</li>
</ul>
<p>The metric value is always <code>1</code> (indicating presence or active state) and the combination of labels identifies the device.</p>
<hr />
<h3 id="how-to-query-with-curl">How to Query with <code>curl</code></h3>
<p>To fetch the metrics from the NetAlertX exporter:</p>
<pre><code class="language-sh">curl 'http://&lt;server_ip&gt;:&lt;GRAPHQL_PORT&gt;/metrics' \
-H 'Authorization: Bearer &lt;API_TOKEN&gt;' \
-H 'Accept: text/plain'
</code></pre>
<p>Replace:</p>
<ul>
<li><code>&lt;server_ip&gt;</code>: IP or hostname of the NetAlertX server</li>
<li><code>&lt;GRAPHQL_PORT&gt;</code>: port specified in your <code>GRAPHQL_PORT</code> setting (default: <code>20212</code>)</li>
<li><code>&lt;API_TOKEN&gt;</code> your Bearer token from the <code>API_TOKEN</code> setting</li>
</ul>
<hr />
<h3 id="summary">Summary</h3>
<ul>
<li><strong>Endpoint</strong>: <code>/metrics</code> provides both summary counters and per-device status entries.</li>
<li><strong>Aggregate metrics</strong> help monitor overall device states.</li>
<li><strong>Detailed metrics</strong> expose each devices metadata via labels.</li>
<li><strong>Use case</strong>: feed into Prometheus for scraping, monitoring, alerting, or charting dashboard views.</li>
</ul>
<h3 id="prometheus-scraping-configuration">Prometheus Scraping Configuration</h3>
<pre><code class="language-yaml">scrape_configs:
- job_name: 'netalertx'
metrics_path: /metrics
scheme: http
scrape_interval: 60s
static_configs:
- targets: ['&lt;server_ip&gt;:&lt;GRAPHQL_PORT&gt;']
authorization:
type: Bearer
credentials: &lt;API_TOKEN&gt;
</code></pre>
<h3 id="grafana-template">Grafana template</h3>
<p>Grafana template sample: <a href="../samples/API/Grafana_Dashboard.json">Download json</a></p>
<h2 id="api-endpoint-log-files">API Endpoint: /log files</h2>
<p>This API endpoint retrieves files from the <code>/tmp/log</code> folder. </p>
<ul>
<li>Endpoint URL: <code>php/server/query_logs.php?file=&lt;file name&gt;</code></li>
<li>Host: <code>same as front end (web ui)</code></li>
<li>Port: <code>20211</code> or as defined by the $PORT docker environment variable (same as the port for the web ui)</li>
</ul>
<table>
<thead>
<tr>
<th>File</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>IP_changes.log</code></td>
<td>Logs of IP address changes</td>
</tr>
<tr>
<td><code>app.log</code></td>
<td>Main application log</td>
</tr>
<tr>
<td><code>app.php_errors.log</code></td>
<td>PHP error log</td>
</tr>
<tr>
<td><code>app_front.log</code></td>
<td>Frontend application log</td>
</tr>
<tr>
<td><code>app_nmap.log</code></td>
<td>Logs of Nmap scan results</td>
</tr>
<tr>
<td><code>db_is_locked.log</code></td>
<td>Logs when the database is locked</td>
</tr>
<tr>
<td><code>execution_queue.log</code></td>
<td>Logs of execution queue activities</td>
</tr>
<tr>
<td><code>plugins/</code></td>
<td>Directory for temporary plugin-related files (not accessible)</td>
</tr>
<tr>
<td><code>report_output.html</code></td>
<td>HTML report output</td>
</tr>
<tr>
<td><code>report_output.json</code></td>
<td>JSON format report output</td>
</tr>
<tr>
<td><code>report_output.txt</code></td>
<td>Text format report output</td>
</tr>
<tr>
<td><code>stderr.log</code></td>
<td>Logs of standard error output</td>
</tr>
<tr>
<td><code>stdout.log</code></td>
<td>Logs of standard output</td>
</tr>
</tbody>
</table>
<h2 id="api-endpoint-config-files">API Endpoint: /config files</h2>
<p>To retrieve files from the <code>/data/config</code> folder. </p>
<ul>
<li>Endpoint URL: <code>php/server/query_config.php?file=&lt;file name&gt;</code></li>
<li>Host: <code>same as front end (web ui)</code></li>
<li>Port: <code>20211</code> or as defined by the $PORT docker environment variable (same as the port for the web ui)</li>
</ul>
<table>
<thead>
<tr>
<th>File</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>devices.csv</code></td>
<td>Devices csv file</td>
</tr>
<tr>
<td><code>app.conf</code></td>
<td>Application config file</td>
</tr>
</tbody>
</table>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
Back to top
</button>
</main>
<footer class="md-footer">
<nav class="md-footer__inner md-grid" aria-label="Footer" >
<a href="../API_TESTS/" class="md-footer__link md-footer__link--prev" aria-label="Previous: Tests">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</div>
<div class="md-footer__title">
<span class="md-footer__direction">
Previous
</span>
<div class="md-ellipsis">
Tests
</div>
</div>
</a>
<a href="../WEBHOOK_SECRET/" class="md-footer__link md-footer__link--next" aria-label="Next: Webhook Secret">
<div class="md-footer__title">
<span class="md-footer__direction">
Next
</span>
<div class="md-ellipsis">
Webhook Secret
</div>
</div>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg>
</div>
</a>
</nav>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["announce.dismiss", "content.action.edit", "content.action.view", "content.code.annotate", "content.code.copy", "content.tooltips", "navigation.footer", "navigation.indexes", "navigation.sections", "navigation.tabs", "navigation.top", "navigation.tracking", "search.highlight", "search.share", "search.suggest", "toc.follow"], "search": "../assets/javascripts/workers/search.7a47a382.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
<script src="../assets/javascripts/bundle.e71a0d61.min.js"></script>
</body>
</html>