POST
/
api
/
analysis
/
results
curl --request POST \
--url http://api.codeant.ai/api/analysis/results \
--header 'Content-Type: application/json' \
--data '{
"repo": "owner/repository",
"commit_id": "abc123def456",
"access_token": "ghp_xxxxxxxxxxxx",
"service": "github"
}'
{
  "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
  }
}

Body

application/json
repo
string
required

Repository identifier (format varies by service)

Example:

"owner/repository"

commit_id
string
required

Git commit SHA or identifier

Example:

"abc123def456"

access_token
string
required

Authentication token for the service

Example:

"ghp_xxxxxxxxxxxx"

service
enum<string>
required

Version control service provider

Available options:
github,
azuredevops,
gitlab,
bitbucket
Example:

"github"

Response

Analysis results retrieved successfully

Analysis results containing security issues and summary

security_issues
object[]

List of security issues found

summary
object

Summary statistics of the analysis