Add ai_credits_used and update API schema output#44994
Conversation
|
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
There was a problem hiding this comment.
Pull request overview
Updates the Copilot usage metrics API documentation to better match the actual API response schema, including newly announced ai_credits_used and removing fields that appear only in UI export formats.
Changes:
- Add
ai_credits_usedto the per-user report fields documentation. - Update the example schema to include
ai_adoption_phaseand agent-related usage fields, and remove export-only partition/ETL fields. - Clean up enterprise-level schema examples to omit non-API fields.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| content/copilot/reference/copilot-usage-metrics/copilot-usage-metrics.md | Documents the new ai_credits_used field, but currently duplicates agent-related field rows (needs cleanup). |
| content/copilot/reference/copilot-usage-metrics/example-schema.md | Updates the example API response schema to better reflect real API output and removes non-API export fields. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Why:
This PR updates the API output documentation to include new columns announced in https://github.blog/changelog/2026-06-19-ai-credits-consumed-per-user-now-in-the-copilot-usage-metrics-api/ and also other columns that exist when comparing with real examples.
Additionally, example API schema is showing outputs that are not similar to real examples. Columns like
etl_id,day_partition, andentity_id_partitiononly exists when exporting data through the web UI download link which is exported into NDJSON data, but the API output does not provide these columns. Since the title of the documentation is "example schema of the data returned by the Copilot usage metrics API", I believe this change should help accurately reflect the actual output of the data.Closes: #44908
What's being changed (if available, include any code snippets, screenshots, or gifs):
In https://docs.github.com/en/copilot/reference/copilot-usage-metrics/copilot-usage-metrics#per-user-report-fields
In https://docs.github.com/en/copilot/reference/copilot-usage-metrics/example-schema
Check off the following: