Last activity and unacknowledged error counts per workflow
GET/api/workflow_activity
Backs the monitor grid's "Last activity" and "Errors" columns.
The runtime reports what a node is doing, not what it has done - it holds no history, so neither figure can come from the live status feed. Both are read from the archived log instead, which is the only record of when a workflow last passed a message and how often it has failed.
Error counts are all-time, then reduced by whatever has been acknowledged from the monitor page's "Clear errors" action. There is no rolling time window: a workflow that has been failing for a week and never acknowledged should keep saying so, not have old failures quietly age out.
Kept out of /workflow_list, which the page polls every few seconds: these aggregates cost a database read (and, when anything has been acknowledged, a second one) that the workflow list itself doesn't, and a stale-by-a-few-seconds activity time is not worth paying that often.
An unreadable log database (no archiver has ever run, or the database is down) is answered with available=false rather than an error: the column is a nicety on a page whose main job - showing what is running - does not depend on it.
Records are project contents, so projects the caller is not on contribute nothing here. Only counts and timestamps leave this endpoint, never message content, which is why it isn't gated on the View log messages permission the way the log reads themselves are.
Responses
- 200
Successful Response