NinjaOne icon

NinjaOne

Consume NinjaOne API

Actions158

Related Items → Delete Related Items

AI-generated

Overview

This node interacts with the NinjaOne API to manage "Related Items" entities. Specifically, the "Delete Related Items" operation allows users to delete a related item of a specified entity type by providing its unique identifier. This is useful in scenarios where you need to programmatically remove associations or linked records within the NinjaOne platform, such as deleting a related organization, document, technician, or other supported entity types.

Practical examples include:

  • Removing an outdated or incorrect attachment linked to a ticket.
  • Deleting a technician record that is no longer active.
  • Cleaning up related knowledge base documents that are obsolete.

Properties

Name Meaning
Entity Type The type of the related item to delete. Options: ORGANIZATION, DOCUMENT, LOCATION, NODE, ATTACHMENT, TECHNICIAN, CREDENTIAL, CHECKLIST, END USER, CONTACT, KB DOCUMENT
Entity Id The unique numeric identifier of the related item to be deleted

Output

The output is a JSON object representing the response from the NinjaOne API after attempting to delete the specified related item. Typically, this will confirm success or provide error details if the deletion failed.

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication token configured via OAuth2 credentials for NinjaOne.
  • The node uses NinjaOne's REST API endpoints to perform operations.
  • Proper permissions on the NinjaOne account are necessary to delete related items.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent Entity Id will likely result in an error from the API.
    • Insufficient permissions or expired API tokens can cause authorization failures.
    • Selecting an unsupported or mismatched Entity Type may lead to unexpected errors.
  • Error messages and resolutions:

    • "No binary data exists on item!" — Not applicable here since this operation does not use binary data.
    • API errors indicating "Not Found" or "Unauthorized" suggest checking the Entity Id validity and API credentials respectively.
    • If the node throws an error about missing parameters, ensure both Entity Type and Entity Id are correctly set.

Links and References

  • NinjaOne API Documentation (general): https://api.ninjaone.com/docs
  • NinjaOne OAuth2 Authentication Guide (for setting up credentials)
  • n8n Documentation on creating custom nodes and using OAuth2 credentials

Discussion