NinjaOne icon

NinjaOne

Consume NinjaOne API

Actions158

Queries → Get Device Usage

AI-generated

Overview

This node interacts with the NinjaOne API to retrieve device usage data. Specifically, the "Get Device Usage" operation under the "Queries" resource fetches information about device usage statistics, which can be useful for IT administrators or support teams monitoring device activity within an organization.

Common scenarios include:

  • Monitoring how devices are being used across a network.
  • Generating reports on device activity for auditing or compliance.
  • Integrating device usage data into dashboards or other workflow automations.

For example, an IT admin could use this node to paginate through device usage records, optionally including deleted devices, to analyze trends or identify inactive devices.

Properties

Name Meaning
Cursor A cursor string used for pagination to specify the starting point of the next page.
Page Size The maximum number of device usage records to return per page.
Include Deleted Devices Boolean flag indicating whether to include devices that have been deleted in the results.

Output

The node outputs JSON data containing the device usage information retrieved from the NinjaOne API. The structure typically includes device usage records and pagination metadata (such as cursors) to allow fetching subsequent pages.

If binary data were involved, it would be summarized here, but this operation deals only with JSON data.

Dependencies

  • Requires an API authentication token credential configured in n8n to authenticate requests against the NinjaOne API.
  • The node uses the NinjaOne OAuth2 API credential for authorization.
  • No additional external dependencies beyond the NinjaOne API and n8n's HTTP request capabilities.

Troubleshooting

  • Empty or missing data: Ensure that the cursor and page size parameters are set correctly. An incorrect cursor may result in no data returned.
  • Authentication errors: Verify that the API key or OAuth2 credentials are valid and have sufficient permissions.
  • API rate limits: If many requests are made rapidly, the NinjaOne API might throttle requests; implement delays or error handling accordingly.
  • Missing binary data error: Although not applicable for this operation, if you switch to operations requiring binary input, ensure the binary property name matches the input data.

Links and References

Discussion