Skip to main content

copilot_usage_metrics

Creates, updates, deletes, gets or lists a copilot_usage_metrics resource.

Overview

Namecopilot_usage_metrics
TypeResource
Idgithub.copilot.copilot_usage_metrics

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
download_linksarrayThe URLs to download the latest Copilot usage metrics report for the enterprise/organization.
report_end_daystring (date)The end date of the report period in YYYY-MM-DD format.
report_start_daystring (date)The start date of the report period in YYYY-MM-DD format.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
copilot_enterprise_usage_metricsselectenterpriseUse this endpoint to retrieve download links for the latest 28-day enterprise Copilot usage metrics report. The report provides comprehensive usage data for Copilot features across the enterprise.

The report contains aggregated metrics for the previous 28 days, including usage statistics for various Copilot features, user engagement data, and feature adoption metrics. Reports are generated daily and made available for download through signed URLs with a limited expiration time.

The response includes download links to the report files, along with the specific date range covered by the report. The report covers a complete 28-day period ending on the most recent day for which data has been processed.

Enterprise owners, billing managers, and authorized users with fine-grained "View Enterprise Copilot Metrics" permission can retrieve Copilot metrics reports for the enterprise. OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:enterprise scopes to use this endpoint.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
enterprisestringThe slug version of the enterprise name.

SELECT examples

Use this endpoint to retrieve download links for the latest 28-day enterprise Copilot usage metrics report. The report provides comprehensive usage data for Copilot features across the enterprise.

The report contains aggregated metrics for the previous 28 days, including usage statistics for various Copilot features, user engagement data, and feature adoption metrics. Reports are generated daily and made available for download through signed URLs with a limited expiration time.

The response includes download links to the report files, along with the specific date range covered by the report. The report covers a complete 28-day period ending on the most recent day for which data has been processed.

Enterprise owners, billing managers, and authorized users with fine-grained "View Enterprise Copilot Metrics" permission can retrieve Copilot metrics reports for the enterprise. OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:enterprise scopes to use this endpoint.

SELECT
download_links,
report_end_day,
report_start_day
FROM github.copilot.copilot_usage_metrics
WHERE enterprise = '{{ enterprise }}' -- required
;