Skip to main content
POST
/
api
/
analysis
/
agents
/
scan
/
history
Get Agent Scan History
curl --request POST \
  --url https://api.codeant.ai/api/analysis/agents/scan/history \
  --header 'Content-Type: application/json' \
  --data '
{
  "repo": "owner/repository"
}
'
{
  "scans": [
    {
      "service": "github",
      "repo_name": "owner/repository",
      "branch": "main",
      "commit_id": "abc123def456",
      "scan_id": "aB3xK9mP2q",
      "prompt": "threat_hunting",
      "timestamp": "2025-03-15T10:30:00Z",
      "num_files": 142
    },
    {
      "service": "github",
      "repo_name": "owner/repository",
      "branch": "develop",
      "commit_id": "def456ghi789",
      "scan_id": "zY8wV7uT6s",
      "prompt": "bug_finding",
      "timestamp": "2025-03-14T08:15:00Z",
      "num_files": 98
    }
  ]
}

Body

application/json
repo
string
required

Repository identifier

Example:

"owner/repository"

Response

Scan history retrieved successfully

scans
object[]

List of past agent scans, sorted by most recent first