> ## 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.

# Get Analysis Results

> Retrieves the analysis results for a specific repository and commit



## OpenAPI

````yaml /openapi.json post /api/analysis/results
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.
paths:
  /api/analysis/results:
    post:
      tags:
        - Analysis
      summary: Get Analysis Results
      description: Retrieves the analysis results for a specific repository and commit
      operationId: getAnalysisResults
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalysisResultsRequest'
            examples:
              github:
                summary: GitHub repository example
                value:
                  repo: owner/repository
                  commit_id: abc123def456
                  access_token: ghp_xxxxxxxxxxxx
                  service: github
              azuredevops:
                summary: Azure DevOps repository example
                value:
                  repo: organization/project/repository
                  commit_id: abc123def456
                  access_token: pat_xxxxxxxxxxxx
                  service: azuredevops
      responses:
        '200':
          description: Analysis results retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalysisResults'
              example:
                security_issues:
                  - type: SQL Injection
                    severity: high
                    file: src/database.py
                    line: 42
                    description: Potential SQL injection vulnerability
                summary:
                  total_issues: 1
                  high_severity: 1
                  medium_severity: 0
                  low_severity: 0
        '401':
          description: Invalid access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Access token invalid
        '404':
          description: No scan results found for the provided branch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: No scan results found for branch 'main'
                message: No scans have been run for this branch
components:
  schemas:
    AnalysisResultsRequest:
      type: object
      required:
        - repo
        - access_token
        - service
      properties:
        repo:
          type: string
          description: Repository identifier (format varies by service)
          example: owner/repository
        commit_id:
          type: string
          description: >-
            Git commit SHA or identifier. Either commit_id or branch is
            required. If both are provided, commit_id takes precedence.
          example: abc123def456
        branch:
          type: string
          description: >-
            Git branch name. When provided without commit_id, the service
            resolves the latest commit from scan history for this branch. Either
            commit_id or branch is required.
          example: main
        access_token:
          type: string
          description: Authentication token for the service
          example: ghp_xxxxxxxxxxxx
        service:
          type: string
          description: Version control service provider
          enum:
            - github
            - azuredevops
            - gitlab
            - bitbucket
          example: github
    AnalysisResults:
      type: object
      description: Analysis results containing security issues and summary
      properties:
        security_issues:
          type: array
          description: List of security issues found
          items:
            type: object
            properties:
              type:
                type: string
                description: Type of security issue
              severity:
                type: string
                enum:
                  - critical
                  - high
                  - medium
                  - low
                  - info
                description: Severity level of the issue
              file:
                type: string
                description: File path where issue was found
              line:
                type: integer
                description: Line number where issue was found
              description:
                type: string
                description: Detailed description of the issue
        summary:
          type: object
          description: Summary statistics of the analysis
          properties:
            total_issues:
              type: integer
              description: Total number of issues found
            critical_severity:
              type: integer
              description: Number of critical severity issues
            high_severity:
              type: integer
              description: Number of high severity issues
            medium_severity:
              type: integer
              description: Number of medium severity issues
            low_severity:
              type: integer
              description: Number of low severity issues
            info_severity:
              type: integer
              description: Number of informational issues
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message

````