Skip to main content
POST
/
api
/
analysis
/
scan-history
curl --request POST \
  --url https://api.codeant.ai/api/analysis/scan-history \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "repo": "owner/repository",
  "platform": "github",
  "org": "owner",
  "github_base_url": "https://github.com"
}
'
{
  "repo": "owner/repository",
  "last_analysis_results": [
    {
      "commit_id": "abc123def456",
      "branch": "main",
      "timestamp": "2025-01-15T10:30:00Z",
      "status": "completed"
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token for the git provider (GitHub PAT, GitLab PAT, Bitbucket App Password, Azure DevOps PAT). Pass via Authorization: Bearer <token> header.

Body

application/json
repo
string
required

Repository identifier (format varies by platform)

Example:

"owner/repository"

platform
enum<string>
required

Version control platform

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

"github"

org
string
required

Organization or workspace name

Example:

"owner"

github_base_url
string
default:https://github.com

GitHub base URL (for self-hosted instances)

gitlab_base_url
string
default:https://gitlab.com

GitLab base URL (for self-hosted instances)

azure_devops_base_url
string
default:https://dev.azure.com

Azure DevOps base URL

bitbucket_base_url
string
default:https://api.bitbucket.org/2.0

Bitbucket base URL (for self-hosted instances)

Response

Scan history retrieved successfully

repo
string

Repository identifier

last_analysis_results
object[]

List of last analysis results for each scanned commit