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 3 Next »

/rest/tasks/requestTask

 

Descriptor

Value

HTTP Method

POST

Description

Requests the next available task off the queue.  It is worth noting that the output includes a very large data blob, and that the call also returns a “secureTaskKey” that you will need for future calls.

Required Permission

Manage Scan Agents

Version Introduced2.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

Available Values

scanners

String, comma separated list

Yes

Acceptable scanner types.  Use this to only select tasks from specified scanner types.

“Acunetix WVS”, “AppSpider”, “Burp Suite Pro”, “IBM Security AppScan Standard”, “Nessus”, “OWASP Zed Attack Proxy”, “WebInspect”

agentConfig

File

Yes

The path to the scangent.properties file your scan agent generated.

N/A

scanAgentSecureKey

String

Yes

A Secure Scan Agent Key obtained from the “Request Scan Agent Key” call

N/A

 

Sample Call:

curl --insecure -H 'Accept: application/json' -X POST --data 'scanners=OWASP Zed Attack Proxy,Burp Suite Pro&agentConfig=/path/to/scanagent/scanagent.properties&scanAgentSecureKey= yMFCvtcmBtAARYS5QX8x54zvMruNLIvNMzqMI44K4JG8' http://localhost:8080/threadfix/rest/tasks/requestTask?apiKey={apiKey}

Sample Output:


{
    "message": "",
    "success": true,
    "responseCode": -1,
    "object": {
        "taskType": "Burp Suite Pro",
        "taskConfig": {
            "targetUrl": "http://targeturl/app",
            "dataBlobs": {
                "configFile": "Very large data blob omitted for brevity"
            },
            "configParams": {},
            "targetUrlString": "http://targeturl/app"
        },
        "taskId": 1,
        "secureTaskKey": "KVS1TiifaYeILnchqbdmU24JEyljgNy0NTOgvSLzS3Y",
        "secureScanAgentInstanceKey": null
    }
}

  • No labels