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
Use
POST /api/uploads
to generate an upload link.Use
PUT /{uploadLink}
, specifying the path to your zip archive, to upload your file.Use
POST /api/scans
, specifying the Project ID and upload link, to scan the zip archive.Use
GET /api/scans/{scanId}
to check the status of the scan.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 -X PUT "https://ast.checkmarx.net/storage/uploads.ast.checkmarx.net-eu-west-1-941355383184/2021_06_08_06_28_24.853?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ast%2F20210608%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20210608T062824Z&X-Amz-Expires=86400&X-Amz-Signature=1e61cae58f1ac273e7f251e13ee6755599&X-Amz-SignedHeaders=host” -H "accept: application/json" -d "{ "c:\users\me\Desktop\Python-file.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.