## GetCoAuthorSummary **post** `/gitpod.v1.UsageService/GetCoAuthorSummary` Gets aggregated co-author summary for the organization or a specific project. Use this method to: - Measure AI-assisted commits and line changes - Scope co-author insights to a project, user, or team - Compare the requested date range against the previous period ### Example ```yaml dateRange: startTime: "2024-01-01T00:00:00Z" endTime: "2024-02-01T00:00:00Z" projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Body Parameters - `dateRange: DateRange` Date range to query within. - `endTime: string` End time of the date range (exclusive). - `startTime: string` Start time of the date range (inclusive). - `projectId: optional string` Optional project ID to scope results. - `teamId: optional string` Optional team ID to scope results to a specific team. Mutually exclusive with user_id. - `userId: optional string` Optional user ID to scope results to a specific user. Mutually exclusive with team_id. ### Returns - `sparkline: optional array of TimeSeriesPoint` Sparkline data for card rendering. - `time: optional string` Timestamp for this data point. - `value: optional number` The numerical value for this data point. - `summary: optional CoAuthorSummary` Summary totals and trends for the requested date range. - `byTool: optional array of ToolBreakdown` Per-tool breakdown of contribution stats. - `commits: optional string` Number of commits attributed to this tool. - `distinctAuthors: optional string` Distinct authors who used this tool. - `linesAdded: optional string` Lines added by this tool. - `linesRemoved: optional string` Lines removed by this tool. - `tool: optional CoAuthorTool` The tool these stats are for. - `"CO_AUTHOR_TOOL_UNSPECIFIED"` - `"CO_AUTHOR_TOOL_NO_COAUTHOR"` - `"CO_AUTHOR_TOOL_HUMAN_COAUTHOR"` - `"CO_AUTHOR_TOOL_ONA"` - `"CO_AUTHOR_TOOL_GITHUB_COPILOT"` - `"CO_AUTHOR_TOOL_CURSOR"` - `"CO_AUTHOR_TOOL_OTHER"` - `"CO_AUTHOR_TOOL_CLAUDE"` - `"CO_AUTHOR_TOOL_CODEX"` - `distinctAuthors: optional string` Number of distinct authors (by author_hash). - `distinctAuthorsTrend: optional number` Fractional change in distinct_authors compared to the previous period. - `totalCommits: optional string` Total number of commits in the date range. - `totalCommitsTrend: optional number` Fractional change in total_commits compared to the previous period of equal length. Computed as (current - previous) / previous. Zero when there is no previous data. - `totalLinesAdded: optional string` Total lines added across all commits. - `totalLinesAddedTrend: optional number` Fractional change in total_lines_added compared to the previous period. - `totalLinesRemoved: optional string` Total lines removed across all commits. - `totalLinesRemovedTrend: optional number` Fractional change in total_lines_removed compared to the previous period. ### Example ```http curl https://app.gitpod.io/api/gitpod.v1.UsageService/GetCoAuthorSummary \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $GITPOD_API_KEY" \ -d '{ "dateRange": { "endTime": "2024-02-01T00:00:00Z", "startTime": "2024-01-01T00:00:00Z" } }' ``` #### Response ```json { "sparkline": [ { "time": "2019-12-27T18:11:19.117Z", "value": 0 } ], "summary": { "byTool": [ { "commits": "commits", "distinctAuthors": "distinctAuthors", "linesAdded": "linesAdded", "linesRemoved": "linesRemoved", "tool": "CO_AUTHOR_TOOL_UNSPECIFIED" } ], "distinctAuthors": "distinctAuthors", "distinctAuthorsTrend": 0, "totalCommits": "totalCommits", "totalCommitsTrend": 0, "totalLinesAdded": "totalLinesAdded", "totalLinesAddedTrend": 0, "totalLinesRemoved": "totalLinesRemoved", "totalLinesRemovedTrend": 0 } } ```