GET /notifications
Where the notification trigger reads from, which apps have notified lately, and how many of the last day's notifications a trigger would match.
Details #
The editor's Notification trigger form asks this to fill its App popup and the line "12 notifications from Slack today would have matched". The engine reads the Notification Center store, so it needs Full Disk Access; without it source is banners and apps is empty.
curl -s -H "Authorization: Bearer $TOKEN" "http://127.0.0.1:48080/notifications?app=com.tinyspeck.slackmacgap&body=mentioned"
{ "source": "database", "apps": [ { "app": "com.tinyspeck.slackmacgap", "name": "Slack", "count": 41 } ], "today": 18, "matched": 12 }
sourceisdatabase(every notification, silenced ones too),banners(banners only) ornone.reasonandnotesay why when it is notdatabase.appsare the apps that notified in the last seven days, most active first.todayandmatchedappear when the query hasapp,titleorbody: the notifications of the last 24 hours, and how many of them the trigger would have started a macro for.mode(contains, equals, regex, glob) andcaseSensitive=truealso apply.
Parameters #
curl --unix-socket "$SWITCHBOARD_HOME/engine.sock" -X GET http://localhost/notifications
Where the notification trigger reads from, the apps that have notified, and how many of today's notifications a trigger would match. The Unix socket needs no token; loopback 127.0.0.1:48080 needs Authorization: Bearer <api-token>.