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 → Device activities

AI-generated

Summary

Retrieve activities related to a specific device by its ID, optionally filtering and paginating the results according to various criteria.

Inputs

  • id (required) — The unique identifier of the device to fetch activities for.
  • returnAll — Set to true to return all matching activities across all pages; false to return only a single page of results.
  • additionalFields — Optional filters and parameters to narrow down the activity results, including activity ID bounds (newerThan, olderThan), activity type, status, alert series UID, pagination page size, language tag, timezone, and ISO-8601 formatted start and end times.
  • options — Additional request customization options such as sending a custom JSON body (merged with other parameters), adding custom HTTP headers, applying query-string filters, batching settings for processing multiple inputs, enabling debug output, customizing pagination behavior including mode and parameters, and setting request timeout in milliseconds.

Output shape

a list of device activity records matching the specified filters and pagination settings, possibly spanning multiple pages if 'Return All' is enabled.

The output may include a debug entry containing detailed request data if debug mode is enabled. Pagination behavior is configurable, supporting offset, cursor, or next URL methods. If 'Return All' is false, only a single page of activities is returned with default or specified page size.

Examples

Example 1: Retrieve the first page of activities for device ID 12345 with up to 100 records.

Set 'id' to 12345, 'returnAll' to false, and 'Page Size' in additional fields to 100.

Example 2: Fetch all activities for device ID 67890, filtering only those of a specific activity type and within a date range.

Set 'id' to 67890, 'returnAll' to true, specify 'activityType', 'startTime', and 'endTime' in additional fields to filter results appropriately.

Links

Discussion