-
Notifications
You must be signed in to change notification settings - Fork 28
API Quick Reference
This page provides a practical reference for the main Nutify APIs. It is written for operators, integrators, and contributors who need fast endpoint orientation.
Nutify provides a dynamic API explorer page:
/api
It is generated from runtime route introspection. Use it as the canonical live catalog for your running instance.
Additional runtime catalog endpoint used by the frontend explorer:
GET /api/frontend/catalog
Important:
-
/api/frontend/catalogrequires an authenticated session. -
/apiis the UI entry for the explorer, but catalog data is served through the authenticated endpoint above.
API explorer classifies routes by access type:
publicsessionadminpermissiontoken
Use this classification before integrating automations.
Current hardening posture:
-
public: minimal bootstrap endpoints only. -
token: callback endpoints that requireX-Nutify-Token. -
session: authenticated user required. -
admin: authenticated admin required for sensitive/mutating APIs.
GET /api/frontend/bootstrap
Used by frontend to resolve:
- auth status
- setup/full mode
- target context
- profile context
- tab visibility
POST /api/nut_event
Requires:
-
X-Nutify-Tokenheader
GET /api/multi-nut/stateGET /api/multi-nut/overview
GET /api/multi-nut/targetsPOST /api/multi-nut/targetsPUT /api/multi-nut/targets/<id>DELETE /api/multi-nut/targets/<id>POST /api/multi-nut/targets/<id>/togglePOST /api/multi-nut/targets/<id>/primaryPOST /api/multi-nut/targets/<id>/poll-now
GET /api/multi-nut/active-targetPOST /api/multi-nut/active-targetDELETE /api/multi-nut/active-target
GET /api/multi-nut/targets/<id>/dashboardGET /api/multi-nut/targets/<id>/history
GET /api/multi-nut/report
Access:
- generally
session - mutating routes may require
admindepending on route policy and centralized guard
Setup flow APIs under nut_config:
POST /nut_config/api/setup/test-targetPOST /nut_config/api/setup/test-configurationPOST /nut_config/api/setup/generate-previewPOST /nut_config/api/setup/save-config
Use case:
- validation and configuration persistence during wizard completion
Access behavior:
- available during first-time setup bootstrap
- once login is configured, they are protected by session/admin policy
GET /api/settings/variablesPOST /api/settings/variablesGET /api/settings/operationsPOST /api/settings/operationsGET /api/options/variable-config
Operational note:
- values may be target-scoped depending on active target and endpoint behavior
GET /api/nut/statusPOST /api/nut/startPOST /api/nut/stopPOST /api/nut/restart
Use carefully in production.
Access:
admin
GET/POST/DELETE /api/ntfy/*GET/POST/DELETE /api/telegram/*GET/POST/DELETE /api/webhook/*- Mail settings routes under
/api/settings/mail*
These are admin-protected and should not be exposed without session control.
GET /api/multi-nut/renamer/catalogPOST /api/multi-nut/renamer/mappings
Use for canonical variable mapping across heterogeneous UPS payloads.
Many target-aware APIs resolve context in this order:
- explicit
target_idoverride in request - session active target
- primary enabled target fallback
For deterministic integrations, pass explicit target_id when needed.
For GET /api/multi-nut/report, common query params:
scope=selected|all-
target_id=<id>(whenscope=selected) hours=<window>download=true
curl -sS -b cookie.txt "http://127.0.0.1:5050/api/multi-nut/state"curl -sS -b cookie.txt "http://127.0.0.1:5050/api/multi-nut/targets"curl -sS -b cookie.txt -X POST "http://127.0.0.1:5050/api/multi-nut/targets/2/poll-now"curl -sS -b cookie.txt "http://127.0.0.1:5050/api/multi-nut/report?scope=selected&target_id=2&hours=24"curl -sS -X POST "http://127.0.0.1:5050/api/nut_event" \
-H "Content-Type: application/json" \
-H "X-Nutify-Token: <YOUR_TOKEN>" \
-d '{"ups":"ups@localhost","event":"ONBATT"}'Before integrating API automation:
- verify route access type (
public/session/admin/permission/token) - validate target context behavior (
target_idvs session) - test in staging profile first
- capture error payloads in logs
- avoid destructive actions without operator confirmation