Get Report Status by Id - GET /reports/sastScan/{id}/status (v8.8.0 and up)
Get the status of a generated report. To retrieve the specified report once the status is known you can use GET /reports/sastScan/{id}. To first generate a report (id) you can use POST /reports/sastScan.
Usage:
- GET /reports/sastScan/{id}/status and get the status of the specific report
- GET /reports/sastScan/{id} and get the report when ready
URL
http://localhost/cxrestapi/reports/sastScan/{id}/status
Method:
GET
Media Type (header):
Authorization: Bearer <access token value>
Accept: application/json;v=1.0
Parameters
Required:
id=[string] – Unique Id of the report
Curl Sample:
curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer <access token> 'http://localhost/cxrestapi/reports/sastScan/1000057/status'
Sample Response:
{
"link": {
"rel": "content",
"uri": "/reports/sastScan/51"
},
"contentType": "application/xml",
"status": {
"id": 2,
"value": "Created"
}
}
Success Response:
Code: 200 OK
Error Response:
Code: 404 Not Found
Notes:
- Retrieves the status of a generated report. If the request fails, it returns an error response. Possible status: 0=Deleted, 1=In Process, 2=Created or 3=Failed.
- CxOrigin verifies that the request comes from a plugin (for example Jenkins or CLI). Once verified, users with SAVE_SAST_SCAN permission can complete the call.
Read more: