- Checkmarx Documentation
- Checkmarx SCA
- Checkmarx SCA (REST) API Documentation
- Checkmarx SCA (REST) API - Scan Upload
- Checkmarx SCA (REST) API - PUT Upload Link
Checkmarx SCA (REST) API - PUT Upload Link
Description
Upload a ZIP file to Checkmarx SCA. The Path parameter is the previously generated link (using POST Generate Upload Link). The Body parameter is the path to the zip file on your local machine.
Method
PUT
Workflow
Use
POST /api/uploads
to generate an upload link.Use
PUT {upload_url}
, specifying the path to your zip file, to upload your file.Use
POST /api/scans
, specifying the Project ID and upload link, to scan the zip file.Use
GET /api/scans/{scanId}
to check the status of the scan.View the results using the Scan Reports API. Alternatively, you can view the results in the Checkmarx SCA web browser (UI), see Viewing Results.
Headers
Authorization: Bearer <access_token>
Content-Type: application/zip
Parameters
Path Parameter - Required
Parameter | Description |
---|---|
Upload url | The link generated by using “POST Generate Upload Link”. |
Parameters - Required
Format: data-binary
Parameter | Description |
---|---|
Zip file | The path on your local machine to the ZIP file you would like to scan. |
Curl Sample
curl --location --request PUT 'https://uploads.sca.checkmarx.net/{Upload-URL}’\ --header 'Content-Type: application/zip' \ --header 'Authorization: Bearer <<TOKEN>>' \ --data-binary '@/D:/Projects/sqlcipher-windows-master.zip'
Success Response
Code: 200 OK
There is no body for the success response.
Error Response
Message: Message: |