Define SAST Scan Scheduling Settings - PUT /sast/project/{projectId}/scheduling (8.8.0 and up)

Define SAST scan scheduling settings for a project. 

Usage

  1. GET /projects and get details of all visible projects
  2. PUT /sast/project/{projectId}/scheduling and update the SAST scan scheduling settings for a project

URL

http://localhost/cxrestapi/sast/project/{projectId}/scheduling

Method:

PUT

Media Type (header):

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

Parameters

Required:

projectId=[integer] – Unique Id of the project

Optional:

scanScheduling=[body] – Scan scheduling details:
scheduleType=[string] – Specifies the schedule type (none or weekly)
scheduledDays=[string] – Specifies the day(s) to perform the scan (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday). Comma separate days can also be defined scheduleTime=[string] – Specifies the time(s) to perform the scan (hh:mm)

Curl Sample:

curl -X PUT --header 'Content-Type: application/json;v=1.0' --header 'Accept: application/json' --header 'Authorization: Bearer <access token> -d '{ \
   "scheduleType": "weekly", \
   "scheduledDays": [ \
     "Monday", "Thursday" \
   ], \
   "scheduleTime": "23:00" \
 }' 'http://localhost/cxrestapi/sast/project/1/scheduling'

Sample Response:

no content

Success Response:

Code: 204 no content

Error Response:

Code: 400 Bad Request

Notes:

Defines the SAST scan scheduling settings for a project. If the request fails, it returns an error response.