GET /upcoming
Everything Switchboard will start on its own, grouped by when, plus how the recent ones ended.
Details #
Answers {"items": […], "finished": […]}. items merges the waiting runs (scheduled, later, and condition for one that waits only for a condition) with the next three times, within seven days, of every time, cron and periodic trigger of an enabled macro (trigger), in the order Upcoming shows them: now, today, tomorrow, thisWeek, later, waiting.
An item has id, kind, macroId, macroName, at, display ("Tue, Nov 3, 9:00 AM · in 14 h"), group, detail ("Later: turn Focus off"), source ("from ⌥Space", "Claude", "Every weekday at 9:00"), badges, pendingId (for the run actions), triggerKey (with at, for Skip This One), skipping, zoneNote and snapshotNote.
finished is the last 10 runs that ended, newest first, with outcome: Ran, Ran 2 h late, Skipped, Skipped, 2 h late, Cancelled, Replaced or Expired.
curl -s -H "Authorization: Bearer $TOKEN" http://127.0.0.1:48080/upcoming
Parameters #
curl --unix-socket "$SWITCHBOARD_HOME/engine.sock" -X GET http://localhost/upcoming
Everything Switchboard will start on its own, grouped by when, and what finished lately. The Unix socket needs no token; loopback 127.0.0.1:48080 needs Authorization: Bearer <api-token>.