NinjaOne Vulnerability Management API

Vulnerability Management

OpenAPI Specification

ninjaone-vulnerability-management-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: NinjaOne Public API 2.0 Asset Tags Vulnerability Management API
  description: NinjaOne Public API documentation.
  contact:
    email: api@ninjarmm.com
  version: 2.0.9-draft
security:
- oauth2:
  - monitoring
  - management
  - control
- sessionKey:
  - monitoring
  - management
  - control
tags:
- name: Vulnerability Management
  description: Vulnerability Management
paths:
  /v2/vulnerability/scan-groups:
    get:
      tags:
      - Vulnerability Management
      summary: Fetch all Scan Groups
      description: Fetches all Scan Groups.
      operationId: fetchAllScanGroups
      responses:
        '200':
          description: Scan Groups were found successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PublicScanGroup'
  /v2/vulnerability/scan-groups/{scan-group-id}:
    get:
      tags:
      - Vulnerability Management
      summary: Fetch Scan Group
      description: Fetches a single Scan Group by ID.
      operationId: fetchScanGroupById
      parameters:
      - name: scan-group-id
        in: path
        description: Unique ID of the scan group to upload CSV to
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Scan Group was found successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicScanGroup'
        '404':
          description: The Scan group was not found by the given scan-group-id.
  /v2/vulnerability/scan-groups/{scan-group-id}/upload:
    post:
      tags:
      - Vulnerability Management
      summary: Upload CSV
      description: "Upload CSV to an existing scan group. The uploaded CSV must contain the columns defined in the \nscan group which map to the Ninja machine identifier (hostname, IP address, or MAC address) and the CVE ID."
      operationId: updateScanGroup
      parameters:
      - name: scan-group-id
        in: path
        description: Unique ID of the scan group to upload CSV to
        required: true
        schema:
          type: integer
          format: int64
      requestBody:
        description: Multi-part form data which contains the CSV file to upload
        content:
          multipart/form-data:
            schema:
              type: object
            encoding:
              csv:
                contentType: text/csv
      responses:
        '200':
          description: Upload was accepted and is being processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicScanGroup'
        '404':
          description: Scan group was not found by the given scan-group-id
components:
  schemas:
    PublicScanGroup:
      type: object
      properties:
        id:
          type: integer
          format: int64
        groupName:
          type: string
        fileName:
          type: string
        status:
          type: string
          enum:
          - COMPLETE
          - IN_PROGRESS
          - FAILED
        vendor:
          type: string
        thirdPartyApiTile:
          type: string
        deviceIdHeader:
          type: string
        deviceInternalMapping:
          type: string
        cveIdHeader:
          type: string
        lastFileUploadDate:
          type: string
        recordsProcessed:
          type: integer
          format: int32
  securitySchemes:
    oauth2:
      type: http
      scheme: bearer
      bearerFormat: bearer
    sessionKey:
      type: apiKey
      name: sessionKey
      in: cookie