Dawny33
(Jalem Raj Rohit)
August 13, 2025, 7:27am
1
I am trying to use the cursor admin API (endpoint: /teams/daily-usage-data) for understanding cursor usage of the devs in my org.
I am using the following metrics for this:
Total Lines suggested = totalLinesAdded + totalLinesDeleted + totalTabsShown
Total Lines accepted = acceptedLinesAdded + acceptedLinesDeleted + totalTabsAccepted
Acceptance % = Total Lines accepted/Total Lines suggested
However, I see that Total Lines accepted is greater than Total Lines suggested for most of my devs. This seems wrong.
Am I doing something wrong?
1 Like
condor
(Condor (Tee))
August 13, 2025, 8:51am
2
hi @Dawny33 and welcome to Cursor Forum.
Based on the Admin API documentation, tabs and lines are different types of metrics incorrectly.
The problem: totalTabsShown and totalTabsAccepted are specifically for tab completions (autocomplete suggestions), while totalLinesAdded/Deleted and acceptedLinesAdded/Deleted are for code edits (from chat/composer features).
Correct approach:
For tab completions only:
Total suggested = totalTabsShown
Total accepted = totalTabsAccepted
Acceptance % = totalTabsAccepted / totalTabsShown
For code edits only:
Total suggested = totalLinesAdded + totalLinesDeleted
Total accepted = acceptedLinesAdded + acceptedLinesDeleted
Acceptance % = (acceptedLinesAdded + acceptedLinesDeleted) / (totalLinesAdded + totalLinesDeleted)
Dawny33
(Jalem Raj Rohit)
August 13, 2025, 9:10am
3
I was trying with a similar calculation. However, I see quite a lot of cases where acceptedLinesAdded > totalLinesAdded
One such example for one of my devs:
{
"date": 1754524800000,
"userId": "<redacted>",
"email": "<redacted>",
"isActive": true,
"totalLinesAdded": 0,
"totalLinesDeleted": 0,
"acceptedLinesAdded": 1349,
"acceptedLinesDeleted": 0,
"totalApplies": 5,
"totalAccepts": 5,
"totalRejects": 0,
"totalTabsShown": 107,
"totalTabsAccepted": 31,
"composerRequests": 0,
"chatRequests": 8,
"agentRequests": 2,
"cmdkUsages": 0,
"subscriptionIncludedReqs": 10,
"apiKeyReqs": 0,
"usageBasedReqs": 0,
"bugbotUsages": 0,
"mostUsedModel": "claude-4-sonnet",
"tabMostUsedExtension": "py"
},
When calculating overall (sum) numbers for my devs, too, the acceptedLinesAdded seems to be more than totalLinesAdded, which make my acceptance % > 100%.
condor
(Condor (Tee))
August 13, 2025, 11:39am
4
@Dawny33 I verified what we actually show there. Overall they are two different counts that are not comparable.
acceptedLinesAdded counts all accepted lines including:
Fully accepted suggestions
Partially accepted suggestions
Lines that may have been later modified or deleted
totalLinesAdded come from git commit metrics.
Dawny33
(Jalem Raj Rohit)
August 13, 2025, 11:55am
5
Noted. So, is there no way I can check the acceptance rate of my team via the metrics I get from this API?
condor
(Condor (Tee))
August 18, 2025, 9:09am
6
Acceptance rate is totalAccepts vs totalRejects.
We have now also a AI Code Tracking API
@condor does this AI Code Tracking API work with Gitlab repositories?
condor
(Condor (Tee))
August 27, 2025, 4:54pm
8
hi @benzkpko the new tracking does use the local IDE instead of remote git repos. So it can work independent of the type of git hosting provider.