Exercise 3 - Perform a Patch Scan


Perform a patch scan of the machine group you created in Exercise 2.


You will need to know the ID of the machine group and the ID of the patch scan template you want to use when performing the scan.

To determine the machine group ID, look in the output from Exercise 2

In the sample output in Exercise 2, the machine group ID is 1006.

To determine the IDs of the available patch scan templates, perform the following GET request:


Try it yourself

Perform a patch scan of the machine group named Sample Group by submitting a POST request similar to the following:

Change the machineGroupIds and templateId values as needed.

Postman example




"name":"Scan of Sample Group",



PowerShell script example

Invoke-RestMethod -Method Post -Credential $credential -URI $machineGroupUrl -Body $machineGroupBody -ContentType "application/json" | ConvertTo-Json -Depth 20

$patchTemplateId = "4c7069eb-6e1c-4352-91fc-04d4d8abc07b"

$machineGroupId = "1006"

$patchScanUrl = "https://localhost:3121/st/console/api/v1.0/patch/scans"

$patchScanBody =


MachineGroupIds = @( $machineGroupId );

Name = "Scan of Sample Group";

TemplateId = $patchTemplateId;

} | ConvertTo-Json -Depth 99

Invoke-RestMethod -Method Post -Credential $credential -Uri $patchScanUrl -Body $patchScanBody -ContentType "application/json" | ConvertTo-Json -Depth 99


The result is a JSON-formatted response similar to the following:


"id": "8bce9fdd-0cf8-40b0-8ecc-b0914a9c831a",

"isComplete": false,

"links": {

"self": {

"href": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scans/8bce9fdd-0cf8-40b0-8ecc-b0914a9c831a"



"name": "Scan of Sample Group",

"scanType": "Patch",

"startedOn": "2018-07-17T15:15:10.7892367Z",

"updatedOn": "2018-07-17T15:15:10.7892367Z",

"user": "SYSTEM"