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.

Request Task - API

/rest/{version}/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

Security AppScan Standard

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' -H "Authorization: APIKEY {apiKey}" -X POST --data 'scanners=OWASP Zed Attack Proxy,Burp Suite Pro&agentConfig=/path/to/scanagent/scanagent.properties&scanAgentSecureKey=yMFCvtcmBtAARYS5QX8x54zvMruNLIvNMzqMI44K4JG8' http://localhost:8080/threadfix/rest/latest/tasks/requestTask

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
    }
}

www.threadfix.it | www.coalfire.com
Copyright © 2024 Coalfire. All rights reserved.

This Information Security Policy is CoalFire - Public: Distribution of this material is not limited.