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.

Prefix all the endpoints for this API with the following URL:

http(s)://hostname/api/v3

Get statistics

Request

GET /enterprise/stats/:type

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.

Response

Status: 200 OK
{
  "repos": {
    "total_repos": 212,
    "root_repos": 194,
    "fork_repos": 18,
    "org_repos": 51,
    "total_pushes": 3082,
    "total_wikis": 15
  },
  "hooks": {
    "total_hooks": 27,
    "active_hooks": 23,
    "inactive_hooks": 4
  },
  "pages": {
    "total_pages": 36
  },
  "orgs": {
    "total_orgs": 33,
    "disabled_orgs": 0,
    "total_teams": 60,
    "total_team_members": 314
  },
  "users": {
    "total_users": 254,
    "admin_users": 45,
    "suspended_users": 21
  },
  "pulls": {
    "total_pulls": 86,
    "merged_pulls": 60,
    "mergeable_pulls": 21,
    "unmergeable_pulls": 3
  },
  "issues": {
    "total_issues": 179,
    "open_issues": 83,
    "closed_issues": 96
  },
  "milestones": {
    "total_milestones": 7,
    "open_milestones": 6,
    "closed_milestones": 1
  },
  "gists": {
    "total_gists": 178,
    "private_gists": 151,
    "public_gists": 25
  },
  "comments": {
    "total_commit_comments": 6,
    "total_gist_comments": 28,
    "total_issue_comments": 366,
    "total_pull_request_comments": 30
  }
}