Skip to main content

Checkmarx One API - Upload Source

Endpoint

PUT /{uploadLink}

Description

Upload a zip archive to Checkmarx One in order to scan the content. The Path parameter is the link that was generated using POST Generate Upload Link. The Body parameter is the path to the zip archive on your local machine.

Workflow

  1. Use POST /api/uploads to generate an upload link.

  2. Use PUT /{uploadLink} , specifying the path to your zip archive, to upload your file.

  3. Use POST /api/scans , specifying the Project ID and upload link, to scan the zip archive.

  4. Use GET /api/scans/{scanId} to check the status of the scan.

  5. View the results using GET /api/results, specifying the Scan ID. Alternatively, you can view the results in the Checkmarx One web portal (UI), see Scan Results.

Curl Sample

curl --location --request PUT '"https://<YOUR_UPLOAD_LINK>"'\
--header 'Content-Type: application/zip'\
--header 'Authorization: Bearer <YOUR_TOKEN>'\
--data-binary '@/X:/Projects/SupportProject-master.zip'

Media Type (header)

Authorization: Bearer <access_token>

Accept: application/json

Parameters

Path Parameter - Required

Parameter

Type

Description

uploadLink

string

The link generated by using “POST Generate Upload Link”.

Body Parameter - Required

Parameter

Type

Enum

Description

{string}

string

-

The path on your local machine to the zip archive you would like to scan.

Success Response

Code: 200 OK

There is no body for the success response.

Error Response