NinjaOne icon

NinjaOne

Ninja One Public API documentation. <br><br>See also: <br> <a href="https://resources.ninjarmm.com/API/Ninja+RMM+Public+API+v2.0.5+Device+Filter+Syntax.pdf">Device Filter syntax</a><br><a href="https://app.ninjarmm.com/apidocs-beta/core-resources/articles/webhooks/overview">Webhooks</a>

Actions309

Devices → OS Patches

AI-generated

Summary

Retrieve a list of operating system patches for a specified device, optionally filtered by patch status, type, and severity, with support for pagination and batch processing.

Inputs

  • id (required) — The unique identifier of the device from which to retrieve OS patches.
  • returnAll — Flag to determine whether to return all results across all pages or only a single page of results.
  • additionalFields.status — Filter patches by their status (e.g., pending, failed, rejected).
  • additionalFields.type — Filter patches by their type.
  • additionalFields.severity — Filter patches by their severity level.
  • options.customBody — Optional arbitrary JSON to send in the request body, overriding standard parameters if there are conflicts.
  • options.customHeaders — Custom HTTP headers to include in the API request.
  • options.queryFilters — Additional query-string filters to apply to the request.
  • options.batching — Batch processing configuration to group input items and manage request pacing.
  • options.debug — Enable debug mode to include detailed request information in the output for troubleshooting.
  • options.pagination — Configure pagination behavior including mode (offset, cursor, URL), page size, and limits.
  • options.timeout — Timeout duration in milliseconds for the API response before aborting the request.

Output shape

a list of OS patch objects related to the specified device

When 'Return All' is true, all pages of results are fetched according to configured pagination settings. When false, only one page is returned. The output may include debug information if enabled.

Examples

Example 1: Retrieve all OS patches for device ID 12345, filtered to only pending patches with high severity

Set 'id' to 12345, 'returnAll' to true, and under Additional Fields, set 'status' to 'pending' and 'severity' to 'high'.

Links

Discussion