Security Controls REST API

Home 

Exercise 5 - Review Patch Scan Results

Goal

Review the results of the patch scan you performed in Exercise 3.

Requirements

You will need the ID of the patch scan. You can determine the ID by looking in the output from Exercise 3.

Try it yourself

Retrieve the results of the patch scan by submitting a GET request similar to the following:

Change the patch scan ID value as needed.

Postman example

            https://localhost:3121/st/console/api/v1.0/patch/scans/8bce9fdd-0cf8-40b0-8ecc-b0914a9c831a
			

PowerShell script example

            $reviewResultsUrl = "https://localhost:3121/st/console/api/v1.0/patch/scans/8bce9fdd-0cf8-40b0-8ecc-b0914a9c831a"
            Invoke-RestMethod -Method Get -Credential $credential -Uri $reviewResultsUrl | ConvertTo-Json -Depth 99
			

Output

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

            {
            "consoleName": "device-name",
            "expectedResultTotal": 3,
            "id": "8bce9fdd-0cf8-40b0-8ecc-b0914a9c831a",
            "isComplete": true,
            "links": {
            	"self": {
            		"href": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scans/8bce9fdd-0cf8-40b0-8ecc-b0914a9c831a"
            	},
            	"machines": {
            		"href": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scans/8bce9fdd-0cf8-40b0-8ecc-b0914a9c831a/machines"
            	},
            	"template": {
            		"href": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scanTemplates/4c7069eb-6e1c-4352-91fc-04d4d8abc07b"
            	}
            },
            "name": "Scan of Sample Group",
            "receivedResultCount": 3,
            "scanType": "Patch",
            "startedOn": "2018-07-17T15:15:34.227Z",
            "updatedOn": "2018-07-17T15:15:34.227Z",
            "user": "SHAVLIK\\device-name$"
            }
			

Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other