platform

Count Open Action Items

Changed on

How many of the caller's OWN open cards are one of kinds -- the number behind the Today nav's red dot (issue #7899, item OI-ISSUES-12; Frederick, 2026-10-14: "there needs to be a notification when there is a return parcel to work in today page and red dot").

A COUNT, ON PURPOSE, rather than the caller filtering GET /action-items in the browser: the sidebar renders on every page and re-reads on every action_item event, so pulling every open card (with its body) just to know whether one is open would be a page load's worth of data in the menu. It also deliberately does not go through that route's own-feed branch, which ensures/settles the caller's profile card on the way past -- a menu dot must read and write nothing.

The feed rules (assigned + pooled work held through a role) are action_items.count_open_for_principal's own docstring; it is the same two reads the list endpoint's "my Today" merge uses. Only the caller's own cards are ever counted.

kinds is OPTIONAL and empty counts zero, deliberately: a required query param makes tests/test_route_auth_gating.py's anonymous probe answer 422 on the missing param before the session check can 401, and this route is gated like every other one. A caller that names no kind is asking for nothing, which is exactly what it gets.

get/api/platform/action-items/open-by-kind

Request

  • Base URL
    https://api.pigeonly.com (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Query parameters

kinds, string

Comma-separated action item kinds to count. Empty counts zero.

Response

Successful Response

object required

Changes