with one click
api-development
// Develop and extend NetAlertX REST API endpoints. Use this when asked to create endpoint, add API route, implement API, or modify API responses.
// Develop and extend NetAlertX REST API endpoints. Use this when asked to create endpoint, add API route, implement API, or modify API responses.
NetAlertX coding standards and conventions. Use this when writing code, reviewing code, or implementing features.
Manage NetAlertX configuration settings. Use this when asked to add setting, read config, get_setting_value, ccd, or configure options.
Guide for identifying, managing, and running commands within the NetAlertX development container. Use this when asked to run commands, testing, setup scripts, or troubleshoot container issues.
Enables live interaction with the NetAlertX runtime. This skill configures the Model Context Protocol (MCP) connection, granting full API access for debugging, troubleshooting, and real-time operations including database queries, network scans, and device management.
Enables live interaction with the NetAlertX runtime. This skill configures the Model Context Protocol (MCP) connection, granting full API access for debugging, troubleshooting, and real-time operations including database queries, network scans, and device management.
Read before running tests. Detailed instructions for single, standard unit tests (fast), full suites (slow), handling authentication, and obtaining the API Token. Tests must be run when a job is complete.
| name | api-development |
| description | Develop and extend NetAlertX REST API endpoints. Use this when asked to create endpoint, add API route, implement API, or modify API responses. |
Flask app: server/api_server/api_server_start.py
/device/<mac> - Single device operations/devices - Device list/devices/export/{csv,json} - Export devices/devices/import - Import devices/devices/totals - Device counts/devices/by-status - Devices grouped by status/nettools - Network utilities/events - Event log/sessions - Session management/dbquery - Database queries/metrics - Prometheus metrics/sync - SynchronizationAll routes require header:
Authorization: Bearer <API_TOKEN>
Retrieve token via get_setting_value('API_TOKEN').
MANDATORY: All responses must include "success": true|false
return {"success": False, "error": "Description of what went wrong"}
On success:
return {"success": True, "data": result}
return {"success": False, "error": "Description of what went wrong"}
On success:
return {"success": True, "data": result}
Exception: The legacy /device/<mac> GET endpoint does not follow this contract to maintain backward compatibility with the UI.
server/api_server/ directory