Security Controls REST API

Home 

Patch Scan Templates

A patch scan template enables you to customize the way that target machines are scanned. With a patch scan template you can:

Scan a smaller or larger number of machines simultaneously

Customize what is actually scanned for or ignored

Specify which, if any, filters are used (you can filter by product, patch, patch type or vendor severity level)

Configure automatic email notifications

With the Patch Scan Templates method you can create, modify, find and delete patch scan templates.

Base URL

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates

Supported Requests

Method URL Input Return

DELETE

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/{patch scan template id}

 

Success or failure code.

     

GET

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates

URL Parameters

PatchScanTemplates[]

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplate/{patch scan template id}

 

A patch scan template.

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplate/{patch scan template id}/usedby

 

UsedBy[]

     

POST

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates

Request Body

A patch scan template

     

PUT

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/{patch scan templated id}

Request Body

Success or failure code.

Input Models

URL Parameters

Name Type Description

count

Integer

Provide the count of items to return. The maximum value is 50.

createdByMe

Boolean

Returns only those items created by the user.

name

String

Returns the items whose name matches the specified name.

start

Integer

Sets the starting point.

path

String

Returns the templates containing the path.

Request Body

Name Required? Type Default Value Description

description

No

String

None

Provides a description that explains the purpose of this patch scan template.

name

Yes

String

None

Specifies the patch scan template name.

patchFilter

No

 

None

Specifies the mode. See PatchFilter.

path

No

String

None

The path that describes the location of the machine group within the Patch Scan Templates list in the navigation pane.

Example: Lab\Servers

threadCount

No

Integer

None

Specifies maximum number of machines that can be simultaneously scanned during one patch scan.

Example

Find all patch scan templates

GET Request

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates

Sample Response

{

"count": 2,

"links": {

"next": {

"href": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scanTemplates?count=10&start=3"

}

},

"value": [

{

"creator": "Protect",

"description": "Scans for missing and installed security patches",

"id": "4c7069eb-6e1c-4352-91fc-04d4d8abc07b",

"isSystem": true,

"links": {

"self": {

"href": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scanTemplates/4c7069eb-6e1c-4352-91fc-04d4d8abc07b"

},

"usedby": {

"href": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scanTemplates/4c7069eb-6e1c-4352-91fc-04d4d8abc07b/usedby"

}

},

"name": "Security Patch Scan",

"patchFilter": {

"patchGroupFilterType": "None",

"patchGroupIds": [],

"patchPropertyFilter": {

"customActions": false,

"nonSecurityPatchSeverities": "None",

"securityPatchSeverities": "Critical, Important, Moderate, Low, Unassigned",

"securityTools": false

},

"scanFor": "NecessaryExplicitlyInstalled",

"softwareDistribution": false,

"vendorFamilyProductFilter": {}

}

},

{

"creator": "Protect",

"description": "Scans for missing and installed security and non-security patches",

"id": "0acea94e-38fa-487e-bbe7-54b95aa3c883",

"isSystem": true,

"links": {

"self": {

"href": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scanTemplates/0acea94e-38fa-487e-bbe7-54b95aa3c883"

},

"usedby": {

"href": "https://device-name.fakedomain.com:3121/st/console/api/v1.0/patch/scanTemplates/0acea94e-38fa-487e-bbe7-54b95aa3c883/usedby"

}

},

"name": "WUScan",

"patchFilter": {

"patchGroupFilterType": "None",

"patchGroupIds": [],

"patchPropertyFilter": {

"customActions": false,

"nonSecurityPatchSeverities": "Critical, Important, Moderate, Low, Unassigned",

"securityPatchSeverities": "Critical, Important, Moderate, Low, Unassigned",

"securityTools": false

},

"scanFor": "NecessaryExplicitlyInstalled",

"softwareDistribution": false,

"vendorFamilyProductFilter": {}

}

}

]

}

Other Request Examples

Find a patch scan template with ID 01234567-89AB-CDEF-0123-456789ABCDEF

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/01234567-89AB-CDEF-0123-456789ABCDEF

Find a patch scan template named Template-Test

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates?name=Template-Test

Find the first four patch scan templates

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates?count=4&start=0

Find all patch scan templates created by the current user

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates?createdbyme=true

Delete a patch scan template with ID 01234567-89AB-CDEF-0123-456789ABCDEF

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/01234567-89AB-CDEF-0123-456789ABCDEF

Update the name of a patch scan template with ID 01234567-89AB-CDEF-0123-456789ABCDEF

https://<consoleFQDN:port>/st/console/api/v1.0/patch/scanTemplates/0BA381B1-1D64-468A-9E64-80D39284D939

{"name": "This is the new Name"}

 

Output Models

PatchScanTemplate

Name Type Description

creator

String

The name of the person who created the template.

description

String

Provides a description that explains the purpose of this patch scan template.

id

Guid

Specifies the ID of the patch scan template.

isSystem

Boolean

Indicates if this is a system template.

links

Links

Shows the related URLs for each patch scan template and for the usedby list.

name

String

Specifies the patch scan template name.

patchFilter

 

Specifies the mode. See PatchFilter.

path

String

The path that describes the location of the machine group within the Patch Scan Templates list in the navigation pane.

Example: Lab\Servers

threadCount

Integer

Specifies maximum number of machines that can be simultaneously scanned during one patch scan.

PatchFilter

Name Type Description

patchFilePath

String

The patch file path.

patchGroupFilterType

 

The patch's filter describes how this filter will be applied. The values can be Scan, Skip, or None.

If the value is Scan: patchPropertyFilter, softwareDistribution and vendorFamilyProductFilter should not be specified and a patch group or patch file must be specified

If the value is Skip: At least one patchPropertyFilter property or software distribution must be set and at least one patch group or a patch file must be specified.

If the value is None: At least one patchPropertyFilter property or software distribution must be set and no patch groups or patch group file can be set.

patchGroupIds

Integer[]

The IDs of the patch groups to use.

patchPropertyFilter

PatchPropertyFilter

Patch property filter (security, non-security, critical, etc.).

scanFor

HistoryType

Gets or sets the type of patches to scan for.

softwareDistribution

Boolean

Is software distribution included in the scan.

vendorFamilyProductFilter

VendorFamilyProductFilter[]

Vendor and family product hierarchy.

PatchPropertyFilter

Name Type Description

customActions

Boolean

Custom actions.

nonSecurityPatchSeverities

 

The non-security patch severities.

securityPatchSeverities

 

The security patch severities.

securityTools

Boolean

Security tools.

VendorFamilyProductFilter

Name Type Description

excluded

VendorFamilyProductIds[]

Excluded product details.

included

VendorFamilyProductIdsl[]

Included product details.

ProductDetail

Name Type Description

families

Integer[]

Gets or sets the families filter.

products

Integer[]

Gets or sets the products filter.

vendors

Integer[]

Gets or sets the vendors filter.

HistoryType

Necessary

NecessaryExplicitelyInstalled

NecessaryExplicitelyIAndEffectivelynstalled

UsedBy

Name Type Description

name

String

The name of the item using the scan template.

usageType

 

The type of component using the scan template.


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other