Define SAST Scan Settings - POST /sast/scanSettings (8.6.0)

Define the SAST scan settings according to a project (preset and engine configuration).

Usage

  1. GET /projects and get details of all visible projects
  2. GET /sast/presets and get details of all presets
  3. GET /sast/engineConfigurations and get engine configurations list
  4. POST /sast/scanSettings and define the SAST scan preset and configuration settings

URL

/cxrestapi/sast/scanSettings

Method:

POST

Media Type (header):

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

Parameters

Required:

scanSettings=[body] – Scan settings:
projectId=[integer] – Unique Id of the project
presetId=[integer] – Unique Id of the preset
engineConfigurationId=[integer] – Unique Id of the engine configuration

Success Response:

Code: 200 OK

Error Response:

Code: 400 Bad Request

Sample Response:

{
  "id": 2,
  "link": {
    "rel": "self",
    "uri": "/sast/scanSettings/2"
  }
}

Notes:

Defines the SAST scan settings according to a project. If the request fails, it returns an error response. Defines project scan settings regardless of whether the scan has been created.