Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
/rest/{version}/tasks/failTask
Descriptor | Value |
---|---|
HTTP Method | POST |
Description | Marks a task as failed, to complete it without a file upload. |
Required Permission | Manage Scan Agents |
Version Introduced | 2.4.0 |
Request Header Parameters
Parameter | Value | Required | Description |
---|---|---|---|
Accept | String | Yes | A value of ‘application/json’ must be provided. |
Request POST Data Parameters
Parameter | Value | Required | Description |
---|---|---|---|
scanQueueTaskId | Integer | Yes | ID for the Scan Agent Task to mark as failed. |
message | String | Yes | A message to provide as the reason for the failure. Viewable from the Scan Agent Tasks page. |
scanAgentSecureKey | String | Yes | A Secure Scan Agent Key obtained from the “Request Scan Agent Key” call. Must be the same one used to assign the Task from the queue. |
secureTaskKey | String | Yes | The Secure Task Key that was returned when the Task was assigned from the queue. |
Sample Call:
Code Block | ||
---|---|---|
| ||
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apiKey}" -X POST --data 'scanQueueTaskId=3&message=Just because&scanAgentSecureKey=yMFCvtcmBtAARYS5QX8x54zvMruNLIvNMzqMI44K4JG8&secureTaskKey=AOA8veR8QNrSTgm2mzcTxmfoHj1iF0fQVoInXNuZE' http://localhost:8080/threadfix/rest/latest/tasks/failTask
|
Sample Output:
Code Block | ||
---|---|---|
| ||
{ "message": "", "success": true, "responseCode": -1, "object": "ScanAgent reported that the scan task: 3 had failed client-side for the following reason: Just because" } |
Page Tree | ||
---|---|---|
|