Skip to main content

This version of GitHub Enterprise Server will be discontinued on 2026-08-25. Discontinued releases are not supported. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features in GitHub Enterprise Server, see Overview of the upgrade process. For help with the upgrade, GitHub Enterprise Support.

Requesting Server Statistics using the REST API

You can use your own tools to analyze your GitHub Enterprise Server usage over time by requesting the Server Statistics metrics collected using the REST API.

You can request up to 365 days of metrics in a single Server Statistics REST API request. This data, which includes aggregate metrics on repositories, issues, and pull requests, can help you anticipate the needs of your organization, understand how your team works, and show the value you get from GitHub Enterprise Server. For a list of the metrics collected, see About Server Statistics.

Before you can use the Server Statistics REST API, you must enable Server Statistics. For more information, see Enabling Server Statistics for your enterprise.

For more information about using the REST API to request server statistics, see REST API endpoints for admin stats in the GitHub Enterprise Cloud documentation.