Browse the docs

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 }
  • source is database (every notification, silenced ones too), banners (banners only) or none. reason and note say why when it is not database.

  • apps are the apps that notified in the last seven days, most active first.

  • today and matched appear when the query has app, title or body: 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) and caseSensitive=true also 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>.

See also #