Update SAST Scan Settings - PUT /sast/scanSettings (8.6.0)

Update the SAST scan settings for a project (preset, engine configuration, custom actions and email notifications).

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. PUT /sast/scanSettings and update the SAST scan settings for a project

URL

/cxrestapi/sast/scanSettings

Method:

PUT

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

Optional (if already defined, see Notes section):

postScanActionId=[integer] – Unique Id of the post scan action
emailNotifications=[body] – Email notification details:
beforescan=[string] – Specifies the email to send the pre-scan notification
failedScans=[string] – Specifies the email to send the scan failure notification
afterScans=[string] – Specifies the email to send the post-scan notification

Success Response:

Code: 200 OK

Error Response:

Code: 400 Bad Request

Sample Response:

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

Notes:

Updates the SAST scan settings for a project. While certain parameters are optional, if a project already has these details available (i.e. post scan action and email notifications), not providing them when running PUT /sast/scanSettings, will automatically delete them. If the request fails, it returns an error response.