API Reference
Nokwatch exposes a REST API for jobs, history, notifications, and utilities. All endpoints return JSON.
Jobs
GET /api/jobs— List all jobs (optional?tag=name).POST /api/jobs— Create a job (JSON body with name, url, check_interval, match_type, match_pattern, match_condition, email_recipient, etc.; optionaljob_typefor plugin jobs).PUT /api/jobs/<id>— Update a job.DELETE /api/jobs/<id>— Delete a job.GET /api/jobs/<id>/history— Get check history for a job.GET /api/jobs/<id>/statistics— Get job statistics.POST /api/jobs/<id>/toggle— Toggle active/inactive.POST /api/jobs/<id>/run-check— Run a check now.GET /api/jobs/<id>/notification-channels— List notification channels for a job.POST /api/jobs/<id>/notification-channels— Add or replace notification channels (body: array ofchannel_type,config).DELETE /api/jobs/<id>/notification-channels/<channel_id>— Remove a channel.
Tags
GET /api/tags— List tags.POST /api/tags— Create a tag.
Templates and setup
GET /api/templates— List monitor templates.POST /api/wizard/analyze— Smart Setup analysis (body:url, optionalprompt).
Export and import
GET /api/export— Export all jobs as JSON (includes job_type and plugin columns).POST /api/import— Import jobs from JSON (body:{"jobs": [...]}; validates per job_type).
Other
GET /api/health— Health check.GET /api/statistics— Global statistics (optional?hours=24).POST /api/test-email— Send a test email (optional body:{"email": "addr"}).GET /api/modules— List available and installed plugins.POST /api/modules/install— Install a plugin.POST /api/modules/uninstall— Uninstall a plugin.POST /api/restart— Restart the app (if enabled).
Plugin APIs
When a plugin is installed, its API is available. For the Scanner plugin (nokwatch-scan):
GET /api/scan/jobs— List scan jobs.POST /api/scan/jobs— Create a scan job.GET /api/scan/jobs/<id>— Get a scan job.PUT /api/scan/jobs/<id>— Update a scan job.DELETE /api/scan/jobs/<id>— Delete a scan job.