Skip to main content

Project Stats

GET /api/projects/:projectId/stats
Returns aggregate statistics for a project.
{
  "statusCounts": {
    "backlog": 5,
    "in_progress": 2,
    "testing": 1,
    "done": 12
  },
  "typeCounts": {
    "feature": 8,
    "bugfix": 5,
    "refactor": 3,
    "docs": 2,
    "test": 1,
    "chore": 1
  },
  "priorityCounts": {
    "0": 3,
    "1": 10,
    "2": 5,
    "3": 2
  },
  "totalTasks": 20,
  "avgDuration": 845000,
  "completedToday": 3
}
FieldDescription
statusCountsTasks per status column
typeCountsTasks per type
priorityCountsTasks per priority level
totalTasksTotal task count
avgDurationAverage completion time in milliseconds
completedTodayTasks moved to Done today

Activity Feed

GET /api/projects/:projectId/activity
Returns recent task events in chronological order. Useful for building a project timeline.
[
  {
    "taskId": 5,
    "taskTitle": "Add login page",
    "event": "status_change",
    "from": "in_progress",
    "to": "testing",
    "timestamp": "2025-01-15T14:30:00Z"
  }
]

Claude Usage

GET /api/projects/:projectId/claude-usage
Returns aggregated Claude API usage across all tasks.
{
  "totalInputTokens": 125000,
  "totalOutputTokens": 48000,
  "totalCacheRead": 30000,
  "totalCacheCreation": 15000,
  "totalCost": 12.50,
  "byModel": {
    "sonnet": { "tasks": 10, "inputTokens": 80000, "outputTokens": 30000, "cost": 5.20 },
    "opus": { "tasks": 3, "inputTokens": 40000, "outputTokens": 15000, "cost": 6.80 },
    "haiku": { "tasks": 7, "inputTokens": 5000, "outputTokens": 3000, "cost": 0.50 }
  }
}
Cost estimates are calculated from published Claude API pricing. Actual costs may vary based on your billing plan.