NinjaOne icon

NinjaOne

Consume NinjaOne API

Actions158

System → Get Devices

AI-generated

Overview

This node integrates with the NinjaOne API to retrieve information about devices managed within the NinjaOne system. Specifically, the "Get Devices" operation under the "System" resource allows users to query and list devices based on optional filters and pagination parameters.

Typical use cases include:

  • Fetching a filtered list of devices for inventory or monitoring purposes.
  • Paginating through large device lists to process or analyze subsets incrementally.
  • Integrating device data into workflows for asset management, reporting, or automation.

For example, a user might want to retrieve all devices matching a certain filter string (df), limiting results to 50 per page (pageSize), and continuing from a specific device ID (after) to handle large datasets efficiently.

Properties

Name Meaning
Df Device filter string used to narrow down the list of devices returned by the API.
Page Size Maximum number of devices to return in one response (pagination limit).
After The last device ID from the previous page, used to fetch the next set of devices.

Output

The node outputs an array of JSON objects, each representing a device or a collection of devices as returned by the NinjaOne API's /v2/devices endpoint. The exact structure depends on the API response but typically includes device details such as IDs, names, statuses, and other metadata.

No binary data output is produced by this operation.

Dependencies

  • Requires an active NinjaOne API OAuth2 credential configured in n8n for authentication.
  • Depends on the NinjaOne REST API being accessible and responsive.
  • No additional environment variables are required beyond the API credentials.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials will cause authentication failures.
    • Providing invalid filter strings or pagination parameters may result in empty responses or errors.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • Errors thrown by the node typically originate from failed HTTP requests or missing input data.
    • If no binary data is found when expected (not applicable here), the node throws a descriptive error.
    • To resolve errors, verify API credentials, check parameter values, and ensure network access to the NinjaOne API.

Links and References

Discussion