Skip to content

Fix copilot-metrics.json to match real API shape and clarify Metrics vs Usage Metrics API#16

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-copilot-metrics-api
Draft

Fix copilot-metrics.json to match real API shape and clarify Metrics vs Usage Metrics API#16
Copilot wants to merge 2 commits intomainfrom
copilot/update-copilot-metrics-api

Conversation

Copy link

Copilot AI commented Mar 4, 2026

The copilot-metrics.json demo file contained fictional fields (suggestion_acceptance_rate, time_saved_per_month_hours, etc.) with invalid JSON comments — nothing matching what the actual API returns. Course materials also conflated the legacy Copilot Metrics API with the new Copilot Usage Metrics API and didn't address the common question of whether chat data is included.

copilot-metrics.json

Replaced with a valid JSON sample that mirrors the real GET /orgs/{org}/copilot/metrics response shape:

[{
  "date": "2026-03-03",
  "total_active_users": 37,
  "copilot_ide_code_completions": { ... },
  "copilot_ide_chat": { "_note": "YES, chat data is included...", "total_chats": 187, ... },
  "copilot_dotcom_chat": { "_note": "GitHub.com browser chat — absent from new Usage Metrics API", ... },
  "copilot_dotcom_pull_requests": { ... }
}]

_demo_note and _note fields serve as inline teaching annotations without requiring comment syntax.

COURSE_PLAN_MAR_2026.md

  • Replaced the single "Copilot Metrics API" bullet with a side-by-side breakdown of both APIs:
Legacy Metrics API Usage Metrics API
Endpoint /orgs/{org}/copilot/metrics /enterprises/{enterprise}/copilot/metrics/reports/
Status Deprecated April 2026 GA Feb 27, 2026
Response Inline JSON Signed URLs → NDJSON
GitHub.com chat copilot_dotcom_chat
Agent/Edit mode
  • Updated "What's New" table: Feb 27 entry now accurately describes the Usage Metrics API (not a vague "GA" note); added April 2026 deprecation row for the legacy endpoint.
  • Added a Teaching Notes entry with the explicit answer: the legacy Metrics API did return chat data (copilot_ide_chat + copilot_dotcom_chat); the new API covers IDE chat but drops GitHub.com browser chat.

README.md

Updated the segment 4 bullet to reference both APIs and the Feb 27 GA date.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… Usage API in course materials

Co-authored-by: timothywarner <12627911+timothywarner@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Copilot metrics API for usage insights Fix copilot-metrics.json to match real API shape and clarify Metrics vs Usage Metrics API Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants