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

# Dismiss Findings

> Dismisses one or many findings of a repository in a single call, exactly like the Dismiss action in the dashboard: dismissed findings leave the active lists and the Hotlist and move to the repository's Dismissed tab, where they can be restored. Group findings by repository and scanner and send each group as one request.



## OpenAPI

````yaml /openapi.json post /api/analysis/findings/dismiss
openapi: 3.0.3
info:
  title: CodeAnt AI API
  description: >-
    API for code analysis (SAST, SCA, secrets, IaC) and developer productivity
    metrics. Supports GitHub, GitLab, Bitbucket, and Azure DevOps.
  version: 1.0.0
servers:
  - url: https://api.codeant.ai
    description: Production server
security: []
tags:
  - name: Analysis
    description: Code analysis operations
  - name: Agent Analysis
    description: >-
      AI-powered agent analysis operations. Uses LLM-based code exploration
      agents to perform deep security threat hunting, bug finding, and custom
      analysis with reflection-based false positive filtering.
  - name: Developer Metrics - Teams
    description: >-
      Manage developer teams: create, update, delete teams and manage team
      membership. Teams are used to organize developers and scope metrics.
  - name: Developer Metrics
    description: >-
      Developer productivity and activity metrics: active developers, PR
      throughput, individual comparisons, and AI-generated summaries. All
      endpoints support GitHub, GitLab, Bitbucket, and Azure DevOps.
  - name: Audit Logs
    description: >-
      Read-only access to your organization's audit trail for compliance, ETL
      and SIEM ingestion. Events are immutable, retained for 180 days, and cover
      security-relevant actions: user management, access control, credentials,
      scan triggers, configuration changes and data exports. Secrets and tokens
      are redacted and never appear in any response format.
  - name: Container Scanning
    description: >-
      Container image vulnerability scanning across AWS ECR, Azure ACR, and GCP
      GAR registries. List tracked containers with their latest scan, then fetch
      the full vulnerability findings of a scan — the same data shown on the
      Cloud Security → Container Scanning page. Authenticate with a CodeAnt API
      token (requires the `view_cloud_security: read` permission when token
      scoping is configured).
  - name: Security Hotlist
    description: >-
      The organization-wide security Hotlist: every SCA, SAST, secrets, IaC,
      cloud (CSPM) and AI-exploitation finding, deduplicated and priority-scored
      into one ranked list with live ticket, assignee and SLA state. Query it
      with filters, facets and cursor pagination, or export the full filtered
      list as an Excel workbook. Authenticate with a CodeAnt API token (requires
      the `view_code_security: read` permission when token scoping is
      configured).
paths:
  /api/analysis/findings/dismiss:
    post:
      tags:
        - Analysis
      summary: Dismiss Findings
      description: >-
        Dismisses one or many findings of a repository in a single call, exactly
        like the Dismiss action in the dashboard: dismissed findings leave the
        active lists and the Hotlist and move to the repository's Dismissed tab,
        where they can be restored. Group findings by repository and scanner and
        send each group as one request.
      operationId: dismissFindings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DismissFindingsRequest'
            example:
              platform: github
              org: owner
              repo: owner/repository
              analysis_type: sca
              dismiss_keys:
                - cross-spawn@7.0.3::package-lock.json::CVE-2024-21538
                - lodash@4.17.20
              reason: This alert is inaccurate or incorrect
              comment: Dev-only dependency, not shipped
      responses:
        '200':
          description: Findings dismissed
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  dismissed:
                    type: integer
                    description: Number of dismiss keys written.
                    example: 2
        '400':
          description: Missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Token lacks Code Security permission for this repository
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DismissFindingsRequest:
      type: object
      required:
        - platform
        - org
        - repo
        - analysis_type
        - dismiss_keys
      properties:
        platform:
          type: string
          enum:
            - github
            - gitlab
            - bitbucket
            - azure_devops
          description: Git platform of the organization
        org:
          type: string
          description: Organization / workspace slug
        repo:
          type: string
          description: Repository full name the findings belong to
          example: owner/repository
        github_base_url:
          type: string
          description: >-
            Self-hosted instance URL (also gitlab_base_url / bitbucket_base_url
            / azure_devops_base_url). Defaults to the cloud host.
          example: https://github.com
        analysis_type:
          type: string
          enum:
            - sast
            - sca
            - secrets
            - iac
          description: >-
            Scanner the findings come from. `raw.analysis_type` from the Hotlist
            API maps directly (`security` is accepted as an alias of `sast`).
        dismiss_keys:
          type: array
          minItems: 1
          items:
            type: string
          description: >-
            Finding identifiers to dismiss — one request dismisses any number of
            findings in one repo. Take them verbatim from `raw.dismiss_key` of
            the Hotlist API (`/api/security/hotlist/findings`), or build them
            from the per-repo results:


            - **sca** — `package@version` dismisses every advisory of the
            package; `package@version::<manifest relative_path>::<cve_id>`
            dismisses one advisory.

            - **sast** — `<file_path>||::||<context_code_block>||::||<test_id>`.

            - **secrets** —
            `<file_path>||::||<hashed_secret>:occurrence:<n>||::||<type>` (`n`
            is the 0-based index among identical secrets in that file).

            - **iac** —
            `<file_path>||::||<check_id>||::||<start_line>-<end_line>`.
          example:
            - cross-spawn@7.0.3::package-lock.json::CVE-2024-21538
            - lodash@4.17.20
        reason:
          type: string
          description: Shown as the dismissal reason in the dashboard.
          example: This alert is inaccurate or incorrect
        comment:
          type: string
          description: Free-text note stored with the dismissal.
        dismissed_by:
          type: string
          description: Attribution recorded on the dismissal; defaults to `api`.
          example: sec-automation@example.com
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message

````