Get Scan Queue Details by Scan Id - GET /sast/scansQueue/{id} (8.7.0 and up)
Get details of a specific CxSAST scan in the scan queue according to the scan Id.
Usage:
- POST /sast/scans and create a new SAST scan.
- GET /sast/scansQueue/{id} and get scan queue details by scan Id.
URL
http://localhost/cxrestapi/sast/scansQueue/{id}
Method:
GET
Media Type (header):
Authorization: Bearer <access token value>
Accept: application/json;v=1.0
URL Parameters
Required:
id=[integer] – Unique Id of the scan
Curl Sample:
curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer <access token> 'http://localhost/cxrestapi/sast/scansQueue/1000062'
Sample Response:
{
"id": 1000015,
"stage": {
"id": 3,
"value": "Queued"
},
"stageDetails": null,
"stepDetails": null,
"project": {
"id": 13,
"name": "Project 1 (REST)",
"link": {
"rel": "project",
"uri": "/projects/13"
}
},
"engine": null,
"languages": [
{
"id": 1,
"name": "CSharp"
},
{
"id": 8,
"name": "JavaScript"
},
{
"id": 64,
"name": "VbScript"
},
{
"id": 1073741824,
"name": "Common"
}
],
"teamId": "00000000-1111-1111-b111-989c9070eb11",
"dateCreated": "2018-02-22T10:29:43.477",
"queuedOn": "2018-02-22T10:29:54.367",
"engineStartedOn": null,
"completedOn": null,
"loc": 6836,
"isIncremental": false,
"isPublic": true,
"origin": "Other",
"queuePosition": 1,
"totalPercent": 0,
"stagePercent": 0,
"initiator": "admin admin"
Success Response:
Code: 200 OK
Error Response:
Code: 400 Bad Request
Notes:
Retrieves details of a specific SAST scan in the scan queue according to the scan Id. If the request fails, it returns an error response. If the queue is empty it does not provide any details. Must be a valid (registered) engine server in order to get details. Possible stages are: 1=New, 2=PreScan, 3=Queued, 4=Scanning, 6=PostScan, 7=Finished, 8=Canceled, 9=Failed, 10=SourcePullingAndDeployment or 1001=None.
Read more: