NinjaOne Related Items API

Related Items

Operations 11

POST /v2/related-items/entity/{entityType}/{entityId}/attachment Create Attachment Relation #
POST /v2/related-items/entity/{entityType}/{entityId}/relation Create entity relation #
POST /v2/related-items/entity/{entityType}/{entityId}/relations Create entity relations #
POST /v2/related-items/entity/{entityType}/{entityId}/secure Create Secure Relation #
DELETE /v2/related-items/{relatedItemId} Delete related item #
DELETE /v2/related-items/{entityType}/{entityId} Delete related items #
GET /v2/related-items List all related items #
GET /v2/related-items/with-entity/{entityType}/{entityId} List host entity related items by scope #
GET /v2/related-items/with-related-entity/{relEntityType}/{relEntityId} List related entity related items #
GET /v2/related-items/with-related-entity-type/{relatedEntityType} List related entity type related items #
GET /v2/related-items/with-entity-type/{entityType} List host entity type related items #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ninjaone-related-items-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ninjaone-related-items-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: NinjaOne Public API 2.0 Asset Tags Related Items API
  description: NinjaOne Public API documentation.
  contact:
    email: api@ninjarmm.com
  version: 2.0.9-draft
servers:
- url: https://app.ninjarmm.com/v2
  description: Base URL declared by the provider in apis.yml (roadmap#122).
security:
- oauth2:
  - monitoring
  - management
  - control
- sessionKey:
  - monitoring
  - management
  - control
tags:
- name: Related Items
  description: Related Items
paths:
  /v2/related-items/entity/{entityType}/{entityId}/attachment:
    post:
      tags:
      - Related Items
      summary: Create Attachment Relation
      description: Relate an attachment to an entity
      operationId: createRelatedItem
      parameters:
      - name: entityType
        in: path
        required: true
        schema:
          type: string
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - CHECKLIST
          - KB_DOCUMENT
          - END_USER
      - name: entityId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  $ref: '#/components/schemas/FormDataBodyPart'
      responses:
        '200':
          description: Returns the attachment related item created for an entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelatedItemPublicApiDTO'
  /v2/related-items/entity/{entityType}/{entityId}/relation:
    post:
      tags:
      - Related Items
      summary: Create entity relation
      description: Create a relation between two entities
      operationId: createRelatedItemForEntity
      parameters:
      - name: entityType
        in: path
        required: true
        schema:
          type: string
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - CHECKLIST
          - KB_DOCUMENT
          - END_USER
      - name: entityId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewRelatedItemEntityRequest'
      responses:
        '200':
          description: Returns the relation created for an entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelatedItemPublicApiDTO'
  /v2/related-items/entity/{entityType}/{entityId}/relations:
    post:
      tags:
      - Related Items
      summary: Create entity relations
      description: Create multiple relations between two entities
      operationId: createRelatedItemForEntity_1
      parameters:
      - name: entityType
        in: path
        required: true
        schema:
          type: string
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - CHECKLIST
          - KB_DOCUMENT
          - END_USER
      - name: entityId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/NewRelatedItemEntityRequest'
      responses:
        '200':
          description: Returns list of relations created for an entity
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RelatedItemPublicApiDTO'
  /v2/related-items/entity/{entityType}/{entityId}/secure:
    post:
      tags:
      - Related Items
      summary: Create Secure Relation
      description: Create a relation to a secure value
      operationId: createSecureRelatedItemForEntity
      parameters:
      - name: entityType
        in: path
        required: true
        schema:
          type: string
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - CHECKLIST
          - KB_DOCUMENT
          - END_USER
      - name: entityId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewRelatedItemSecureValueRequest'
      responses:
        '200':
          description: Returns the secure related item created for an entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelatedItemPublicApiDTO'
  /v2/related-items/{relatedItemId}:
    delete:
      tags:
      - Related Items
      summary: Delete related item
      description: Deletes related item
      operationId: deleteRelatedItem
      parameters:
      - name: relatedItemId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '204':
          description: No Content
  /v2/related-items/{entityType}/{entityId}:
    delete:
      tags:
      - Related Items
      summary: Delete related items
      description: Deletes related items associated with an entity
      operationId: deleteRelatedItems
      parameters:
      - name: entityType
        in: path
        required: true
        schema:
          type: string
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - ATTACHMENT
          - TECHNICIAN
          - CREDENTIAL
          - CHECKLIST
          - END_USER
          - CONTACT
          - KB_DOCUMENT
      - name: entityId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '204':
          description: No Content
  /v2/related-items:
    get:
      tags:
      - Related Items
      summary: List all related items
      description: List all related items
      operationId: getAllRelatedItems
      responses:
        '200':
          description: Returns a list of all related items
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RelatedItemPublicApiDTO'
  /v2/related-items/with-entity/{entityType}/{entityId}:
    get:
      tags:
      - Related Items
      summary: List host entity related items by scope
      description: List related items for a specific host entity filterable by scope
      operationId: getRelatedItemsForHostEntity
      parameters:
      - name: entityType
        in: path
        required: true
        schema:
          type: string
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - CHECKLIST
          - KB_DOCUMENT
          - END_USER
      - name: entityId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      - name: scope
        in: query
        schema:
          type: string
          enum:
          - ALL
          - HOSTING
          - HOSTED_BY
      responses:
        '200':
          description: Returns list of the related items for an entity filterable by scope
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RelatedItemPublicApiDTO'
  /v2/related-items/with-related-entity/{relEntityType}/{relEntityId}:
    get:
      tags:
      - Related Items
      summary: List related entity related items
      description: List related items for a specific related entity
      operationId: getRelatedItemsWithEntity
      parameters:
      - name: relEntityType
        in: path
        required: true
        schema:
          type: string
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - ATTACHMENT
          - TECHNICIAN
          - CREDENTIAL
          - CHECKLIST
          - END_USER
          - CONTACT
          - KB_DOCUMENT
      - name: relEntityId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Returns list of the related items for a specific related entity
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RelatedItemPublicApiDTO'
  /v2/related-items/with-related-entity-type/{relatedEntityType}:
    get:
      tags:
      - Related Items
      summary: List related entity type related items
      description: List related entities for a related entity type
      operationId: getRelatedItemsWithEntityType
      parameters:
      - name: relatedEntityType
        in: path
        required: true
        schema:
          type: string
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - ATTACHMENT
          - TECHNICIAN
          - CREDENTIAL
          - CHECKLIST
          - END_USER
          - CONTACT
          - KB_DOCUMENT
      responses:
        '200':
          description: Returns list of references for a related entity type
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RelatedItemPublicApiDTO'
  /v2/related-items/with-entity-type/{entityType}:
    get:
      tags:
      - Related Items
      summary: List host entity type related items
      description: List relations and references for a host entity type
      operationId: getRelatedItemsWithHostEntityType
      parameters:
      - name: entityType
        in: path
        required: true
        schema:
          type: string
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - CHECKLIST
          - KB_DOCUMENT
          - END_USER
      responses:
        '200':
          description: Returns a list of relations and references for an entity type
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RelatedItemPublicApiDTO'
components:
  schemas:
    FormDataBodyPart:
      type: object
      properties:
        contentDisposition:
          $ref: '#/components/schemas/ContentDisposition'
        entity:
          type: object
        headers:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        mediaType:
          type: object
          properties:
            type:
              type: string
            subtype:
              type: string
            parameters:
              type: object
              additionalProperties:
                type: string
            wildcardType:
              type: boolean
            wildcardSubtype:
              type: boolean
        messageBodyWorkers:
          $ref: '#/components/schemas/MessageBodyWorkers'
        parent:
          $ref: '#/components/schemas/MultiPart'
        providers:
          type: object
        simple:
          type: boolean
        name:
          type: string
        value:
          type: string
        formDataContentDisposition:
          $ref: '#/components/schemas/FormDataContentDisposition'
        parameterizedHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ParameterizedHeader'
    MessageBodyWorkers:
      type: object
    BodyPart:
      type: object
      properties:
        contentDisposition:
          $ref: '#/components/schemas/ContentDisposition'
        entity:
          type: object
        headers:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        mediaType:
          type: object
          properties:
            type:
              type: string
            subtype:
              type: string
            parameters:
              type: object
              additionalProperties:
                type: string
            wildcardType:
              type: boolean
            wildcardSubtype:
              type: boolean
        messageBodyWorkers:
          $ref: '#/components/schemas/MessageBodyWorkers'
        parent:
          $ref: '#/components/schemas/MultiPart'
        providers:
          type: object
        parameterizedHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ParameterizedHeader'
    RelatedItemPublicApiDTO:
      type: object
      properties:
        id:
          type: integer
          description: Identifier
          format: int32
        type:
          type: string
          description: Type of Relation
          enum:
          - VALUE
          - ENTITY
        entity:
          type: object
          description: Entity
        entityId:
          type: integer
          description: Entity Identifier
          format: int32
        entityType:
          type: string
          description: Entity Type
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - CHECKLIST
          - KB_DOCUMENT
          - END_USER
        relEntity:
          type: object
          description: Related Entity
        relEntityId:
          type: integer
          description: Related Entity Identifier
          format: int32
        relEntityType:
          type: string
          description: Related Entity Type
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - ATTACHMENT
          - TECHNICIAN
          - CREDENTIAL
          - CHECKLIST
          - END_USER
          - CONTACT
          - KB_DOCUMENT
          - SECURE
        value:
          type: object
          description: Related item value (Attachment meta data / Secure information)
        createTime:
          type: number
          description: Creation time
          format: double
        updateTime:
          type: number
          description: Last update time
          format: double
        createdByAppUserId:
          type: integer
          description: The identifier of the user who created the related item
          format: int32
        updatedByAppUserId:
          type: integer
          description: The identifier of the last user to update the related item
          format: int32
    FormDataContentDisposition:
      type: object
      properties:
        type:
          type: string
        parameters:
          type: object
          additionalProperties:
            type: string
        fileName:
          type: string
        creationDate:
          type: string
          format: date-time
        modificationDate:
          type: string
          format: date-time
        readDate:
          type: string
          format: date-time
        size:
          type: integer
          format: int64
        name:
          type: string
    ParameterizedHeader:
      type: object
      properties:
        value:
          type: string
        parameters:
          type: object
          additionalProperties:
            type: string
    NewRelatedItemEntityRequest:
      type: object
      properties:
        relEntityType:
          type: string
          description: Related Entity Type
          enum:
          - ORGANIZATION
          - DOCUMENT
          - LOCATION
          - NODE
          - ATTACHMENT
          - TECHNICIAN
          - CREDENTIAL
          - CHECKLIST
          - END_USER
          - CONTACT
          - KB_DOCUMENT
        relEntityId:
          type: integer
          description: Related Entity Identifier
          format: int32
    ContentDisposition:
      type: object
      properties:
        type:
          type: string
        parameters:
          type: object
          additionalProperties:
            type: string
        fileName:
          type: string
        creationDate:
          type: string
          format: date-time
        modificationDate:
          type: string
          format: date-time
        readDate:
          type: string
          format: date-time
        size:
          type: integer
          format: int64
    NewRelatedItemSecureValueRequest:
      type: object
      properties:
        name:
          type: string
          description: Name
        url:
          type: string
          description: URL
        notes:
          type: string
          description: Notes
        username:
          type: string
          description: Username
        password:
          type: string
          description: Password
        totpSecret:
          type: string
          description: TOTP Secret
    MultiPart:
      type: object
      properties:
        contentDisposition:
          $ref: '#/components/schemas/ContentDisposition'
        entity:
          type: object
        headers:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        mediaType:
          type: object
          properties:
            type:
              type: string
            subtype:
              type: string
            parameters:
              type: object
              additionalProperties:
                type: string
            wildcardType:
              type: boolean
            wildcardSubtype:
              type: boolean
        messageBodyWorkers:
          $ref: '#/components/schemas/MessageBodyWorkers'
        parent:
          $ref: '#/components/schemas/MultiPart'
        providers:
          type: object
        bodyParts:
          type: array
          items:
            $ref: '#/components/schemas/BodyPart'
        parameterizedHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ParameterizedHeader'
  securitySchemes:
    oauth2:
      type: http
      scheme: bearer
      bearerFormat: bearer
    sessionKey:
      type: apiKey
      name: sessionKey
      in: cookie