Get All Scan Details in Queue - GET /sast/scansQueue (v8.6.0 to v8.7.0)

Get details of all SAST scans in the scans queue. The scan queue can also be filtered by project Id. In order to retrieve the details of a SAST scan in the scan queue you should first create a scan. To create a new scan use POST /sast/scans.

Usage

  1. POST /sast/scans and create a new SAST scan
  2. GET /sast/scansQueue and get details of all SAST scans in the scans queue

URL

/cxrestapi/sast/scansQueue.

Method:

GET

Media Type (header):

Authorization: Bearer <access token value>
Accept: application/json;v=0.1/1.0

URL Parameters

projectId=[integer] – Unique Id of the project

Success Response:

Code: 200 OK

Error Response:

Code: 400 Bad Request

Sample Response:

[
  {
    "id": 1000005,
    "stage": {
      "id": 4,
      "value": "Scanning"
    },
    "teamId": "00000000-1111-1111-b111-989c9070eb11",
    "project": {
      "id": 2,
      "name": "Project 1",
      "link": {
        "rel": "project",
        "uri": "/projects/2"
      }
    },
    "engine": {
      "id": 1,
      "link": {
        "rel": "engine-server",
        "uri": "/sast/engineServers/1"
      }
    },
    "loc": 6838,
    "languages": [
      {
        "id": 1,
        "name": "CSharp"
      },
      {
        "id": 8,
        "name": "JavaScript"
      },
      {
        "id": 64,
        "name": "VbScript"
      },
      {
        "id": 1073741824,
        "name": "Common"
      }
    ],
    "dateCreated": "2017-12-03T16:50:02.987",
    "queuedOn": "2017-12-03T16:50:27.423",
    "engineStartedOn": "2017-12-03T16:50:34.127",
    "isIncremental": true,
    "isPublic": true,
    "origin": "Web Portal"
  }
]

Note:

Retrieves details of all SAST scans in the scans queue. If the request fails, it returns an error response. 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.