GitHub Alerts API

The Alerts API from GitHub — 11 operation(s) for alerts.

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-alerts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Alerts 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: Alerts
paths:
  /orgs/{org}/code-scanning/alerts:
    get:
      summary: GitHub List Code Scanning Alerts for an Organization
      description: 'Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."


        The authenticated user must be an owner or security manager for the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo`s cope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.'
      tags:
      - Alerts
      operationId: listCodeScanningAlertsForAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/tool-name'
      - $ref: '#/components/parameters/tool-guid'
      - $ref: '#/components/parameters/pagination-before'
      - $ref: '#/components/parameters/pagination-after'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/direction'
      - name: state
        description: If specified, only code scanning alerts with this state will be returned.
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/code-scanning-alert-state-query'
        example: open
      - name: sort
        description: The property by which to sort the results.
        in: query
        required: false
        schema:
          type: string
          enum:
          - created
          - updated
          default: created
        example: created
      - name: severity
        description: If specified, only code scanning alerts with this severity will be returned.
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/code-scanning-alert-severity'
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/code-scanning-organization-alert-items'
              examples:
                default:
                  $ref: '#/components/examples/code-scanning-organization-alert-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '404':
          $ref: '#/components/responses/not_found'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: code-scanning
        subcategory: code-scanning
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/dependabot/alerts:
    get:
      summary: GitHub List Dependabot Alerts for an Organization
      description: 'Lists Dependabot alerts for an organization.


        The authenticated user must be an owner or security manager for the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.'
      tags:
      - Alerts
      operationId: listDependabotAlertsForAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/dependabot-alert-comma-separated-states'
      - $ref: '#/components/parameters/dependabot-alert-comma-separated-severities'
      - $ref: '#/components/parameters/dependabot-alert-comma-separated-ecosystems'
      - $ref: '#/components/parameters/dependabot-alert-comma-separated-packages'
      - $ref: '#/components/parameters/dependabot-alert-scope'
      - $ref: '#/components/parameters/dependabot-alert-sort'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/pagination-before'
      - $ref: '#/components/parameters/pagination-after'
      - $ref: '#/components/parameters/pagination-first'
      - $ref: '#/components/parameters/pagination-last'
      - $ref: '#/components/parameters/per-page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/dependabot-alert-with-repository'
              examples:
                default:
                  $ref: '#/components/examples/dependabot-alerts-for-organization'
        '304':
          $ref: '#/components/responses/not_modified'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: dependabot
        subcategory: alerts
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/secret-scanning/alerts:
    get:
      summary: GitHub List Secret Scanning Alerts for an Organization
      description: 'Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.


        The authenticated user must be an administrator or security manager for the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.'
      tags:
      - Alerts
      operationId: listSecretScanningAlertsForAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/secret-scanning-alert-state'
      - $ref: '#/components/parameters/secret-scanning-alert-secret-type'
      - $ref: '#/components/parameters/secret-scanning-alert-resolution'
      - $ref: '#/components/parameters/secret-scanning-alert-sort'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/secret-scanning-pagination-before-org-repo'
      - $ref: '#/components/parameters/secret-scanning-pagination-after-org-repo'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/organization-secret-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/organization-secret-scanning-alert-list'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '404':
          $ref: '#/components/responses/not_found'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: secret-scanning
        subcategory: secret-scanning
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}:
    get:
      summary: GitHub Get Code Scanning Alert
      description: 'Gets a single code scanning alert.


        OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.'
      tags:
      - Alerts
      operationId: getCodeScanningAlert
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/code-scanning/code-scanning#get-a-code-scanning-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/alert-number'
      - 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:
                $ref: '#/components/schemas/code-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/code-scanning-alert'
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/code_scanning_forbidden_read'
        '404':
          $ref: '#/components/responses/not_found'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: code-scanning
        subcategory: code-scanning
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Code Scanning Alert
      description: 'Updates the status of a single code scanning alert.

        OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.'
      operationId: updateCodeScanningAlert
      tags:
      - Alerts
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/code-scanning/code-scanning#update-a-code-scanning-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/alert-number'
      - 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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  $ref: '#/components/schemas/code-scanning-alert-set-state'
                dismissed_reason:
                  $ref: '#/components/schemas/code-scanning-alert-dismissed-reason_2'
                dismissed_comment:
                  $ref: '#/components/schemas/code-scanning-alert-dismissed-comment_2'
              required:
              - state
            examples:
              default:
                value:
                  state: dismissed
                  dismissed_reason: false positive
                  dismissed_comment: This alert is not actually correct, because there's a sanitizer included in the library.
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/code-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/code-scanning-alert-dismissed'
        '403':
          $ref: '#/components/responses/code_scanning_forbidden_write'
        '404':
          $ref: '#/components/responses/not_found'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        enabledForGitHubApps: true
        githubCloudOnly: false
        category: code-scanning
        subcategory: code-scanning
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances:
    get:
      summary: GitHub List Instances of Code Scanning Alert
      description: 'Lists all instances of the specified code scanning alert.


        OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.'
      tags:
      - Alerts
      operationId: listInstancesOfCodeScanningAlert
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/code-scanning/code-scanning#list-instances-of-a-code-scanning-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/alert-number'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/git-ref'
      - 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/code-scanning-alert-instance'
              examples:
                default:
                  $ref: '#/components/examples/code-scanning-alert-instances'
        '403':
          $ref: '#/components/responses/code_scanning_forbidden_read'
        '404':
          $ref: '#/components/responses/not_found'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: code-scanning
        subcategory: code-scanning
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/dependabot/alerts:
    get:
      summary: GitHub List Dependabot Alerts for Repository
      description: OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.
      tags:
      - Alerts
      operationId: listDependabotAlertsForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/dependabot/alerts#list-dependabot-alerts-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/dependabot-alert-comma-separated-states_2'
      - $ref: '#/components/parameters/dependabot-alert-comma-separated-severities_2'
      - $ref: '#/components/parameters/dependabot-alert-comma-separated-ecosystems_2'
      - $ref: '#/components/parameters/dependabot-alert-comma-separated-packages_2'
      - $ref: '#/components/parameters/dependabot-alert-comma-separated-manifests'
      - $ref: '#/components/parameters/dependabot-alert-scope'
      - $ref: '#/components/parameters/dependabot-alert-sort'
      - $ref: '#/components/parameters/direction'
      - name: page
        description: '**Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead.'
        deprecated: true
        in: query
        schema:
          type: integer
          default: 1
        example: 42
      - name: per_page
        description: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
        deprecated: true
        in: query
        schema:
          type: integer
          default: 30
        example: 42
      - $ref: '#/components/parameters/pagination-before_2'
      - $ref: '#/components/parameters/pagination-after_2'
      - $ref: '#/components/parameters/pagination-first'
      - $ref: '#/components/parameters/pagination-last'
      - 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/dependabot-alert'
              examples:
                default:
                  $ref: '#/components/examples/dependabot-alerts-for-repository'
        '304':
          $ref: '#/components/responses/not_modified'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        category: dependabot
        subcategory: alerts
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/dependabot/alerts/{alert_number}:
    get:
      summary: GitHub Get Dependabot Alert
      description: OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.
      tags:
      - Alerts
      operationId: getDependabotAlert
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/dependabot/alerts#get-a-dependabot-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/dependabot-alert-number'
      - 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:
                $ref: '#/components/schemas/dependabot-alert'
              examples:
                default:
                  $ref: '#/components/examples/dependabot-alert-open'
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        category: dependabot
        subcategory: alerts
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Dependabot Alert
      description: 'The authenticated user must have access to security alerts for the repository to use this endpoint. For more information, see "[Granting access to security alerts](https://docs.github.com/enterprise-server@3.9/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)."


        OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.'
      tags:
      - Alerts
      operationId: updateDependabotAlert
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/dependabot/alerts#update-a-dependabot-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/dependabot-alert-number'
      - 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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  type: string
                  description: 'The state of the Dependabot alert.

                    `dismissed_reason` must be provided when setting the state to `dismissed`.'
                  enum:
                  - dismissed
                  - open
                dismissed_reason:
                  type: string
                  description: '**Required when `state` is `dismissed`.** reason for dismissing the alert.'
                  enum:
                  - fix_started
                  - inaccurate
                  - no_bandwidth
                  - not_used
                  - tolerable_risk
                dismissed_comment:
                  type: string
                  description: An optional comment associated with dismissing the alert.
                  maxLength: 280
              required:
              - state
              additionalProperties: false
            examples:
              default:
                value:
                  state: dismissed
                  dismissed_reason: tolerable_risk
                  dismissed_comment: This alert is accurate but we use a sanitizer.
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dependabot-alert'
              examples:
                default:
                  $ref: '#/components/examples/dependabot-alert-dismissed'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        category: dependabot
        subcategory: alerts
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/secret-scanning/alerts:
    get:
      summary: GitHub List Secret Scanning Alerts for Repository
      description: 'Lists secret scanning alerts for an eligible repository, from newest to oldest.


        The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.'
      tags:
      - Alerts
      operationId: listSecretScanningAlertsForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/secret-scanning-alert-state'
      - $ref: '#/components/parameters/secret-scanning-alert-secret-type_2'
      - $ref: '#/components/parameters/secret-scanning-alert-resolution_2'
      - $ref: '#/components/parameters/secret-scanning-alert-sort'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/secret-scanning-pagination-before-org-repo_2'
      - $ref: '#/components/parameters/secret-scanning-pagination-after-org-repo_2'
      - 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/secret-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/secret-scanning-alert-list'
        '404':
          description: Repository is public or secret scanning is disabled for the repository
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: secret-scanning
        subcategory: secret-scanning
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}:
    get:
      summary: GitHub Get Secret Scanning Alert
      description: 'Gets a single secret scanning alert detected in an eligible repository.


        The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.'
      tags:
      - Alerts
      operationId: getSecretScanningAlert
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#get-a-secret-scanning-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/alert-number'
      - 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:
                $ref: '#/components/schemas/secret-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/secret-scanning-alert-open'
        '304':
          $ref: '#/components/responses/not_modified'
        '404':
          description: Repository is public, or secret scanning is disabled for the repository, or the resource is not found
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: secret-scanning
        subcategory: secret-scanning
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Secret Scanning Alert
      description: 'Updates the status of a secret scanning alert in an eligible repository.


        The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.'
      operationId: updateSecretScanningAlert
      tags:
      - Alerts
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#update-a-secret-scanning-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/alert-number'
      - 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
     

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