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

# Search issues

> Search for security issues across your repositories. You can filter by various criteria including custom rule ID.

To find all issues detected by a specific custom rule, include the `ruleId` parameter in your request.



## OpenAPI

````yaml https://zeropath.com/openapi/v1.yaml post /api/v1/issues/search
openapi: 3.1.0
info:
  title: ZeroPath API
  version: 1.0.0
  description: Public API for ZeroPath
servers:
  - url: https://zeropath.com
    description: Production server
    x-fern-server-name: Production
  - url: https://dev.branch.zeropath.com
    description: Development server
    x-fern-server-name: Development
security:
  - apiTokenId: []
    apiTokenSecret: []
tags:
  - name: Organizations
    description: Operations related to organizations
  - name: Stats
    description: Operations related to stats
  - name: Repositories
    description: Operations related to repositories
  - name: Installations
    description: Operations related to installations
  - name: Issues
    description: Operations related to issues
  - name: SCA
    description: Software Composition Analysis
  - name: Scans
    description: Operations related to scans
  - name: Rules
    description: Operations related to custom security rules
  - name: Referrals
    description: Operations related to referrals
paths:
  /api/v1/issues/search:
    post:
      tags:
        - Issues
      summary: Search issues
      description: >-
        Search for security issues across your repositories. You can filter by
        various criteria including custom rule ID.


        To find all issues detected by a specific custom rule, include the
        `ruleId` parameter in your request.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListIssuesInput'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ListIssuesInput:
      type: object
      properties:
        organizationId:
          type: string
        page:
          type: integer
          minimum: 1
          default: 1
        pageSize:
          type: integer
          minimum: 1
          default: 10
        searchQuery:
          type: string
        severities:
          type: object
          properties:
            min:
              type: integer
              minimum: 0
              maximum: 10
            max:
              type: integer
              minimum: 0
              maximum: 10
          required:
            - min
            - max
        scores:
          type: object
          description: >-
            Filter by score range (severity × confidence). Applied additively
            with other filters.
          properties:
            min:
              type: integer
              minimum: 0
              maximum: 100
              description: Minimum score (inclusive)
            max:
              type: integer
              minimum: 0
              maximum: 100
              description: Maximum score (inclusive)
          required:
            - min
            - max
        sortBy:
          type: string
          enum:
            - createdAt
            - severity
            - score
            - title
            - class
            - file
            - detected
            - patch
          default: score
        sortOrder:
          type: string
          enum:
            - asc
            - desc
          default: desc
        languages:
          type: array
          items:
            type: string
        vulnerabilityClasses:
          type: array
          items:
            type: string
        repositoryIds:
          type: array
          items:
            type: string
        projectId:
          type: string
        scanId:
          type: string
        codeScanTypes:
          type: array
          items:
            type: string
            enum:
              - FullScan
              - PrScan
          default:
            - FullScan
        types:
          type: array
          items:
            type: string
            enum:
              - open
              - patched
              - falsePositive
              - notExploitable
              - archived
              - closed
              - silenced
          default:
            - open
        status:
          type: array
          items:
            type: string
            enum:
              - PENDING_REVIEW
              - REVIEWING
              - PATCHING
              - NON_EXPLOITABLE
              - FALSE_POSITIVE
              - ACCEPTED_RISK
              - RESOLVED
              - BACKLOG
              - INFORMATIONAL
          description: Filter issues by issue status
        getCounts:
          type: boolean
        returnAll:
          type: boolean
        ruleId:
          type: string
          description: >-
            Filter issues by custom rule ID - returns only issues that were
            found by the specified custom rule
    IssueListResponse:
      type: object
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/Issue'
        totalCount:
          type: integer
        totalCountAllCategories:
          type: integer
        categoryCounts:
          $ref: '#/components/schemas/IssueCounts'
        currentPage:
          type: integer
        pageSize:
          type: integer
    Issue:
      type: object
      properties:
        id:
          type: string
        repositoryId:
          type: string
        repositoryName:
          type: string
        status:
          type: string
          enum:
            - open
            - patched
            - falsePositive
            - notExploitable
            - archived
            - silenced
        issueStatus:
          type: string
          enum:
            - PENDING_REVIEW
            - REVIEWING
            - PATCHING
            - NON_EXPLOITABLE
            - FALSE_POSITIVE
            - ACCEPTED_RISK
            - RESOLVED
            - BACKLOG
            - INFORMATIONAL
        generatedTitle:
          type: string
        generatedDescription:
          type: string
        businessLogicScenario:
          type: string
        language:
          type: string
        vulnClass:
          type: string
        cwes:
          type: array
          items:
            type: string
        vulnCategory:
          type: string
          enum:
            - SAST
            - SCA
            - IAC
            - SECRETS
            - SMART_CONTRACT
        severity:
          type: integer
        confidence:
          type: integer
        score:
          type: integer
        discoveryTool:
          type: string
        codeScanId:
          type: string
        affectedFile:
          type: string
        sastCodeSegment:
          type: string
        startLine:
          type: integer
        endLine:
          type: integer
        startColumn:
          type: integer
        endColumn:
          type: integer
        isPrBlocked:
          type: boolean
        validated:
          oneOf:
            - type: string
              enum:
                - CONFIRMED
                - DISCONFIRMED
                - UNKNOWN
            - type: 'null'
        validationSecurityAssessment:
          oneOf:
            - type: string
            - type: 'null'
        unpatchable:
          oneOf:
            - type: boolean
            - type: 'null'
        unpatchableReason:
          oneOf:
            - type: string
            - type: 'null'
        unpatchableRemediationInstructions:
          oneOf:
            - type: string
            - type: 'null'
        archivedAt:
          oneOf:
            - type: string
              format: date-time
            - type: 'null'
        noLongerDetectedAt:
          oneOf:
            - type: string
              format: date-time
            - type: 'null'
        noLongerDetectedReason:
          oneOf:
            - type: string
            - type: 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        naturalLanguageRuleEvaluationId:
          oneOf:
            - type: string
              description: >-
                ID of the natural language rule evaluation that found this issue
                (if applicable)
            - type: 'null'
        naturalLanguageRuleViolationId:
          oneOf:
            - type: string
              description: >-
                ID of the natural language rule violation that found this issue
                (if applicable)
            - type: 'null'
        naturalLanguageRuleViolation:
          oneOf:
            - type: object
              description: >-
                Natural language rule violation details if this issue was found
                by a custom rule
              properties:
                id:
                  type: string
                  description: Unique identifier for the rule violation
                ruleId:
                  type: string
                  description: ID of the rule that was violated
                title:
                  type: string
                  description: Title of the violation
                description:
                  type: string
                  description: Detailed description of why this is a violation
                confidence:
                  type: number
                  description: Confidence score for the violation (0-1)
                rule:
                  oneOf:
                    - type: object
                      description: The rule that was violated
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the rule
                        name:
                          oneOf:
                            - type: string
                              description: Name of the rule
                            - type: 'null'
                      required:
                        - id
                        - name
                    - type: 'null'
              required:
                - id
                - ruleId
                - title
                - description
                - confidence
            - type: 'null'
        codeScan:
          type: object
          properties:
            id:
              type: string
            scanTargetBranchCommitSha:
              oneOf:
                - type: string
                - type: 'null'
        stateChangeAuthor:
          type: string
        closedBy:
          oneOf:
            - type: object
              properties:
                id:
                  oneOf:
                    - type: string
                    - type: 'null'
                name:
                  oneOf:
                    - type: string
                    - type: 'null'
                email:
                  oneOf:
                    - type: string
                    - type: 'null'
            - type: 'null'
        falsePositiveReason:
          oneOf:
            - type: string
            - type: 'null'
        falsePositiveAt:
          oneOf:
            - type: string
              format: date-time
            - type: 'null'
        introducedBy:
          oneOf:
            - type: object
              properties:
                contributorId:
                  oneOf:
                    - type: string
                    - type: 'null'
                userId:
                  oneOf:
                    - type: string
                    - type: 'null'
                name:
                  oneOf:
                    - type: string
                    - type: 'null'
                email:
                  oneOf:
                    - type: string
                    - type: 'null'
                platform:
                  oneOf:
                    - type: string
                    - type: 'null'
                username:
                  oneOf:
                    - type: string
                    - type: 'null'
                profileUrl:
                  oneOf:
                    - type: string
                    - type: 'null'
                profileImageUrl:
                  oneOf:
                    - type: string
                    - type: 'null'
                lineStart:
                  oneOf:
                    - type: integer
                    - type: 'null'
                lineEnd:
                  oneOf:
                    - type: integer
                    - type: 'null'
                timestamp:
                  oneOf:
                    - type: string
                      format: date-time
                    - type: 'null'
            - type: 'null'
        scaVulnerabilityAlertingGroupId:
          oneOf:
            - type: string
              description: >-
                ID of the SCA vulnerability alerting group that created this
                issue (if applicable)
            - type: 'null'
        scaReachabilityAnalyses:
          oneOf:
            - type: array
              description: Reachability analyses associated with this SCA vulnerability
              items:
                type: object
                properties:
                  id:
                    type: string
                  title:
                    oneOf:
                      - type: string
                      - type: 'null'
                  description:
                    oneOf:
                      - type: string
                      - type: 'null'
                  confidence:
                    oneOf:
                      - type: number
                      - type: 'null'
                  severity:
                    oneOf:
                      - type: number
                      - type: 'null'
                  isFalsePositive:
                    oneOf:
                      - type: boolean
                      - type: 'null'
                  falsePositiveReasoning:
                    oneOf:
                      - type: string
                      - type: 'null'
                  pocCode:
                    oneOf:
                      - type: string
                      - type: 'null'
                  vulnerabilityLocation:
                    oneOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          filePath:
                            oneOf:
                              - type: string
                              - type: 'null'
                          startLine:
                            oneOf:
                              - type: integer
                              - type: 'null'
                          endLine:
                            oneOf:
                              - type: integer
                              - type: 'null'
                          startColumn:
                            oneOf:
                              - type: integer
                              - type: 'null'
                          endColumn:
                            oneOf:
                              - type: integer
                              - type: 'null'
                          snippet:
                            oneOf:
                              - type: string
                              - type: 'null'
                          language:
                            oneOf:
                              - type: string
                              - type: 'null'
                      - type: 'null'
                  cvssScore:
                    oneOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          cvssVector:
                            oneOf:
                              - type: string
                              - type: 'null'
                          severity:
                            oneOf:
                              - type: number
                              - type: 'null'
                      - type: 'null'
                required:
                  - id
            - type: 'null'
        patchAttemptErrorDuringScan:
          oneOf:
            - type: object
              properties:
                id:
                  type: string
                rawError:
                  type: string
                displayError:
                  type: string
                errorType:
                  type: string
                createdAt:
                  type: string
                  format: date-time
        prSubmissionErrorDuringScan:
          oneOf:
            - type: object
              properties:
                id:
                  type: string
                rawError:
                  type: string
                displayError:
                  type: string
                errorType:
                  type: string
                createdAt:
                  type: string
                  format: date-time
        patch:
          oneOf:
            - type: object
              properties:
                id:
                  type: string
                prLink:
                  oneOf:
                    - type: string
                    - type: 'null'
                prTitle:
                  oneOf:
                    - type: string
                    - type: 'null'
                prDescription:
                  oneOf:
                    - type: string
                    - type: 'null'
                gitDiff:
                  type: string
                pullRequestStatus:
                  type: string
                validated:
                  type: string
                createdAt:
                  type: string
                  format: date-time
                updatedAt:
                  type: string
                  format: date-time
            - type: 'null'
        detectedSecret:
          oneOf:
            - type: object
              properties:
                detectorName:
                  oneOf:
                    - type: string
                    - type: 'null'
                detectorDescription:
                  oneOf:
                    - type: string
                    - type: 'null'
                decoderName:
                  oneOf:
                    - type: string
                    - type: 'null'
                rotationGuide:
                  oneOf:
                    - type: string
                    - type: 'null'
                redactedSecret:
                  oneOf:
                    - type: string
                    - type: 'null'
                verified:
                  oneOf:
                    - type: boolean
                    - type: 'null'
            - type: 'null'
        url:
          type: string
          description: URL to view the issue in the ZeroPath UI
      required:
        - id
        - codeScanId
        - repositoryId
        - status
        - generatedTitle
        - generatedDescription
        - language
        - vulnClass
        - cwes
        - vulnCategory
        - severity
        - discoveryTool
        - affectedFile
        - sastCodeSegment
        - startLine
        - endLine
        - isPrBlocked
        - createdAt
        - updatedAt
        - url
    IssueCounts:
      type: object
      properties:
        open:
          type: integer
        patched:
          type: integer
        falsePositive:
          type: integer
        notExploitable:
          type: integer
        archived:
          type: integer
        silenced:
          type: integer
        closed:
          type: integer
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  securitySchemes:
    apiTokenId:
      type: apiKey
      in: header
      name: X-ZeroPath-API-Token-Id
      x-fern-header:
        name: apiTokenId
        env: ZEROPATH_API_TOKEN_ID
    apiTokenSecret:
      type: apiKey
      in: header
      name: X-ZeroPath-API-Token-Secret
      x-fern-header:
        name: apiTokenSecret
        env: ZEROPATH_API_TOKEN_SECRET

````