GitHub Statistics API

Repository statistics including commit activity and contributors.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/ https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-statistics-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Statistics API
  description: 'Use the REST API to retrieve information about GitHub Apps and GitHub App

    installations.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Statistics
  description: Repository statistics including commit activity and contributors.
paths:
  /repos/{owner}/{repo}/stats/code_frequency:
    get:
      summary: GitHub Get the Weekly Commit Activity
      description: Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
      tags:
      - Statistics
      operationId: getTheWeeklyCommitActivity
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/metrics/statistics#get-the-weekly-commit-activity
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/code-frequency-stat'
              examples:
                Default:
                  $ref: '#/components/examples/code-frequency-stat-items'
        '202':
          $ref: '#/components/responses/accepted'
        '204':
          $ref: '#/components/responses/no_content'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: metrics
        subcategory: statistics
      x-api-evangelist-certified: '2025-07-16'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        dispatcher: SCRIPT
        dispatcherRules: return "Default"
  /repos/{owner}/{repo}/stats/commit_activity:
    get:
      summary: GitHub Get the Last Year of Commit Activity
      description: Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`.
      tags:
      - Statistics
      operationId: getTheLastYearOfCommitActivity
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/metrics/statistics#get-the-last-year-of-commit-activity
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/commit-activity'
              examples:
                Default:
                  $ref: '#/components/examples/commit-activity-items'
        '202':
          $ref: '#/components/responses/accepted'
        '204':
          $ref: '#/components/responses/no_content'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: metrics
        subcategory: statistics
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        dispatcher: SCRIPT
        dispatcherRules: return "Default"
  /repos/{owner}/{repo}/stats/contributors:
    get:
      summary: GitHub Get All Contributor Commit Activity
      description: 'Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information:


        *   `w` - Start of the week, given as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).

        *   `a` - Number of additions

        *   `d` - Number of deletions

        *   `c` - Number of commits'
      tags:
      - Statistics
      operationId: getAllContributorCommitActivity
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/metrics/statistics#get-all-contributor-commit-activity
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/contributor-activity'
              examples:
                Default:
                  $ref: '#/components/examples/contributor-activity-items'
        '202':
          $ref: '#/components/responses/accepted'
        '204':
          $ref: '#/components/responses/no_content'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: metrics
        subcategory: statistics
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        dispatcher: SCRIPT
        dispatcherRules: return "Default"
  /repos/{owner}/{repo}/stats/participation:
    get:
      summary: GitHub Get the Weekly Commit Count
      description: 'Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you''d like to get the commit counts for non-owners, you can subtract `owner` from `all`.


        The array order is oldest week (index 0) to most recent week.


        The most recent week is seven days ago at UTC midnight to today at UTC midnight.'
      tags:
      - Statistics
      operationId: getTheWeeklyCommitCount
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/metrics/statistics#get-the-weekly-commit-count
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: The array order is oldest week (index 0) to most recent week.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/participation-stats'
              examples:
                Default:
                  $ref: '#/components/examples/participation-stats'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: metrics
        subcategory: statistics
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        dispatcher: SCRIPT
        dispatcherRules: return "Default"
  /repos/{owner}/{repo}/stats/punch_card:
    get:
      summary: GitHub Get the Hourly Commit Count for Each Day
      description: 'Each array contains the day number, hour number, and number of commits:


        *   `0-6`: Sunday - Saturday

        *   `0-23`: Hour of day

        *   Number of commits


        For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.'
      tags:
      - Statistics
      operationId: getTheHourlyCommitCountForEachDay
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/metrics/statistics#get-the-hourly-commit-count-for-each-day
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/code-frequency-stat'
              examples:
                Default:
                  $ref: '#/components/examples/code-frequency-stat-items-2'
        '204':
          $ref: '#/components/responses/no_content'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: metrics
        subcategory: statistics
      x-api-evangelist-certified: '2025-07-16'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        dispatcher: SCRIPT
        dispatcherRules: return "Default"
  /enterprise/stats/users:
    get:
      summary: GitHub Get Users Statistics
      description: The GitHub User API endpoint `/enterprise/stats/users` using the GET method retrieves statistical information about users within a GitHub Enterprise instance. This endpoint provides aggregate data and metrics related to user accounts, which may include information such as total user counts, active users, user growth trends, and other relevant user-related statistics that help administrators monitor and analyze user engagement and activity across their enterprise organization.
      operationId: getUsersStatistics
      tags:
      - Statistics
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/admin-stats#get-users-statistics
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/enterprise-user-overview'
              examples:
                default:
                  value:
                    total_users: 100
                    admin_users: 3
                    suspended_users: 1
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: admin-stats
      parameters:
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    nullable-simple-user:
      title: Simple User
      description: GitHub user.
      type: object
      properties:
        name:
          type: string
          example: octocat
        email:
          type: string
          example: octocat@github.com
        login:
          type: string
          example: octocat
        id:
          type: integer
          format: int64
          example: 1
        node_id:
          type: string
          example: MDQ6VXNlcjE=
        avatar_url:
          type: string
          format: uri
          example: https://github.com/images/error/octocat_happy.gif
        gravatar_id:
          type: string
          example: 41d064eb2195891e12d0413f63227ea7
        url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat
        html_url:
          type: string
          format: uri
          example: https://github.com/octocat
        followers_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/followers
        following_url:
          type: string
          example: https://api.github.com/users/octocat/following{/other_user}
        gists_url:
          type: string
          example: https://api.github.com/users/octocat/gists{/gist_id}
        starred_url:
          type: string
          example: https://api.github.com/users/octocat/starred{/owner}{/repo}
        subscriptions_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/subscriptions
        organizations_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/orgs
        repos_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/repos
        events_url:
          type: string
          example: https://api.github.com/users/octocat/events{/privacy}
        received_events_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/received_events
        type:
          type: string
          example: User
        site_admin:
          type: boolean
          example: true
        starred_at:
          type: string
          example: '"2020-07-09T00:17:55Z"'
      required:
      - avatar_url
      - events_url
      - followers_url
      - following_url
      - gists_url
      - gravatar_id
      - html_url
      - id
      - node_id
      - login
      - organizations_url
      - received_events_url
      - repos_url
      - site_admin
      - starred_url
      - subscriptions_url
      - type
      - url
    basic-error:
      title: Basic Error
      description: Basic Error
      type: object
      properties:
        message:
          type: string
          example: Example body text
        documentation_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        status:
          type: string
          example: open
    enterprise-user-overview:
      title: Enterprise User Stats
      type: object
      properties:
        total_users:
          type: integer
          example: 42
        admin_users:
          type: integer
          example: 42
        suspended_users:
          type: integer
          example: 42
      required:
      - total_users
      - admin_users
      - suspended_users
    contributor-activity:
      title: Contributor Activity
      description: Contributor Activity
      type: object
      properties:
        author:
          $ref: '#/components/schemas/nullable-simple-user'
        total:
          type: integer
          example: 135
        weeks:
          type: array
          example:
          - w: 1367712000
            a: 6898
            d: 77
            c: 10
          items:
            type: object
            properties:
              w:
                type: integer
              a:
                type: integer
              d:
                type: integer
              c:
                type: integer
      required:
      - author
      - total
      - weeks
    commit-activity:
      title: Commit Activity
      description: Commit Activity
      type: object
      properties:
        days:
          type: array
          example:
          - 0
          - 3
          - 26
          - 20
          - 39
          - 1
          - 0
          items:
            type: integer
        total:
          type: integer
          example: 89
        week:
          type: integer
          example: 1336280400
      required:
      - days
      - total
      - week
    participation-stats:
      title: Participation Stats
      type: object
      properties:
        all:
          type: array
          items:
            type: integer
        owner:
          type: array
          items:
            type: integer
      required:
      - all
      - owner
    code-frequency-stat:
      title: Code Frequency Stat
      description: Code Frequency Stat
      type: array
      items:
        type: integer
  responses:
    not_found:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    no_content:
      description: header with no content is returned.
    accepted:
      description: Accepted
      content:
        application/json:
          schema:
            type: object
          examples:
            Default:
              value: {}
  examples:
    participation-stats:
      value:
        all:
        - 11
        - 21
        - 15
        - 2
        - 8
        - 1
        - 8
        - 23
        - 17
        - 21
        - 11
        - 10
        - 33
        - 91
        - 38
        - 34
        - 22
        - 23
        - 32
        - 3
        - 43
        - 87
        - 71
        - 18
        - 13
        - 5
        - 13
        - 16
        - 66
        - 27
        - 12
        - 45
        - 110
        - 117
        - 13
        - 8
        - 18
        - 9
        - 19
        - 26
        - 39
        - 12
        - 20
        - 31
        - 46
        - 91
        - 45
        - 10
        - 24
        - 9
        - 29
        - 7
        owner:
        - 3
        - 2
        - 3
        - 0
        - 2
        - 0
        - 5
        - 14
        - 7
        - 9
        - 1
        - 5
        - 0
        - 48
        - 19
        - 2
        - 0
        - 1
        - 10
        - 2
        - 23
        - 40
        - 35
        - 8
        - 8
        - 2
        - 10
        - 6
        - 30
        - 0
        - 2
        - 9
        - 53
        - 104
        - 3
        - 3
        - 10
        - 4
        - 7
        - 11
        - 21
        - 4
        - 4
        - 22
        - 26
        - 63
        - 11
        - 2
        - 14
        - 1
        - 10
        - 3
    code-frequency-stat-items-2:
      value:
      - - 0
        - 0
        - 5
      - - 0
        - 1
        - 43
      - - 0
        - 2
        - 21
    contributor-activity-items:
      value:
      - author:
          login: octocat
          id: 1
          node_id: MDQ6VXNlcjE=
          avatar_url: https://github.com/images/error/octocat_happy.gif
          gravatar_id: ''
          url: https://api.github.com/users/octocat
          html_url: https://github.com/octocat
          followers_url: https://api.github.com/users/octocat/followers
          following_url: https://api.github.com/users/octocat/following{/other_user}
          gists_url: https://api.github.com/users/octocat/gists{/gist_id}
          starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo}
          subscriptions_url: https://api.github.com/users/octocat/subscriptions
          organizations_url: https://api.github.com/users/octocat/orgs
          repos_url: https://api.github.com/users/octocat/repos
          events_url: https://api.github.com/users/octocat/events{/privacy}
          received_events_url: https://api.github.com/users/octocat/received_events
          type: User
          site_admin: false
        total: 135
        weeks:
        - w: 1367712000
          a: 6898
          d: 77
          c: 10
    code-frequency-stat-items:
      value:
      - - 1302998400
        - 1124
        - -435
    commit-activity-items:
      value:
      - days:
        - 0
        - 3
        - 26
        - 20
        - 39
        - 1
        - 0
        total: 89
        week: 1336280400
  parameters:
    repo:
      name: repo
      description: The name of the repository without the `.git` extension. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
        default: capabilities
        example: capabilities
      examples:
        Default:
          value: Hello-World
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
        default: naftiko
        example: naftiko
      examples:
        Default:
          value: octocat
  securitySchemes:
    bearerHttpAuthentication:
      description: Bearer Token
      type: http
      scheme: Bearer
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://docs.github.com/enterprise-server@3.9/rest/
x-webhooks:
  branch-protection-rule-created:
    post:
      summary: 'This event occurs when there is activity relating to branch protection rules. For more information, see "[About protected branches](https://docs.github.com/enterprise-server@3.9/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)." For information about the APIs to manage branch protection rules, see [the GraphQL documentation](https://docs.github.com/enterprise-server@3.9/graphql/reference/objects#branchprotectionrule) or "[Branch protection](https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection)" in the REST API documentation.


        To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission.'
      description: A branch protection rule was created.
      operationId: branch-protection-rule/created
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#branch_protection_rule
      parameters:
      - name: User-Agent
        in: header
        example: GitHub-Hookshot/123abc
        schema:
          type: string
      - name: X-Github-Hook-Id
        in: header
        example: 12312312
        schema:
          type: string
      - name: X-Github-Event
        in: header
        example: issues
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Id
        in: header
        example: 123123
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Type
        in: header
        example: repository
        schema:
          type: string
      - name: X-GitHub-Delivery
        in: header
        example: 0b989ba4-242f-11e5-81e1-c7b6966d2516
        schema:
          type: string
      - name: X-Hub-Signature-256
        in: header
        example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e
        schema:
          type: string
      - name: X-GitHub-Enterprise-Version
        in: header
        example: 3.1.9
        schema:
          type: string
      - name: X-GitHub-Enterprise-Host
        in: header
        example: ghes.github.com
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook-branch-protection-rule-created'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      x-github:
        githubCloudOnly: false
        category: webhooks
        subcategory: branch_protection_rule
        supported-webhook-types:
        - repository
        - organization
        - app
  branch-protection-rule-deleted:
    post:
      summary: 'This event occurs when there is activity relating to branch protection rules. For more information, see "[About protected branches](https://docs.github.com/enterprise-server@3.9/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)." For information about the APIs to manage branch protection rules, see [the GraphQL documentation](https://docs.github.com/enterprise-server@3.9/graphql/reference/objects#branchprotectionrule) or "[Branch protection](https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection)" in the REST API documentation.


        To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission.'
      description: A branch protection rule was deleted.
      operationId: branch-protection-rule/deleted
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#branch_protection_rule
      parameters:
      - name: User-Agent
        in: header
        example: GitHub-Hookshot/123abc
        schema:
          type: string
      - name: X-Github-Hook-Id
        in: header
        example: 12312312
        schema:
          type: string
      - name: X-Github-Event
        in: header
        example: issues
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Id
        in: header
        example: 123123
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Type
        in: header
        example: repository
        schema:
          type: string
      - name: X-GitHub-Delivery
        in: header
        example: 0b989ba4-242f-11e5-81e1-c7b6966d2516
        schema:
          type: string
      - name: X-Hub-Signature-256
        in: header
        example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e
        schema:
          type: string
      - name: X-GitHub-Enterprise-Version
        in: header
        example: 3.1.9
        schema:
          type: string
      - name: X-GitHub-Enterprise-Host
        in: header
        example: ghes.github.com
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook-branch-protection-rule-deleted'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      x-github:
        githubCloudOnly: false
        category: webhooks
        subcategory: branch_protection_rule
        supported-webhook-types:
        - repository
        - organization
        - app
  branch-protection-rule-edited:
    post:
      summary: 'This event occurs when there is activity relating to branch protection rules. For more information, see "[About protected branches](https://docs.github.com/enterprise-server@3.9/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)." For information about the APIs to manage branch protection rules, see [the GraphQL documentation](https://docs.github.com/enterprise-server@3.9/graphql/reference/objects#branchprotectionrule) or "[Branch protection](https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection)" in the REST API documentation.


        To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission.'
      description: A branch protection rule was edited.
      operationId: branch-protection-rule/edited
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#branch_protection_rule
      parameters:
      - name: User-Agent
        in: header
        example: GitHub-Hookshot/123abc
        schema:
          type: string
      - name: X-Github-Hook-Id
        in: header
        example: 12312312
        schema:
          type: string
      - name: X-Github-Event
        in: header
        example: issues
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Id
        in: header
        example: 123123
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Type
        in: header
        example: repository
        schema:
          type: string
      - name: X-GitHub-Delivery
        in: header
        example: 0b989ba4-242f-11e5-81e1-c7b6966d2516
        schema:
          type: string
      - name: X-Hub-Signature-256
        in: header
        example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e
        schema:
          type: string
      - name: X-GitHub-Enterprise-Version
        in: header
        example: 3.1.9
        schema:
          type: string
      - name: X-GitHub-Enterprise-Host
        in: header
        example: ghes.github.com
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook-branch-protection-rule-edited'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      x-github:
        githubCloudOnly: false
        category: webhooks
        subcategory: branch_protection_rule
        supported-webhook-types:
        - repository
        - organization
        - app
  cache-sync:
    post:
      summary: This event occurs when a Git ref has been successfully synced to a cache replica. For more information, see "[About repository caching](https://docs.github.com/enterprise-server@3.9/admin/enterprise-management/caching-repositories/about-repository-caching)."
      operationId: cache-sync
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#cache_sync
      parameters:
      - name: User-Agent
        in: header
        example: GitHub-Hookshot/123abc
        schema:
          type: string
      - name: X-Github-Hook-Id
        in: header
        example: 12312312
        schema:
          type: string
      - name: X-Github-Event
        in: header
        example: issues
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Id
        in: header
        example: 123123
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Type
        in: header
        example: repository
        schema:
          type: string
      - name: X-GitHub-Delivery
        in: header
        example: 0b989ba4-242f-11e5-81e1-c7b6966d2516
        schema:
          type: string
      - name: X-Hub-Signature-256
        in: header
        example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e
        schema:
          type: string
      - name: X-GitHub-Enterprise-Version
        in: header
        example: 3.1.9
        schema:
          type: string
      - name: X-GitHub

# --- truncated at 32 KB (624 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-statistics-api-openapi.yml