Update Queued Scan Status by Scan Id - PATCH /sast/scansQueue/{id} (v8.7.0 and up)

Update (Cancel) a running scan in the queue according to the scan Id.

Usage:

  1. GET /sast/scansQueue and get all scan queue details
  2. PATCH /sast/scansQueue/{id} and update queued scan status

URL

http://localhost/cxrestapi/sast/scansQueue/{id}

Method:

PATCH

Media Type (header):

Authorization: Bearer <access token value>
Content-Type: application/json;v=1.0
cxOrigin: {request_origin}

URL Parameters

Required:

id=[integer] – Unique Id of a specific scan in the queue

scanRequest=[body] – scan status:
status=[string] – Requested scan status in the queue. Status option includes Canceled.

Curl Sample:

curl -X PATCH --header 'Content-Type: application/json;v=1.0' --header 'Accept: application/json' --header 'Authorization: Bearer <access token> -d \
'{ \
"status": "Canceled" \
}' \
'http://localhost/cxrestapi/sast/scansQueue/1000062'

Sample Response:

no content

Success Response:

Code: 200 OK

Error Response:

Code: 400 Bad Request

Notes:

Updates a running scan in the queue according to the scan Id. If the request fails, it returns an error response.