As of December 31st, 2023 ThreadFix 2.X has reached End of Life and is no longer supported. For any further information please contact the Success and Implementation team.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

/rest/tasks/failTask

 

Descriptor

Value

HTTP Method

POST

Description

Marks a task as failed, to complete it without a file upload.

Restricted

True

 

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:


curl --insecure -H 'Accept: application/json' -X POST --data 'scanQueueTaskId=3&message=Just because&scanAgentSecureKey=yMFCvtcmBtAARYS5QX8x54zvMruNLIvNMzqMI44K4JG8&secureTaskKey=AOA8veR8QNrSTgm2mzcTxmfoHj1iF0fQVoInXNuZE' http://localhost:8080/threadfix/rest/tasks/failTask?apiKey={apiKey}

 

Sample Output:


{
    "message": "",
    "success": true,
    "responseCode": -1,
    "object": "ScanAgent reported that the scan task: 3 had failed client-side for the following reason: Just because"
}

  • No labels