This method creates a new scan task.
Parameter | Type | Optional | Description |
---|---|---|---|
| Array | No | A list with the IDs of the targets to scan. The target ID can designate an endpoint or a container. |
| Number | No | The type of scan. Available options are: 1 - quick scan; 2 - full scan; 3 - memory scan; 4 - custom scan |
| String | Yes | The name of the task. If the parameter is not passed, the name will be automatically generated. |
| Array | No | Object containing information such as scan depth and scan path(s). This object should be set only when |
| Boolean | Yes | WarningWe recommend using the Indicates if the request will return the ID of the latest task created as a result of the request. Possible values:
Default value: NoteIf both |
| Boolean | Yes | Indicates if the response will contain the IDs for all the tasks created as a result of the request. Possible values:
Default value: |
This method returns the ID of the newly created task or a boolean value which is true
if the creation of the task was successful.
Request:
{
"params": {
"targetIds": [
"63f491e5aeb92d393da4ee27", "642ed114edc94a4d0ea7be98"
],
"type": 4,
"name": "my scan",
"customScanSettings": {
"scanDepth": 1,
"scanPath": [
"LocalDrives"
]
},
"returnAllTaskIds":true
},
"jsonrpc": "2.0",
"method": "createScanTask",
"id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f"
}
Response:
{
"id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
"jsonrpc": "2.0",
"result": [
"64356e4590cbea5a7600ca1e",
"64356e4590cbea5a7600ca21"
]
}