Portfolios
Cross-project views computed from live rows: health rollups, gantt ordering, at-risk milestones, dependency alerts, and drafted status updates.
Auth: all calls require a Bearer JWT plus the X-Workspace-Id header.
/api/portfolios/healthAuth requiredPer-project rollup: open and blocked issues, overdue work, stored health, and status dot.
Response
[
{
"project_id": 5,
"name": "Onboarding v2",
"total": 12,
"open": 5,
"blocked": 1,
"overdue": 2,
"health": "On track",
"dot": "g"
}
]/api/portfolios/ganttAuth requiredProject tasks with dependency-aware ordering. earliest_start is the task's depth in the dependency graph (0 = nothing blocks it).
Query Parameters
| Field | Type | Required | Note |
|---|---|---|---|
| project_id | number | No | Restrict to one project |
Response
[
{
"id": 9,
"project_id": 5,
"title": "Draft launch email",
"due": "2026-04-05",
"done": false,
"position": 0,
"earliest_start": 1,
"blocked": true,
"blocked_by": [8]
}
]/api/portfolios/milestones/at-riskAuth requiredUndone milestones past due or due within 3 days, with blocking cards.
Query Parameters
| Field | Type | Required | Note |
|---|---|---|---|
| limit | number | No | Default 50, max 200 |
Response
[
{
"milestone_id": 2,
"project_id": 5,
"project_name": "Onboarding v2",
"name": "Beta cut",
"date": "2026-04-10",
"overdue": false,
"blocking_cards": [
{ "task_id": 9, "title": "Draft launch email", "project_id": 5, "due": "2026-04-05", "reason": "due soon" }
]
}
]Dependencies
/api/portfolios/depsAuth requiredList task dependencies with titles and cross-project flags.
Query Parameters
| Field | Type | Required | Note |
|---|---|---|---|
| task_id | number | No | — |
| project_id | number | No | Matches either side of the dep |
| limit | number | No | Default 100, max 300 |
Response
[
{
"id": 1,
"workspace_id": 1,
"task_id": 9,
"task_title": "Draft launch email",
"task_project_id": 5,
"depends_on_task_id": 8,
"depends_on_title": "Finalize copy",
"depends_on_project_id": 5,
"cross_project": false,
"created_at": "2026-03-28T10:00:00Z"
}
]/api/portfolios/depsAuth requiredCreate a task dependency. Both tasks must exist in the workspace; a task cannot depend on itself.
Request Body
| Field | Type | Required | Note |
|---|---|---|---|
| task_id | number | Yes | The blocked task |
| depends_on_task_id | number | Yes | The blocker task |
Response
{
"id": 2,
"workspace_id": 1,
"task_id": 10,
"task_title": "Record demo video",
"depends_on_task_id": 9,
"depends_on_title": "Draft launch email",
"cross_project": false,
"created_at": "2026-03-28T14:00:00Z"
}/api/portfolios/deps/{dep_id}Auth requiredDelete a task dependency.
Response
{ "deleted": 2 }/api/portfolios/alerts/dependenciesAuth requiredUndone tasks whose dependencies are still undone. Computed fresh on every call.
Query Parameters
| Field | Type | Required | Note |
|---|---|---|---|
| limit | number | No | Default 50, max 200 |
Response
[
{
"task_id": 9,
"title": "Draft launch email",
"project_id": 5,
"project_name": "Onboarding v2",
"blocked_by": [{ "task_id": 8, "title": "Finalize copy" }]
}
]Status Drafts
/api/portfolios/projects/{project_id}/status/draftAuth requiredDraft a status update from live project data (progress, milestones, open P0/P1 issues) and keep it for the trail.
Response
{
"id": 1,
"workspace_id": 1,
"project_id": 5,
"body": "Onboarding v2 is 60% complete (doing). Milestones: 2 of 4 done. Needs attention: ISS-4821 Checkout fix.",
"citations": [
{ "kind": "milestone", "ref": "Beta cut", "label": "Beta cut (open)" },
{ "kind": "issue", "ref": "ISS-4821", "label": "ISS-4821 Checkout fix" }
],
"created_at": "2026-03-28T14:00:00Z"
}/api/portfolios/projects/{project_id}/status/draftsAuth requiredList kept status drafts for a project, newest first.
Response
[
{
"id": 1,
"workspace_id": 1,
"project_id": 5,
"body": "Onboarding v2 is 60% complete (doing). ...",
"citations": [ ... ],
"created_at": "2026-03-28T14:00:00Z"
}
]