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 a relationship type

AI-generated

Summary

Create a new asset relationship type by specifying forward and reverse labels, with optional description and customizable request settings.

Inputs

  • Forward Label (required) — Label for the forward direction of the relationship type.
  • Reverse Label (required) — Label for the reverse direction of the relationship type.
  • Description — Optional description of the relationship type.
  • Custom Body — Optional arbitrary JSON to merge into the request body, overriding other fields if conflicts occur.
  • Custom Headers — Optional custom HTTP headers to include in the API request.
  • Query Filters — Optional query parameters to send with the API request.
  • Batching — Optional batching settings to group input items and control request pacing.
  • Debug — Optional flag to include detailed request data (URL, headers, body) in the output for troubleshooting.
  • Pagination — Settings for handling pagination if applicable to the response.
  • Timeout — Request timeout in milliseconds before aborting.

Output shape

a single JSON object representing the created asset relationship type or an error response

Includes the created resource's details returned from the NinjaOne API. If debug is enabled, the output contains additional debug information with request and response details.

Examples

Example 1: Create an asset relationship type with mandatory labels and a description

Provide forwardLabel='Depends On', reverseLabel='Used By', and description='Indicates dependency relation between assets'.

Links

Discussion