Skip to content

Handling of the new Copilot Metrics Endpoints #4136

@Roemer

Description

@Roemer

As the existing endpoints were closed down on 2. April 2026 (https://docs.github.com/en/enterprise-cloud@latest/rest/copilot/copilot-metrics?apiVersion=2022-11-28), only the new endpoints (https://docs.github.com/en/enterprise-cloud@latest/rest/copilot/copilot-usage-metrics?apiVersion=2022-11-28) are usable now.

The following methods do not work anymore:

client.Copilot.GetEnterpriseMetrics()
client.Copilot.GetEnterpriseTeamMetrics()
client.Copilot.GetOrganizationMetrics()
client.Copilot.GetOrganizationTeamMetrics()

they are replaced with the following:

client.Copilot.GetEnterpriseDailyMetricsReport()
client.Copilot.GetEnterpriseMetricsReport()
client.Copilot.GetEnterpriseUsersDailyMetricsReport()
client.Copilot.GetEnterpriseUsersMetricsReport()
client.Copilot.GetOrganizationDailyMetricsReport()
client.Copilot.GetOrganizationMetricsReport()
client.Copilot.GetOrganizationUsersDailyMetricsReport()
client.Copilot.GetOrganizationUsersMetricsReport()

Now all those new endpoints do not directly return typed data as the removed ones do. They instead return a list of links to json files with the concrete data. I think it would be usefull to either include some helper methods to download the json files and return typed data from them or directly download those files in the main method (eg. Copilot.GetEnterpriseDailyMetricsReport) and only return the typed data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions