Patch Management

These functions allow you to interact with your clients and sites.

Official documentation can be found here.

NAble.listPatches

Get all patch information for a device using the device ID.

NAble.approvePatches

Approve patch(es) for a specific device.

NAble.doNothingPatches

Set patch(es) to "Do Nothing" for a specific device.

NAble.ignorePatches

Ignore patch(es) for a specific device.

NAble.reprocessPatches

Reprocess failed patch(es) for a specific device.

NAble.retryPatches

Retry failed patch(es) for a specific device.

List Patches

NAble.listPatches(deviceid: int, describe: bool = False)

Get all patch information for a device using the device ID.

Included in the response is the patch status, and the patch policy currently applied. Below is a list of Polices, Status, and their IDs.

Policies and IDs

  • Ignore: 1 or 65 if set by user (via API or dashbaord). If you find a patch ignored by a policy, please send me the ID!

  • Approve: 2 or 66 if set by user (via API or dashbaord)

  • Do Nothing: 4 or 68 if set by user (via API or dashbaord)

Statuses and IDs

  • Missing: 1

  • Pending: 2

  • Queued: 4

  • Installed: 8

  • Failed: 16

  • Ignored: 23

  • Reboot Required: 64

If you find additional statuses or IDs, please let me know!

Parameters:
  • deviceid (int) – Device ID

  • describe (bool, optional) – Returns a discription of the service. Defaults to False.

Returns:

List of patches (both available and installed).

Return type:

list

Approve Patches

NAble.approvePatches(deviceid: int, patchids: list, describe: bool = False)

Approve patch(es) for a specific device. Approving a patch that has already been approved does not cause an issue.

Patches set to Approve will install at the next scheduled installation time as set by the devices Patch Management policy.

Patches that are approved using this will show policy ID 66 instead of 2.

Parameters:
  • deviceid (int) – Device ID

  • patchids (str,list) – Patch ID(s). Use a list or comma separated string to send multiple at once

  • describe (bool, optional) – Returns a discription of the service. Defaults to False.

Returns:

Nothing of value is returned. May remove this

Return type:

dict

Do Nothing with Patches

NAble.doNothingPatches(deviceid: int, patchids: str, describe: bool = False)

Set patch(es) to “Do Nothing” for a specific device.

Patches set to “Do Nothing” will be installed according to the applied Patch Management policy.

Patches that are changed using this will show policy ID 68 instead of 4.

Parameters:
  • deviceid (int) – Device ID

  • patchids (str,list) – Patch ID(s). Use a list or comma separated string to send more than 1 at once.

  • describe (bool, optional) – Returns a discription of the service. Defaults to False.

Returns:

Nothing of value is returned.

Return type:

dict

Ignore Patches

NAble.ignorePatches(deviceid: int, patchids: str, describe: bool = False)

Ignore patch(es) for a specific device.

Patches set to “Ignore” will be explicitely blocked (ignored) and will not show as “missing” in reports or dashboard.

Patches that are changed using this will show policy ID of 65.

Parameters:
  • deviceid (int) – Device ID

  • patchids (str,list) – Patch ID(s). Use a list or comma separated string to send more than 1 at once.

  • describe (bool, optional) – Returns a discription of the service. Defaults to False.

Returns:

Nothing of value is returned.

Return type:

dict

Reprocess Patches

NAble.reprocessPatches(deviceid: int, patchids: str, describe: bool = False)

Reprocess failed patch(es) for a specific device.

If a patch has reviously failed to install, use this to retry the install. Patches will attempt to install at the next scheduled installation time as set by the devices Patch Management policy.

Failed Patches will show status ID 16. The policy ID will not change if a patch has failed to install. Patches that are changed using this will show their original polcy, and status ID 2 (pending)

If you try to reprocess a patch that has not failed to install (installed, pending, ignored) you will get a response stating “Patches already applied: {PATCH IDS}”.

Parameters:
  • deviceid (int) – Device ID

  • patchids (str,list) – Patch ID(s). Use a list or comma separated string to send more than 1 at once.

  • describe (bool, optional) – Returns a discription of the service. Defaults to False.

Returns:

Additional information (if any) about selected patches.

Return type:

str

Retry Patches (appears to be the same as Reprocess)

NAble.retryPatches(deviceid: int, patchids: str, describe: bool = False)

Retry failed patch(es) for a specific device. Appears to do exactply the same thing as reprocess, even provides the same messages.

If a patch has reviously failed to install, use this to retry the install. Patches will try to install at the next scheduled installation time as set by the devices Patch Management policy.

Failed Patches will show status ID 16. The policy ID will not change if a patch has failed to install. Patches that are changed using this will show their original polcy, and status ID 2 (pending)

If you try to reprocess a patch that has not failed to install (installed, pending, ignored) you will get a response stating “Patches already applied: {PATCH IDS}”.

Parameters:
  • deviceid (int) – Device ID

  • patchids (str,list) – Patch ID(s). Use a list or comma separated string to send more than 1 at once.

  • describe (bool, optional) – Returns a discription of the service. Defaults to False.

Returns:

Additional information (if any) about selected patches.

Return type:

str