{% extends "base.html" %} {% block title %}API Explorer — MeshCore Bot{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

API Explorer

All endpoints require the X-Requested-With: XMLHttpRequest header on state-changing requests. If authentication is enabled, include a valid session cookie (log in first).

{% set sections = [ ("System", "fa-heartbeat", [ ("GET", "/api/health", "Bot health: radio state, uptime, client count"), ("GET", "/api/banner-status", "Banner state: zombie, offline, initializing flags"), ("GET", "/api/system-health", "Extended system health: DB size, queue depths, scheduler"), ("GET", "/api/stats", "Bot-wide statistics: messages, commands, contacts"), ("GET", "/api/stats/rate_limiters", "Per-sender rate limiter stats"), ("GET", "/api/connected_clients","SocketIO connected client count"), ("GET", "/api/cache", "In-memory cache snapshot"), ("GET", "/api/database", "Database metadata: path, size, table row counts"), ("POST", "/api/optimize-database","Run VACUUM + ANALYZE on the SQLite database"), ]), ("Contacts", "fa-users", [ ("GET", "/api/contacts", "List all contacts with last-seen and position"), ("GET", "/api/export/contacts", "Export contacts as CSV"), ("POST", "/api/geocode-contact", "Reverse-geocode a contact's GPS position"), ("POST", "/api/toggle-star-contact", "Star or unstar a contact"), ("POST", "/api/delete-contact", "Delete a contact by node_id"), ("GET", "/api/contacts/purge-preview", "Preview which contacts would be purged"), ("POST", "/api/contacts/purge", "Purge stale contacts older than threshold"), ("POST", "/api/decode-path", "Decode a raw path string into node labels"), ]), ("Mesh Graph", "fa-project-diagram", [ ("GET", "/api/mesh/nodes", "All mesh nodes with position, SNR, hop count"), ("GET", "/api/mesh/edges", "All mesh edges with link quality metrics"), ("GET", "/api/mesh/stats", "Mesh topology summary: node/edge counts, diameter"), ("POST", "/api/mesh/resolve-path","Resolve a hop path to labelled node names"), ("GET", "/api/export/paths", "Export observed mesh paths as CSV"), ]), ("Channels", "fa-layer-group", [ ("GET", "/api/channels", "List configured channels"), ("POST", "/api/channels", "Add a new channel"), ("PUT", "/api/channels/{channel_idx}", "Update channel settings"), ("DELETE","/api/channels/{channel_idx}", "Remove a channel"), ("GET", "/api/channels/stats", "Per-channel message statistics"), ("GET", "/api/channels/{channel_idx}/feeds", "Feeds assigned to a channel"), ("POST", "/api/channels/validate", "Validate a channel key/name before saving"), ("GET", "/api/channel-operations/{op_id}", "Poll a pending channel operation result"), ]), ("Feeds", "fa-rss", [ ("GET", "/api/feeds", "List all configured feeds"), ("POST", "/api/feeds", "Create a new feed"), ("GET", "/api/feeds/{feed_id}", "Get feed details"), ("PUT", "/api/feeds/{feed_id}", "Update feed configuration"), ("DELETE","/api/feeds/{feed_id}", "Delete a feed"), ("GET", "/api/feeds/default-format", "Get default message format string"), ("POST", "/api/feeds/preview", "Preview a feed format with sample data"), ("POST", "/api/feeds/test", "Test-fetch a feed URL and return items"), ("GET", "/api/feeds/stats", "Aggregate feed delivery statistics"), ("GET", "/api/feeds/{feed_id}/activity","Recent delivery activity for a feed"), ("GET", "/api/feeds/{feed_id}/errors", "Recent errors for a feed"), ("POST", "/api/feeds/{feed_id}/refresh","Force an immediate feed refresh"), ]), ("Radio", "fa-broadcast-tower", [ ("GET", "/api/radio/status", "Radio connection status and metadata"), ("POST", "/api/radio/reboot", "Send reboot command to the radio"), ("POST", "/api/radio/connect", "Trigger a radio reconnect"), ("POST", "/api/radio/firmware/config/read", "Read firmware config from radio"), ("POST", "/api/radio/firmware/config/write","Write firmware config to radio"), ("GET", "/api/recent_commands", "Most recent bot commands received"), ("POST", "/api/stream_data", "Inject a raw packet into the stream viewer"), ]), ("Admin", "fa-shield-alt", [ ("POST", "/api/admin/zombie-recover", "Clear zombie state and force radio reconnect"), ("POST", "/api/admin/radio-offline-clear","Clear radio-offline flag and resume sends"), ("GET", "/api/config/radio-debug", "Get radio debug logging state"), ("POST", "/api/config/radio-debug", "Enable or disable radio debug logging"), ]), ("Maintenance", "fa-tools", [ ("GET", "/api/maintenance/status", "Last maintenance run time and outcomes"), ("POST", "/api/maintenance/backup_now","Trigger an immediate database backup"), ("POST", "/api/maintenance/restore", "Restore database from a backup file"), ("GET", "/api/maintenance/list_backups","List available backup files"), ("POST", "/api/maintenance/purge", "Purge backup files older than retention limit"), ("GET", "/api/config/maintenance", "Get maintenance schedule config"), ("POST", "/api/config/maintenance", "Update maintenance schedule config"), ]), ("Config", "fa-cog", [ ("GET", "/api/config/notifications", "Get notification settings"), ("POST", "/api/config/notifications", "Update notification settings"), ("POST", "/api/config/notifications/test", "Send a test notification"), ("GET", "/api/config/logging", "Get log level configuration"), ("POST", "/api/config/logging", "Update log level configuration"), ("GET", "/api/config/zombie-alert", "Get zombie-alert thresholds"), ("POST", "/api/config/zombie-alert", "Update zombie-alert thresholds"), ("GET", "/api/config/radio-debug", "Get radio debug logging setting"), ("POST", "/api/config/radio-debug", "Update radio debug logging setting"), ("GET", "/api/config/radio-probe", "Get radio probe settings"), ("POST", "/api/config/radio-probe", "Update radio probe settings"), ("GET", "/api/config/radio-offline-alert","Get radio offline alert settings"), ("POST", "/api/config/radio-offline-alert","Update radio offline alert settings"), ]), ("Greeter", "fa-hand-sparkles", [ ("GET", "/api/greeter", "Greeter configuration and rollout state"), ("POST", "/api/greeter/end-rollout", "End active greeter rollout"), ("POST", "/api/greeter/ungreet", "Remove a node from the greeted list"), ]), ] %} {% for section_name, icon, endpoints in sections %}
{{ section_name }} {{ endpoints|length }}
{% for method, path, desc in endpoints %} {% endfor %}
Method Path Description
{{ method }} {{ path }} {{ desc }}
{% endfor %}
{% endblock %} {% block extra_js %} {% endblock %}