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

AssetRelationships → Create multiple asset relationships

AI-generated

Summary

Create multiple asset relationship records in NinjaOne by sending an array of relationships in a single request to the /v2/itam/asset-relationship endpoint.

Inputs

  • Items (required) — A JSON array where each item represents an asset relationship to create. This array is sent as the primary request payload.
  • Custom Body — Optional JSON object to merge with the main request body, allowing arbitrary fields to be included or to override the default payload.
  • Custom Headers — Optional HTTP headers to include with the API request, specified as key-value pairs.
  • Query Filters — Optional query-string parameters to filter or modify the request.
  • Batching — Configure batching to split the input items into smaller groups, controlling items per batch and interval between batches to manage rate limits.
  • Debug — Toggle to include the constructed request URL, headers, and body in the node output for troubleshooting.
  • Pagination — Pagination settings (mostly irrelevant here as this is a create operation rather than list).
  • Timeout — Maximum time to wait for a response before aborting the request, defaults to 5 minutes.

Output shape

a single JSON object representing the API response for the batch create operation

The node returns the API response for the create multiple asset relationships request. When batching is enabled, multiple requests may be made sequentially, each producing output. Enabling debug adds detailed request diagnostics under a debug property in the output.

Examples

Example 1: Create three asset relationships

Pass a JSON array with three relationship objects in the 'Items' field; optionally set batch size to 2 and batch interval to 1000 ms to split requests in batches of two with a delay; enable debug to see request details in output.

Links

Discussion