v1

latestOpenAPI 3.0.32026-07-22238629559.2 KB
ScansService

List scans (beta)

List the scans associated with a particular repository over the past 30 days.

post/api/v1/deployments/{deploymentId}/scans/search

Path parameters

deploymentIdstring int64 required

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

Request body

branchstring

Only get scans from the specified branch

cursorstring

Cursor to paginate through the results

deploymentIdstring int64

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

is_full_scaninteger

Only get scans that are full scans (if false, only get diff scans)

limitinteger

Page size to paginate through the results (default is 100, max is 500)

productsstring[]

Only get scans that have these enabled products

valuedescription
PRODUCT_SAST
PRODUCT_SCA
PRODUCT_SECRETS
PRODUCT_AI_SAST
repository_idinteger

Only get scans for this repo

sincestring date-time

Only get scans created after this time. Provide time in ISO 8601 format.

statusesinteger

Only get scans that have one of these statuses

valuedescription
SCAN_STATUS_RUNNINGThe scan is currently running
SCAN_STATUS_COMPLETEDThe scan has completed successfully (0 or 1 exit code)
SCAN_STATUS_PENDINGThe scan is queued and waiting to start
SCAN_STATUS_CANCELLEDThe scan was cancelled before completion
SCAN_STATUS_ERRORThe scan has exited with a failure (exit code not 0 or 1)
SCAN_STATUS_NEVER_FINISHEDThe scan did not report an error or success after over an hour

Response

OK

cursorstring

Cursor to retrieve the next page of results.

Example response

{
  "scans": [
    {
      "branch": "main",
      "commit": "6d3de02545f820febf2af9820568fa5f697d4087",
      "completed_at": "2020-11-18T23:30:10.216Z",
      "enabled_products": [
        "secrets"
      ],
      "is_full_scan": true,
      "started_at": "2020-11-18T23:28:12.391Z",
      "status": "SCAN_STATUS_RUNNING",
      "total_time": 17.32
    }
  ]
}