v1

latestOpenAPI 3.0.32026-07-22238629559.2 KB
ScansService

Get scan details

Request the details of a scan including the associated deployment, repository, and commit information.

get/api/v1/deployments/{deploymentId}/scan/{scanId}

Path parameters

deploymentIdstring int64 required

Deployment ID (numeric). Example: 123. Can be found at /deployments, or in your Settings in the web UI.

scanIdstring int64 required

Scan ID (numeric). Example: 456. Can be found at /deployments/{deploymentId}/scans/search.

Response

OK

completed_atstring

imestamp of when the scan started.

deployment_idinteger

The unique ID of the deployment associated with the scanned repository.

enabled_productsstring[]

The products used when running the scan.

exit_codeinteger
has_logsboolean
idinteger

The unique ID representing this scan.

repository_idinteger

The unique ID of the repository that was scanned.

started_atstring

when the scan was started

statsobject

Miscellaneous statistics about the scan, like number of findings found and scan duration.

Example response

{
  "completed_at": "2023-11-18T23:28:12.391Z",
  "deployment_id": 120,
  "enabled_products": [
    "secrets"
  ],
  "id": 123,
  "meta": {
    "true": "pull_request",
    "branch": "refs/heads/main",
    "commit": "94c5be1312a9da03b7c4bfcc1c50b4379c83412",
    "config": "r/python",
    "repo_url": "https://github.com/semgrep/semgrep",
    "ci_job_url": "https://github.com/semgrep/semgrep/actions/runs/12345",
    "repository": "semgrep/semgrep",
    "commit_author_name": "Sven Greppe",
    "commit_author_image_url": "https://github.com/link/to/avatar.png",
    "commit_author_email": "sven.greppe@semgrep.com",
    "commit_author_username": "SvenGreppe",
    "pull_request_author_username": "SvenGreppe",
    "pull_request_author_image_url": "https://github.com/link/to/avatar.png"
  },
  "repository_id": 1234567,
  "started_at": "2023-11-18T23:28:12.391Z",
  "stats": {
    "findings": 5,
    "total_time": 100
  }
}