Download SBOM of an Image

You can download the SBOM report in SPDX and CycloneDX (CDX) formats with the help of the SBOM download API. 

GET/csapi/v1.3/images/{imageSha}/sbom/download

Input ParametersInput Parameters

Parameter

Mandatory/Optional

Data Type

Description

imageSha Mandatory string Indicates SHA value of the image.
sbomType Mandatory string Indicates type of the SBOM you want to download.
Valid Values: SPDX, or CYCLONEDX

SampleSample

API request

curl -X 'GET' \
'<qualys_base_url>/csapi/v1.3/images/5a3c93f8edbc011a160dccbe33a17269004f9d7fc2da59d393b30fbd9e60d7e2/sbom/download?sbomType=SPDX' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \

Response

{
  "data": [
    {
      "imageId": "fdf935485c39",
      "created": "1722328423000",
      "updated": "1727093528962",
      "sha": "6874b21dfe6b5964c608254f83aec269ec4c916d6a9e55f48b24c3f174150f57",
      "uuid": "f1fe2d3f-1f6b-32c7-92fb-5378f218453c",
      "name": "happy_snyder",
      "host": {
        "sensorUuid": "9ab35e80-4ecc-4af7-a774-87a752631bc6",
        "hostname": "ntest_123",
        "ipAddress": "10.115.119.175",
        "uuid": "16c09c4f-fbda-4845-930b-d5965c3562ac",
        "lastUpdated": "2024-09-20T04:59:16.842Z"
      },
      "state": "UNKNOWN",
      "imageUuid": "fc3833ed-783b-3224-9c5a-637ab7e5dc6d",
      "containerId": "6874b21dfe6b",
      "stateChanged": "1727093502633",
      "lastVmScanDate": "1727083410250",
      "isRoot": true,
      "vulnerabilities": {
        "severity5Count": 1,
        "severity3Count": 2,
        "severity4Count": 5,
        "severity1Count": 0,
        "severity2Count": 0
      },
      "exceptions": null,
      "riskScore": 126,
      "riskScoreCalculatedDate": "1727083410248",
      "formulaUsed": "MIN (1000 , 2 * ( 0.6 * 71.00 * Pow(5,0.01) + 0.4 * 50.00 * Pow(2,0.01) ))",
      "maxQdsScore": 95,
      "qdsSeverity": "CRITICAL",
      "isExposedToWorld": false,
      "scanTypes": [
        "DYNAMIC"
      ],
      "cluster": null,
      "criticality": null,
      "criticalityUpdated": null,
      "compliance": {
        "failCount": 8,
        "passCount": 16,
        "errorCount": 0
      },
      "lastComplianceScanDate": "1726815129386"
    }
  }
],
.
.
.
"count": 8
}