You can use these endpoints to administer your enterprise.
Endpoint URLs
REST API endpoints—except Management Console API endpoints— are prefixed with the following URL:
http(s)://hostname/api/v3/
Management Console API endpoints are only prefixed with a hostname:
http(s)://hostname/
Authentication
Your GitHub Enterprise Server installation's API endpoints accept the same authentication methods as the GitHub.com API. You can authenticate yourself with OAuth tokens (which can be created using the Authorizations API) or basic authentication.
OAuth tokens must have the site_admin OAuth scope when used with Enterprise-specific endpoints.
Enterprise administration API endpoints are only accessible to authenticated GitHub Enterprise Server site administrators, except for the Management Console API, which requires the Management Console password.
Version information
The current version of your enterprise is returned in the response header of every API:
X-GitHub-Enterprise-Version: enterprise-server@2.19.0
You can also read the current version by calling the meta endpoint.
Admin stats
The Admin Stats API provides a variety of metrics about your installation. It is only available to authenticated site administrators. Normal users will receive a 404 response if they try to access it.
Get statistics
There are a variety of types to choose from:
| Type | Description |
|---|---|
issues | The number of open and closed issues. |
hooks | The number of active and inactive hooks. |
milestones | The number of open and closed milestones. |
orgs | The number of organizations, teams, team members, and disabled organizations. |
comments | The number of comments on issues, pull requests, commits, and gists. |
pages | The number of GitHub Pages sites. |
users | The number of suspended and admin users. |
gists | The number of private and public gists. |
pulls | The number of merged, mergeable, and unmergeable pull requests. |
repos | The number of organization-owned repositories, root repositories, forks, pushed commits, and wikis. |
all | All of the statistics listed above. |
These statistics are cached and will be updated approximately every 10 minutes.