Security Controls REST API

Home 

Exercise 4 - Monitor Patch Scan Status

Goal

Monitor the status of the patch scan you initiated 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

Determine the status 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/operations/8bce9fdd-0cf8-40b0-8ecc-b0914a9c831a
			

PowerShell script example

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

Output

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

            {
            "created": "2018-07-23T15:01:04.527Z",
            "lastAction": "2018-07-23T15:01:04.647Z",
            "operation": "PatchScan",
            "percentComplete": 100,
            "resourceLocation": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scans/8bce9fdd-0cf8-40b0-8ecc-b0914a9c831a",
            "status": "Succeeded"
            }
			

Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other