> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leen.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Issue by ID

> Retrieve an issue by its ID (Leen's UUID).



## OpenAPI

````yaml get /appsec/issues/{issue_id}
openapi: 3.1.0
info:
  title: Leen Security API
  version: 0.0.1
servers:
  - description: Production API (US)
    url: https://api.leen.dev/v1
  - description: Production API (EU)
    url: https://api.eu-c1.leen.dev/v1
  - description: Production API (APAC)
    url: https://api.ap-se2.leen.dev/v1
security: []
paths:
  /appsec/issues/{issue_id}:
    get:
      tags:
        - appsec
      summary: Get Issue by ID
      description: Retrieve an issue by its ID (Leen's UUID).
      operationId: get_issue_by_id
      parameters:
        - in: path
          name: issue_id
          required: true
          schema:
            format: uuid
            title: Issue Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppSecIssueRespModel'
          description: Successful Response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorException'
          description: Issue not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - API-Key: []
          Connection-ID: []
components:
  schemas:
    AppSecIssueRespModel:
      properties:
        code_repo:
          description: >-
            Repository the issue was found in, without the owner or organisation
            prefix -- `api-server`, not `leeninc/api-server`.
          title: Code Repo
          type: string
        cvss_score:
          anyOf:
            - type: number
            - type: 'null'
          description: CVSS base score, where the vendor supplies one.
          title: Cvss Score
        description:
          description: Full issue description, as the vendor states it.
          title: Description
          type: string
        exploitable:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the vendor asserts this issue is exploitable. `null` means
            the vendor provided no signal, which is not the same as `false`.
          title: Exploitable
        first_seen:
          description: >-
            When the vendor first recorded the issue. This is the vendor's own
            timestamp, not when Leen first synced it.
          format: date-time
          title: First Seen
          type: string
        id:
          description: Leen's identifier for this issue. Stable across syncs.
          format: uuid
          title: Id
          type: string
        is_patchable:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether every affected component has a fixed version available. Null
            when the vendor reports no fix information at all, which is not the
            same as reporting that no fix exists.
          title: Is Patchable
        issue_url:
          anyOf:
            - type: string
            - type: 'null'
          description: Link to the issue in the vendor's own console.
          title: Issue Url
        kb_url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Link to the advisory this issue is based on -- NVD where the vendor
            identifies one, otherwise the vendor's own knowledge base.
          title: Kb Url
        last_seen:
          description: >-
            Most recent time the issue was observed. Vendors that report this
            use their timestamp; for the rest it is the sync that last returned
            the issue.
          format: date-time
          title: Last Seen
          type: string
        name:
          description: Issue title, as the vendor states it.
          title: Name
          type: string
        package_manager:
          description: >-
            Ecosystem the dependency came from, e.g. `npm`, `pip`, `maven`, as
            the vendor names it.
          title: Package Manager
          type: string
        package_name:
          description: Affected package, for issues in a dependency.
          title: Package Name
          type: string
        package_version:
          description: Version of the affected package that is installed.
          title: Package Version
          type: string
        platform:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Language or ecosystem the issue belongs to -- `python`,
            `javascript`, `linux`. Inferred from the source file or the vendor's
            identifier, so it is absent when neither says.
          title: Platform
        project_file_path:
          description: >-
            Path to the manifest or source file the issue was found in, relative
            to the repository root.
          title: Project File Path
          type: string
        publication_time:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When the underlying advisory was published. Null where the vendor's
            API does not expose it: the issue's own creation date is a different
            thing, and substituting it would distort time-to-disclosure
            reporting.
          title: Publication Time
        reachability:
          anyOf:
            - $ref: '#/components/schemas/AppSecIssueReachabilityEnum'
            - type: 'null'
          description: >-
            Whether the vulnerable code is reached from this codebase. `null`
            means the vendor performs no reachability analysis; `UNKNOWN` means
            it ran but reached no conclusion.
        remediation:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Fixed versions or remediation steps, as the vendor states them. Null
            for issue types a vendor gives no remediation for, such as SAST
            findings.
          title: Remediation
        repo_branch_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Branch the issue was found on, where the vendor reports one.
          title: Repo Branch Name
        repo_url:
          anyOf:
            - type: string
            - type: 'null'
          description: URL of the repository in its source-control provider.
          title: Repo Url
        severity:
          $ref: '#/components/schemas/AppSecIssueSeverityEnum'
          description: >-
            Severity, normalised across vendors. Each vendor's own scale is
            mapped onto this one, so `HIGH` means the same thing whichever tool
            found it.
        state:
          $ref: '#/components/schemas/AppSecIssueStateEnum'
          description: >-
            Lifecycle state, normalised across vendors. `DELETED` means the
            vendor stopped returning the issue rather than that it was fixed.
        state_updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When `state` last changed.
          title: State Updated At
        type:
          $ref: '#/components/schemas/AppSecIssueTypeEnum'
          description: >-
            What kind of issue this is -- a dependency vulnerability, a licence
            problem, a code finding.
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When Leen last changed any field on this record.
          title: Updated At
        vendor:
          description: Connector that produced this issue, e.g. `SNYK`, `SEMGREP`.
          title: Vendor
          type: string
        vendor_data:
          anyOf:
            - $ref: '#/components/schemas/AikidoVendorData'
            - $ref: '#/components/schemas/ArnicaVendorData'
            - $ref: '#/components/schemas/SnykVendorData'
            - $ref: '#/components/schemas/SemgrepVendorData'
            - $ref: '#/components/schemas/WizCodeVendorData'
            - $ref: '#/components/schemas/SonarQubeIssueVendorAttributesData'
            - $ref: '#/components/schemas/SocketVendorData'
            - type: 'null'
          description: >-
            The vendor's own payload for this issue, unnormalised. The shape
            differs per vendor; read it only when the normalised fields above
            are not enough.
          title: Vendor Data
        vendor_id:
          description: >-
            The vendor's own identifier for the issue. Use it to correlate back
            to the vendor's console; it is not stable across vendors.
          title: Vendor Id
          type: string
        vulnerability_identifiers:
          anyOf:
            - items:
                discriminator:
                  mapping:
                    CVE: '#/components/schemas/AppSecIssueVulnIdentifierCVE'
                    CWE: '#/components/schemas/AppSecIssueVulnIdentifierCWE'
                    GHSA: '#/components/schemas/AppSecIssueVulnIdentifierGHSA'
                    OTHER: '#/components/schemas/AppSecIssueVulnIdentifierOther'
                    OWASP: '#/components/schemas/AppSecIssueVulnIdentifierOWASP'
                  propertyName: type
                oneOf:
                  - $ref: '#/components/schemas/AppSecIssueVulnIdentifierCVE'
                  - $ref: '#/components/schemas/AppSecIssueVulnIdentifierCWE'
                  - $ref: '#/components/schemas/AppSecIssueVulnIdentifierOWASP'
                  - $ref: '#/components/schemas/AppSecIssueVulnIdentifierOther'
                  - $ref: '#/components/schemas/AppSecIssueVulnIdentifierGHSA'
              type: array
            - type: 'null'
          description: >-
            Public identifiers for the issue -- CVE, CWE, GHSA, OWASP. One issue
            can carry several, and vendors disagree about which they report.
          title: Vulnerability Identifiers
      required:
        - id
        - code_repo
        - project_file_path
        - vendor
        - vendor_id
        - name
        - package_name
        - package_version
        - severity
        - package_manager
        - type
        - description
        - state
        - first_seen
        - last_seen
      title: AppSecIssue
      type: object
    ErrorException:
      properties:
        detail:
          description: Error message
          title: Detail
          type: string
      required:
        - detail
      title: ErrorException
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AppSecIssueReachabilityEnum:
      description: >-
        Whether the vulnerable code is actually reached from the customer's
        code.


        Deliberately an enum rather than a boolean: every SCA vendor that ships

        reachability keeps "no analysis ran" distinguishable from "analyzed, and

        the code is not reached", and collapsing the two would let an unanalyzed

        finding be read as safe.  ``UNKNOWN`` means the vendor ran (or declined
        to

        run) an analysis and reached no conclusion; a ``NULL`` column means the

        vendor has no reachability concept at all.


        Values mirror ``VulnerabilityFindingV2Reachability`` exactly so the
        AppSec

        v1 and VF2 surfaces filter on the same vocabulary — see

        ``appsec_issues_test.py``, which fails if the two drift.
      enum:
        - REACHABLE
        - POTENTIALLY_REACHABLE
        - UNREACHABLE
        - UNKNOWN
      title: AppSecIssueReachabilityEnum
      type: string
    AppSecIssueSeverityEnum:
      enum:
        - INFO
        - LOW
        - MEDIUM
        - HIGH
        - CRITICAL
      title: AppSecIssueSeverityEnum
      type: string
    AppSecIssueStateEnum:
      enum:
        - OPEN
        - CLOSED
        - IGNORED
        - DELETED
      title: AppSecIssueStateEnum
      type: string
    AppSecIssueTypeEnum:
      enum:
        - VULNERABILITY
        - LICENSE
        - CLOUD
        - CODE
        - CUSTOM
        - CONFIG
      title: AppSecIssueTypeEnum
      type: string
    AikidoVendorData:
      properties:
        attack_surface:
          anyOf:
            - $ref: '#/components/schemas/AikidoCodeRepository'
            - $ref: '#/components/schemas/AkikidoCloud'
            - $ref: '#/components/schemas/AikidoContainer'
            - type: 'null'
          title: Attack Surface
        attack_surface_type:
          $ref: '#/components/schemas/AikidoIssueAttackSurfaceEnum'
        finding_type:
          $ref: '#/components/schemas/AikidoIssueTypeEnum'
      required:
        - finding_type
        - attack_surface_type
      title: AikidoVendorData
      type: object
    ArnicaVendorData:
      properties:
        asset_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Asset Link
        commit_author:
          anyOf:
            - type: string
            - type: 'null'
          title: Commit Author
        commit_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Commit Hash
        commit_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Commit Message
        rule_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Rule Id
      title: ArnicaVendorData
      type: object
    SnykVendorData:
      properties:
        is_fixable_manually:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Fixable Manually
        is_fixable_snyk:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Fixable Snyk
        is_fixable_upstream:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Fixable Upstream
        issue_key:
          title: Issue Key
          type: string
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
      required:
        - issue_key
      title: SnykVendorData
      type: object
    SemgrepVendorData:
      additionalProperties: false
      properties:
        found_dependency_ecosystem:
          anyOf:
            - type: string
            - type: 'null'
          title: Found Dependency Ecosystem
        line_of_code_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Line Of Code Url
      title: SemgrepVendorData
      type: object
    WizCodeVendorData:
      properties:
        cloud_platform:
          anyOf:
            - type: string
            - type: 'null'
          title: Cloud Platform
        cloud_provider_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Cloud Provider Url
        line_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Line Number
        location_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Location Path
        related_issues:
          anyOf:
            - items:
                $ref: '#/components/schemas/WizRelatedIssuesNode'
              type: array
            - type: 'null'
          title: Related Issues
        source_code_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Code Url
      title: WizCodeVendorData
      type: object
    SonarQubeIssueVendorAttributesData:
      description: >-
        SonarQube-specific structured data for scoped issues and
        ScopedVulnerabilityFindingV2VendorAttributes.
      properties:
        assignee:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        component:
          anyOf:
            - type: string
            - type: 'null'
          title: Component
        effort:
          anyOf:
            - type: string
            - type: 'null'
          title: Effort
        hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Hash
        issue_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Issue Status
        issue_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Issue Type
        line:
          anyOf:
            - type: integer
            - type: 'null'
          title: Line
        project:
          anyOf:
            - type: string
            - type: 'null'
          title: Project
        resolution:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolution
        risk_severity:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Severity
        risk_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Status
        rule:
          anyOf:
            - type: string
            - type: 'null'
          title: Rule
        security_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Security Category
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        text_range_end_line:
          anyOf:
            - type: integer
            - type: 'null'
          title: Text Range End Line
        text_range_end_offset:
          anyOf:
            - type: integer
            - type: 'null'
          title: Text Range End Offset
        text_range_start_line:
          anyOf:
            - type: integer
            - type: 'null'
          title: Text Range Start Line
        text_range_start_offset:
          anyOf:
            - type: integer
            - type: 'null'
          title: Text Range Start Offset
        vendor:
          const: SONARQUBE
          default: SONARQUBE
          title: Vendor
          type: string
        vulnerability_probability:
          anyOf:
            - type: string
            - type: 'null'
          title: Vulnerability Probability
      title: SonarQubeIssueVendorAttributesData
      type: object
    SocketVendorData:
      properties:
        id:
          title: Id
          type: string
        severity:
          anyOf:
            - type: string
            - type: 'null'
          title: Severity
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
      required:
        - id
      title: SocketVendorData
      type: object
    AppSecIssueVulnIdentifierCVE:
      properties:
        type:
          const: CVE
          title: Type
          type: string
        value:
          examples:
            - CVE-2021-34527
          title: Value
          type: string
      required:
        - type
        - value
      title: AppSecIssueVulnIdentifierCVE
      type: object
    AppSecIssueVulnIdentifierCWE:
      properties:
        type:
          const: CWE
          title: Type
          type: string
        value:
          examples:
            - CWE-79
          title: Value
          type: string
      required:
        - type
        - value
      title: AppSecIssueVulnIdentifierCWE
      type: object
    AppSecIssueVulnIdentifierGHSA:
      properties:
        type:
          const: GHSA
          title: Type
          type: string
        value:
          examples:
            - GHSA-968p-4wvh-cqc8
          title: Value
          type: string
      required:
        - type
        - value
      title: AppSecIssueVulnIdentifierGHSA
      type: object
    AppSecIssueVulnIdentifierOther:
      properties:
        type:
          const: OTHER
          title: Type
          type: string
        value:
          examples:
            - SNYK-CC-TF-130
          title: Value
          type: string
      required:
        - type
        - value
      title: AppSecIssueVulnIdentifierOther
      type: object
    AppSecIssueVulnIdentifierOWASP:
      properties:
        type:
          const: OWASP
          title: Type
          type: string
        value:
          examples:
            - A06:2021
          title: Value
          type: string
      required:
        - type
        - value
      title: AppSecIssueVulnIdentifierOWASP
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    AikidoCodeRepository:
      properties:
        _dlt_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Dlt Id
        _dlt_load_id:
          anyOf:
            - type: number
            - type: 'null'
          title: Dlt Load Id
        active:
          title: Active
          type: boolean
        branch:
          title: Branch
          type: string
        external_repo_id:
          title: External Repo Id
          type: string
        id:
          title: Id
          type: integer
        name:
          title: Name
          type: string
        provider:
          title: Provider
          type: string
      required:
        - id
        - name
        - external_repo_id
        - provider
        - active
        - branch
      title: AikidoCodeRepository
      type: object
    AkikidoCloud:
      properties:
        _dlt_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Dlt Id
        _dlt_load_id:
          anyOf:
            - type: number
            - type: 'null'
          title: Dlt Load Id
        environment:
          title: Environment
          type: string
        external_id:
          title: External Id
          type: string
        id:
          title: Id
          type: integer
        name:
          title: Name
          type: string
        provider:
          title: Provider
          type: string
      required:
        - id
        - name
        - provider
        - environment
        - external_id
      title: AkikidoCloud
      type: object
    AikidoContainer:
      properties:
        _dlt_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Dlt Id
        _dlt_load_id:
          anyOf:
            - type: number
            - type: 'null'
          title: Dlt Load Id
        id:
          title: Id
          type: integer
        name:
          title: Name
          type: string
        provider:
          title: Provider
          type: string
        registry_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Registry Name
      required:
        - id
        - name
        - provider
      title: AikidoContainer
      type: object
    AikidoIssueAttackSurfaceEnum:
      enum:
        - backend
        - cloud
        - docker_container
        - frontend
        - scm
        - cloud_instance
        - ''
      title: AikidoIssueAttackSurfaceEnum
      type: string
    AikidoIssueTypeEnum:
      enum:
        - cloud
        - eol
        - iac
        - leaked_secret
        - malware
        - mobile
        - open_source
        - sast
        - surface_monitoring
        - scm_security
        - license
        - ai_pentest
      title: AikidoIssueTypeEnum
      type: string
    WizRelatedIssuesNode:
      properties:
        nodes:
          anyOf:
            - items:
                $ref: '#/components/schemas/WizRelatedIssues'
              type: array
            - type: 'null'
          field_metadata:
            is_event_timestamp: false
            is_silver_identifier: false
            is_unique_identifier: false
            is_updated_at: false
            lookup_identifiers: []
            prefix: related_issue
          title: Nodes
      required:
        - nodes
      title: WizRelatedIssuesNode
      type: object
    WizRelatedIssues:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        severity:
          anyOf:
            - type: string
            - type: 'null'
          title: Severity
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
      title: WizRelatedIssues
      type: object
  securitySchemes:
    API-Key:
      in: header
      name: X-API-KEY
      type: apiKey
    Connection-ID:
      in: header
      name: X-CONNECTION-ID
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.