Scanning API
The Scanning API allows you to programmatically trigger security scans, check scan status, and retrieve scan results for your Infrastructure as Code repositories.Base URL
Authentication
All endpoints require authentication via theX-CLOUDGENI-API-KEY header. See API Authentication for details.
Endpoints
List Repositories
Get all repositories in your organization.GET
/organizations/{orgId}/repositories| Parameter | Type | Description |
|---|---|---|
orgId | string | Organization ID |
| Parameter | Type | Description | Default |
|---|---|---|---|
limit | integer | Results per page (1-100) | 20 |
offset | integer | Pagination offset | 0 |
provider | string | Filter by git provider (github, gitlab, azure-devops) | - |
Trigger Scan
Start a new scan on a repository.POST
/organizations/{orgId}/repositories/{repoId}/scans| Parameter | Type | Description |
|---|---|---|
orgId | string | Organization ID |
repoId | string | Repository ID |
| Field | Type | Description | Required |
|---|---|---|---|
branch | string | Branch to scan | No (defaults to default branch) |
commit | string | Specific commit SHA | No |
type | string | Scan type: static, full | No (default: static) |
Get Scan Status
Check the status of a scan.GET
/organizations/{orgId}/repositories/{repoId}/scans/{scanId}| Parameter | Type | Description |
|---|---|---|
orgId | string | Organization ID |
repoId | string | Repository ID |
scanId | string | Scan ID |
| Status | Description |
|---|---|
queued | Scan is waiting to start |
running | Scan is in progress |
completed | Scan finished successfully |
failed | Scan encountered an error |
cancelled | Scan was cancelled |
List Scans
Get scan history for a repository.GET
/organizations/{orgId}/repositories/{repoId}/scans| Parameter | Type | Description |
|---|---|---|
orgId | string | Organization ID |
repoId | string | Repository ID |
| Parameter | Type | Description | Default |
|---|---|---|---|
limit | integer | Results per page (1-100) | 20 |
offset | integer | Pagination offset | 0 |
status | string | Filter by status | - |
branch | string | Filter by branch | - |
Get Scan Findings
Retrieve findings from a completed scan.GET
/organizations/{orgId}/repositories/{repoId}/scans/{scanId}/findings| Parameter | Type | Description |
|---|---|---|
orgId | string | Organization ID |
repoId | string | Repository ID |
scanId | string | Scan ID |
| Parameter | Type | Description | Default |
|---|---|---|---|
limit | integer | Results per page (1-100) | 20 |
offset | integer | Pagination offset | 0 |
severity | string | Filter: critical, high, medium, low, info | - |
status | string | Filter: open, resolved, suppressed | - |
Webhooks
Scan Completed Webhook
Configure webhooks to receive notifications when scans complete. Webhook Payload:Code Examples
Trigger Scan and Wait for Results
Check for Critical Findings
Error Responses
Common Errors
400 Bad Request - Invalid request parameters:Rate Limits
Scanning API has specific rate limits:| Operation | Limit |
|---|---|
| Trigger scan | 10 per minute |
| Get status | 60 per minute |
| List findings | 30 per minute |