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

RelatedItems → Create entity relation

AI-generated

Summary

Create a relation between two entities in NinjaOne by specifying the primary entity type and ID along with the related entity type and ID.

Inputs

  • entityType (required) — The type of the primary entity (e.g., ORGANIZATION, DOCUMENT, LOCATION, NODE, CHECKLIST, KB_DOCUMENT, END_USER, SOFTWARE_LICENSE).
  • entityId (required) — The identifier of the primary entity.
  • additionalFields.relEntityType — The type of the related entity to be connected (options include ORGANIZATION, DOCUMENT, LOCATION, NODE, ATTACHMENT, TECHNICIAN, CREDENTIAL, CHECKLIST, END_USER, CONTACT, KB_DOCUMENT, SOFTWARE_LICENSE).
  • additionalFields.relEntityId — The identifier of the related entity.
  • options.customBody — Optional JSON object to send arbitrary data in the request body, merged with other fields (custom values take priority).
  • options.headerFilters — Optional custom HTTP headers to include in the API request.
  • options.queryFilters — Optional query-string filters to add to the API request URL.
  • options.batching — Optional batching configuration to control number of items per batch and delay between batches.
  • options.debug — Enable to include detailed request information (URL, headers, body) in the output for troubleshooting.
  • options.timeout — Milliseconds to wait for the server response before timing out (default 300000 ms).

Output shape

a single record

Returns the API response object representing the created relation entity. If debug is enabled, the output includes the raw request and response details under a debug property.

Links

Discussion