Assign Ticket to Scan Results - POST /sast/results/tickets (v8.8.0 and up)

Assign ticket to scan results according to scan results and ticket/issue Id. Ticket/issue Id is usually provided by the ticketing system (e.g. Jira).

Usage

  1. GET /sast/scans/{id} and get details of a specific scan
  2. POST /sast/results/tickets and assign ticket to scan results

URL

http://localhost/cxrestapi/sast/results/tickets

Method:

POST

Media Type (header):

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

Parameters

Required:

resultsTicket=[body] – Ticket/results details:
resultsId=[string] – Unique Id of the result. ResultsId is made up of the Scan Id and Path Id (example: ScanId = 1000025, PathId = 12, therefore ResultsId = 1000025-12)
ticketId=[string] – Unique Id of the ticket/issue (see Notes).

Curl Sample:

curl -X POST --header 'Content-Type: application/json;v=1.0' --header 'Accept: application/json' --header 'Authorization: Bearer <access token> -d '{ \
   "resultsId": [ \
     "1000025-12" \
   ], \
   "ticketId": "1023" \
 }' 'http://localhost/cxrestapi/sast/results/tickets'

Sample Response:

no content

Success Response:

Code: 200 OK

Error Response:

Code: 400 Bad Request

Notes:

It is possible to assign a number of results (resultsId) to the same ticket (ticketId). Result Id is made up of the Scan Id and Path Id. Example: Scan Id = 1000025, Path Id = 12, therefore the Result Id = 1000025-12. Please refer to the instruction about how to get JIRA ticket/issue Id.