Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

/rest/{version}/tasks/queueScan


Descriptor

Value

HTTP Method

POST

Description

Schedules a Scan Agent task for an application.

Required Permission

Manage Scan Agents

Version Introduced2.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”, “IBM 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:

Code Block
themeEclipse
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/tasks/queueScan


Sample Output:


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


Page Tree
rootTasks API