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.
Queue Scan - API
/rest/{version}/tasks/queueScan
Descriptor | Value |
---|---|
HTTP Method | POST |
Description | Schedules a Scan Agent task for an application. |
Required Permission | Manage Scan Agents |
Version Introduced | 2.3.0 |
Changes in 2.5 | Adds a new “sync” parameter to allow call to wait until the queued scan has completed. |
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 |
---|---|---|---|---|
applicationId | Integer | Yes | The ID for the application to schedule a task for. | N/A |
scannerType | String | Yes | The scanner the Scan Agent will use for the task. | “Acunetix WVS”, “AppSpider”, “Burp Suite Pro”, “Security AppScan Standard”, “Nessus”, “OWASP Zed Attack Proxy”, “WebInspect” |
scanConfigId | Integer | No | The ID of a file uploaded to the application. This will be used as the configuration file for the scan. | N/A |
targetURL | URL | No* | The URL for the Scan Task. *Required if the Application does not have a URL | N/A |
sync | Boolean | No | If true, the response will not be returned until the queued Scan Agent Task has completed. The default value is false. | N/A |
Sample Call:
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apiKey}" -X POST --data 'applicationId=1&scannerType=Burp Suite Pro&scanConfigId=1' http://localhost:8080/threadfix/rest/latest/tasks/queueScan
Sample Output:
Values for createTime and timeoutTime are returned as Epoch time in milliseconds.
{
"message": "",
"success": true,
"responseCode": -1,
"object": {
"id": 1,
"active": true,
"scanStatuses": [
{
"id": 1,
"active": true,
"message": "Scan queued at: 03-02-16:22:28:457 +0000"
}
],
"scanner": "Burp Suite Pro",
"version": null,
"createTime": 1454538486457,
"startTime": null,
"endTime": null,
"timeoutTime": 1454581686457,
"status": 1,
"scanAgentInfo": null,
"secureKey": null,
"scanAgentInstanceSecureKey": null,
"scanConfig": null,
"targetUrl": "http://localhost:8080/bodgeit",
"taskStatus": "STATUS_QUEUED",
"scannerShortName": "burp",
"statusString": "QUEUED"
}
}
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.