---
title: "code-scanning-alert-instance"
url: "https://kiwi.arashsheyda.me/apis/git-hub-v3-rest-api-1/versions/4cb06d26-20a0-409c-8492-8406889b7eb4/schemas/code-scanning-alert-instance"
---

> Full API specification: https://kiwi.arashsheyda.me/apis/git-hub-v3-rest-api-1/versions/4cb06d26-20a0-409c-8492-8406889b7eb4.md

# code-scanning-alert-instance

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: GitHub v3 REST API
  version: 1.1.4
servers:
  - url: "{protocol}://{hostname}/api/v3"
    variables:
      hostname:
        description: Self-hosted Enterprise Server or Enterprise Cloud hostname
        default: HOSTNAME
      protocol:
        description: Self-hosted Enterprise Server or Enterprise Cloud protocol
        default: http
components:
  schemas:
    code-scanning-ref:
      type: string
      description: |-
        The full Git reference, formatted as `refs/heads/<branch name>`,
        `refs/pull/<number>/merge`, or `refs/pull/<number>/head`.
    code-scanning-analysis-analysis-key:
      type: string
      description: Identifies the configuration under which the analysis was executed.
        For example, in GitHub Actions this includes the workflow filename and
        job name.
    code-scanning-alert-environment:
      type: string
      description: Identifies the variable values associated with the environment in
        which the analysis that generated this alert instance was performed,
        such as the language that was analyzed.
    code-scanning-analysis-category:
      type: string
      description: Identifies the configuration under which the analysis was executed.
        Used to distinguish between multiple analyses for the same tool and
        commit, but performed on different languages or different parts of the
        code.
    code-scanning-alert-state:
      type: string
      description: State of a code scanning alert.
      enum:
        - open
        - closed
        - dismissed
        - fixed
    code-scanning-alert-location:
      type: object
      description: Describe a region within a file for the alert.
      properties:
        path:
          type: string
        start_line:
          type: integer
        end_line:
          type: integer
        start_column:
          type: integer
        end_column:
          type: integer
    code-scanning-alert-classification:
      type: string
      description: A classification of the file. For example to identify it as generated.
      nullable: true
      enum:
        - source
        - generated
        - test
        - library
    code-scanning-alert-instance:
      type: object
      properties:
        ref:
          $ref: "#/components/schemas/code-scanning-ref"
        analysis_key:
          $ref: "#/components/schemas/code-scanning-analysis-analysis-key"
        environment:
          $ref: "#/components/schemas/code-scanning-alert-environment"
        category:
          $ref: "#/components/schemas/code-scanning-analysis-category"
        state:
          $ref: "#/components/schemas/code-scanning-alert-state"
        commit_sha:
          type: string
        message:
          type: object
          properties:
            text:
              type: string
        location:
          $ref: "#/components/schemas/code-scanning-alert-location"
        html_url:
          type: string
        classifications:
          type: array
          description: >-
            Classifications that have been applied to the file that triggered
            the alert.

            For example identifying it as documentation, or a generated file.
          items:
            $ref: "#/components/schemas/code-scanning-alert-classification"
```
