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 Attachment Relation

AI-generated

Summary

Create a relation attaching a file to a specific entity by sending a POST request to the NinjaOne API's related-items endpoint for the given entity type and ID.

Inputs

  • Entity Type (required) — The type of entity to which the attachment relation will be added. Options include ORGANIZATION, DOCUMENT, LOCATION, NODE, CHECKLIST, KB_DOCUMENT, END_USER, and SOFTWARE_LICENSE.
  • Entity Id (required) — The numeric ID of the entity to attach the file relation to.
  • Additional Fields — Optional fields to include in the request body, notably a 'File' JSON object representing the file to attach.
  • Options — Optional parameters including custom JSON body to merge with request, custom HTTP headers, query filters, batching, debug flag, pagination, and timeout settings.

Output shape

a single JSON response object from the NinjaOne API representing the created attachment relation.

The output includes API response data from the POST request to the /v2/related-items/entity/{entityType}/{entityId}/attachment endpoint. If debug option is enabled, output includes request details such as URL, headers, query parameters, and body. Pagination settings do not apply for this create operation.

Links

Discussion