NinjaOne icon

NinjaOne

Consume NinjaOne API

Actions158

Management → Get Device Link

AI-generated

Overview

This node integrates with the NinjaOne API to retrieve a direct link related to a specific device managed within the NinjaOne platform. The "Get Device Link" operation under the "Management" resource fetches a URL or redirect response that can be used to access or reference the device externally.

Typical use cases include:

  • Automating workflows where you need to obtain a device-specific link for reporting, notifications, or further processing.
  • Integrating NinjaOne device management into broader IT automation pipelines.
  • Quickly retrieving device URLs to embed in dashboards or alerts.

For example, you might use this node to get a direct link to a device's management page and send it via email or chat to a technician.

Properties

Name Meaning
Id The unique identifier of the device for which the link is requested (number).
Redirect Boolean flag indicating whether the response should return a redirect URL or not.
  • Id: Required. Specifies the device by its numeric ID.
  • Redirect: Optional. If true, the API returns a redirect response; if false, it may return the link data directly.

Output

The node outputs an array of items, each containing a json object with the response from the NinjaOne API for the device link request.

  • The json field typically contains the device link information or redirect details as returned by the API.
  • No binary data output is indicated for this operation.

Example output structure (simplified):

[
  {
    "json": {
      "link": "https://ninjaone.example.com/device/12345",
      "redirect": true
    }
  }
]

Dependencies

  • Requires an active NinjaOne API OAuth2 credential configured in n8n for authentication.
  • The node uses NinjaOne's REST API endpoints.
  • Network connectivity to NinjaOne API endpoints is necessary.

Troubleshooting

  • Missing or invalid device Id: Ensure the "Id" property is set correctly and corresponds to an existing device in NinjaOne.
  • Authentication errors: Verify that the NinjaOne API credentials are valid and have sufficient permissions.
  • API rate limits or downtime: Temporary failures may occur if NinjaOne API is unavailable or rate-limited.
  • Binary data errors: Not applicable here since this operation does not handle binary data.
  • Redirect handling: If the "Redirect" property is set incorrectly, the response may not be as expected. Adjust accordingly.

Common error messages will generally come from the NinjaOne API and should be handled by checking the error message included in the output when "Continue On Fail" is enabled.

Links and References

Discussion