Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added version and permission

/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.

Restricted

TrueRequired 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:

Code Block
themeEclipse
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:


Code Block
themeEclipse
{
    "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
    }
}


Page Tree
rootTasks API