{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/github-enterprise/json-schema/github-enterprise-server-statistics-schema.json",
  "title": "Server Statistics Proxy Endpoint",
  "description": "Response of S4 Proxy endpoint that provides GHES statistics",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-enterprise-enterprise-admin-api-openapi.yml#/components/schemas/server-statistics",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "server_id": {
        "type": "string"
      },
      "collection_date": {
        "type": "string"
      },
      "schema_version": {
        "type": "string"
      },
      "ghes_version": {
        "type": "string"
      },
      "host_name": {
        "type": "string"
      },
      "github_connect": {
        "type": "object",
        "properties": {
          "features_enabled": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ghe_stats": {
        "type": "object",
        "properties": {
          "comments": {
            "type": "object",
            "properties": {
              "total_commit_comments": {
                "type": "integer"
              },
              "total_gist_comments": {
                "type": "integer"
              },
              "total_issue_comments": {
                "type": "integer"
              },
              "total_pull_request_comments": {
                "type": "integer"
              }
            }
          },
          "gists": {
            "type": "object",
            "properties": {
              "total_gists": {
                "type": "integer"
              },
              "private_gists": {
                "type": "integer"
              },
              "public_gists": {
                "type": "integer"
              }
            }
          },
          "hooks": {
            "type": "object",
            "properties": {
              "total_hooks": {
                "type": "integer"
              },
              "active_hooks": {
                "type": "integer"
              },
              "inactive_hooks": {
                "type": "integer"
              }
            }
          },
          "issues": {
            "type": "object",
            "properties": {
              "total_issues": {
                "type": "integer"
              },
              "open_issues": {
                "type": "integer"
              },
              "closed_issues": {
                "type": "integer"
              }
            }
          },
          "milestones": {
            "type": "object",
            "properties": {
              "total_milestones": {
                "type": "integer"
              },
              "open_milestones": {
                "type": "integer"
              },
              "closed_milestones": {
                "type": "integer"
              }
            }
          },
          "orgs": {
            "type": "object",
            "properties": {
              "total_orgs": {
                "type": "integer"
              },
              "disabled_orgs": {
                "type": "integer"
              },
              "total_teams": {
                "type": "integer"
              },
              "total_team_members": {
                "type": "integer"
              }
            }
          },
          "pages": {
            "type": "object",
            "properties": {
              "total_pages": {
                "type": "integer"
              }
            }
          },
          "pulls": {
            "type": "object",
            "properties": {
              "total_pulls": {
                "type": "integer"
              },
              "merged_pulls": {
                "type": "integer"
              },
              "mergeable_pulls": {
                "type": "integer"
              },
              "unmergeable_pulls": {
                "type": "integer"
              }
            }
          },
          "repos": {
            "type": "object",
            "properties": {
              "total_repos": {
                "type": "integer"
              },
              "root_repos": {
                "type": "integer"
              },
              "fork_repos": {
                "type": "integer"
              },
              "org_repos": {
                "type": "integer"
              },
              "total_pushes": {
                "type": "integer"
              },
              "total_wikis": {
                "type": "integer"
              }
            }
          },
          "users": {
            "type": "object",
            "properties": {
              "total_users": {
                "type": "integer"
              },
              "admin_users": {
                "type": "integer"
              },
              "suspended_users": {
                "type": "integer"
              }
            }
          }
        }
      },
      "dormant_users": {
        "type": "object",
        "properties": {
          "total_dormant_users": {
            "type": "integer"
          },
          "dormancy_threshold": {
            "type": "string"
          }
        }
      },
      "actions_stats": {
        "$ref": "#/$defs/server-statistics-actions"
      },
      "packages_stats": {
        "$ref": "#/$defs/server-statistics-packages"
      }
    }
  },
  "$defs": {
    "server-statistics-actions": {
      "type": "object",
      "description": "Actions metrics that are included in the Server Statistics payload/export from GHES",
      "properties": {
        "number_of_repos_using_actions": {
          "description": "The total number of repositories in a GHES installation that have Actions enabled",
          "type": "integer"
        },
        "percentage_of_repos_using_actions": {
          "description": "The percentage of repositories in a GHES installation that have Actions enabled",
          "type": "string"
        }
      }
    },
    "server-statistics-packages": {
      "type": "object",
      "description": "Packages metrics that are included in the Server Statistics payload/export from GHES",
      "properties": {
        "registry_enabled": {
          "description": "Whether GitHub Packages is enabled globally in a GHES installation",
          "type": "boolean"
        },
        "registry_v2_enabled": {
          "description": "Whether a beta registry is enabled in a GHES installation",
          "type": "boolean"
        },
        "ecosystems": {
          "description": "The details of the package ecosystems that are enabled in a GHES installation",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "description": "The name of the package ecosystem",
                "type": "string",
                "enum": [
                  "npm",
                  "maven",
                  "docker",
                  "nuget",
                  "rubygems",
                  "containers"
                ]
              },
              "enabled": {
                "description": "Shows if a package system is enabled, disabled, or read-only in a GHES installation",
                "type": "string",
                "enum": [
                  "TRUE",
                  "FALSE",
                  "READONLY"
                ]
              },
              "published_packages_count": {
                "description": "The total number of published packages in a package ecosystem in a GHES installation",
                "type": "integer"
              },
              "private_packages_count": {
                "description": "The total number of private packages in a package ecosystem in a GHES installation",
                "type": "integer"
              },
              "public_packages_count": {
                "description": "The total number of public packages in a package ecosystem in a GHES installation",
                "type": "integer"
              },
              "internal_packages_count": {
                "description": "The total number of internal packages in a package ecosystem in a GHES installation",
                "type": "integer"
              },
              "user_packages_count": {
                "description": "The total number of user packages in a package ecosystem in a GHES installation",
                "type": "integer"
              },
              "organization_packages_count": {
                "description": "The total number of organization packages in a package ecosystem in a GHES installation",
                "type": "integer"
              },
              "daily_download_count": {
                "description": "The total number of packages in an ecosystem that have been downloaded in the 24 hours prior to `collection_date` for a GHES installation",
                "type": "integer"
              },
              "daily_update_count": {
                "description": "The total number of packages in an ecosystem that have been updated in the 24 hours prior to `collection_date` for a GHES installation",
                "type": "integer"
              },
              "daily_delete_count": {
                "description": "The total number of packages in an ecosystem that have been deleted in the 24 hours prior to `collection_date` for a GHES installation",
                "type": "integer"
              },
              "daily_create_count": {
                "description": "The total number of packages in an ecosystem that have been created in the 24 hours prior to `collection_date` for a GHES installation",
                "type": "integer"
              }
            }
          }
        }
      }
    }
  }
}