Analysis

Initiates a background analysis task for a repository

post/api/analysis/start

Request

  • Base URL
    https://api.codeant.ai
  • URL
    https://api.codeant.ai/api/analysis/start
  • Auth
    none declared

Request body

repostring required

Repository identifier (format varies by service)

commit_idstring required

Git commit SHA or identifier

access_tokenstring required

Authentication token for the service

service'github' | 'azuredevops' | 'gitlab' | 'bitbucket' required

Version control service provider

branchstring

Git branch name

include_filesstring

Comma-separated file patterns to include in analysis

exclude_filesstring

Comma-separated file patterns to exclude from analysis

scan_typesstring[]

Subset of scanners to run. Omit (or send an empty list) to run the full analysis. Scanners left out report status: done with empty results for that commit.

Example request

{
  "repo": "owner/repository",
  "commit_id": "abc123def456",
  "access_token": "ghp_xxxxxxxxxxxx",
  "service": "github",
  "branch": "main",
  "include_files": "src/**/*.py,lib/**/*.js,app/**/*.ts",
  "exclude_files": "tests/**,node_modules/**,dist/**",
  "scan_types": [
    "sca"
  ]
}

Response

Analysis successfully started

messagestring

Success message

Changes

    • info

      added the new optional request property

    • info

      added the non-success response with the status