# Management API Methods Coverage

This reference tracks every management endpoint documented by NinjaOne and its support within the n8n node.
Device-centric read operations are implemented today; the remainder are open backlog items.

## Implemented Device Operations

| Endpoint | Description | Node Operation | Test Coverage |
| --- | --- | --- | --- |
| `GET /v2/device/{id}` | Retrieve device detail. | `device:get` | `__tests__/device.test.ts` &rarr; "get operation" case |
| `GET /v2/devices` | List devices with pagination. | `device:getAll` | `__tests__/device.test.ts` &rarr; "getAll operation" case |
| `GET /v2/device/{id}/activities` | Device activity log. | `device:getActivities` | `__tests__/device.test.ts` &rarr; "getActivities operation" case |
| `GET /v2/device/{id}/alerts` | Device alerts. | `device:getAlerts` | `__tests__/device.test.ts` &rarr; "getAlerts operation" case |
| `GET /v2/device/{id}/custom-fields` | Custom field values. | `device:getCustomFields` | `__tests__/device.test.ts` &rarr; "getCustomFields operation" case |
| `PATCH /v2/device/{id}/custom-fields` | Update custom field values. | `device:updateCustomFields` | `__tests__/device.test.ts` &rarr; "updateCustomFields operation" case |
| `GET /v2/device/{id}/disks` | Disk inventory. | `device:getDisks` | `__tests__/device.test.ts` &rarr; "getDisks operation" case |
| `GET /v2/device/{id}/jobs` | Scheduled/Completed jobs. | `device:getJobs` | `__tests__/device.test.ts` &rarr; "getJobs operation" case |
| `GET /v2/device/{id}/last-logged-on-user` | Most recent interactive user. | `device:getLastLoggedOnUser` | `__tests__/device.test.ts` &rarr; "getLastLoggedOnUser operation" case |
| `GET /v2/device/{id}/network-interfaces` | NIC inventory. | `device:getNetworkInterfaces` | `__tests__/device.test.ts` &rarr; "getNetworkInterfaces operation" case |
| `GET /v2/device/{id}/os-patch-installs` | OS patch install history. | `device:getOsPatchInstalls` | `__tests__/device.test.ts` &rarr; "getOsPatchInstalls operation" case |
| `GET /v2/device/{id}/os-patches` | OS patch catalog. | `device:getOsPatches` | `__tests__/device.test.ts` &rarr; "getOsPatches operation" case |
| `GET /v2/device/{id}/policy/overrides` | Policy override configuration. | `device:getPolicyOverrides` | `__tests__/device.test.ts` &rarr; "getPolicyOverrides operation" case |
| `GET /v2/device/{id}/processors` | CPU inventory. | `device:getProcessors` | `__tests__/device.test.ts` &rarr; "getProcessors operation" case |
| `GET /v2/device/{id}/software` | Installed software inventory. | `device:getSoftware` | `__tests__/device.test.ts` &rarr; "getSoftware operation" case |
| `GET /v2/device/{id}/software-patch-installs` | Third-party patch install history. | `device:getSoftwarePatchInstalls` | `__tests__/device.test.ts` &rarr; "getSoftwarePatchInstalls operation" case |
| `GET /v2/device/{id}/software-patches` | Available third-party patches. | `device:getSoftwarePatches` | `__tests__/device.test.ts` &rarr; "getSoftwarePatches operation" case |
| `GET /v2/device/{id}/volumes` | Logical volume information. | `device:getVolumes` | `__tests__/device.test.ts` &rarr; "getVolumes operation" case |
| `GET /v2/device/{id}/windows-services` | Windows service inventory. | `device:getWindowsServices` | `__tests__/device.test.ts` &rarr; "getWindowsServices operation" case |

## Implemented Organization Operations

| Endpoint | Description | Node Operation | Test Coverage |
| --- | --- | --- | --- |
| `POST /v2/organizations` | Create an organization. | `organization:create` | `__tests__/organization.test.ts` &rarr; "create operation" case |
| `GET /v2/organization/{id}` | Retrieve organization detail. | `organization:get` | `__tests__/organization.test.ts` &rarr; "get operation" case |

## Policy Condition Backlog

| Endpoint | Description | Gap Summary | Planned Validation |
| --- | --- | --- | --- |
| `GET /v2/policies/{policy_id}/condition/custom-fields` | List custom field conditions. | Requires policy resource scaffolding. | Add policy operations with schema assertions. |
| `POST /v2/policies/{policy_id}/condition/custom-fields` | Create custom field condition. | No mutation support for policies. | Add tests covering payload serialization. |
| `GET /v2/policies/{policy_id}/condition/windows-event` | List Windows event conditions. | Policy module missing. | Extend tests for event-specific filters. |
| `POST /v2/policies/{policy_id}/condition/windows-event` | Create Windows event condition. | Not yet exposed. | Validate optional fields via new tests. |
| `PUT /v2/policies/{policy_id}/condition/{condition_id}` | Update condition metadata. | No update operation. | Add tests to confirm version handling. |
| `DELETE /v2/policies/{policy_id}/condition/custom-fields/{condition_id}` | Remove custom field condition. | Delete operation absent. | Add tests ensuring correct path params. |
| `DELETE /v2/policies/{policy_id}/condition/windows-event/{condition_id}` | Remove Windows event condition. | Delete operation absent. | Same coverage approach as above. |
| `GET /v2/policies` | List available policies. | Base policy listing missing. | Add pagination tests when implemented. |

## Device Control Backlog

| Endpoint | Description | Gap Summary | Planned Validation |
| --- | --- | --- | --- |
| `POST /v2/device/{id}/maintenance` (start/stop) | Toggle maintenance mode. | Requires job payload + mode selection. | Add tests covering request bodies and enums. |
| `POST /v2/device/{id}/windows-service/{serviceId}/control` | Control Windows service state. | Missing control operation. | Validate action parameter mapping via tests. |
| `POST /v2/device/{id}/reboot/{mode}` | Initiate device reboot. | No reboot support. | Add tests for allowed modes (NOW, SCHEDULED, etc.). |
| `POST /v2/device/{id}/script/run` | Execute a script on a device. | Script execution not wired. | Add tests for payload, file handling, and response parsing. |
| `POST /v2/device/{id}/owner` / `DELETE /v2/device/{id}/owner/{ownerUid}` | Manage device owners. | Owner management absent. | Add tests verifying optional owner details. |
| `POST /v2/device/{id}/windows-service/{serviceId}/configure` | Update service configuration. | Config endpoint missing. | Cover request schema via jest assertions. |
| `POST /v2/device/{id}/patch/os/apply` / `POST /v2/device/{id}/patch/os/scan` | OS patch actions. | Patch execution not exposed. | Add tests covering concurrency flags and scheduling. |
| `POST /v2/device/{id}/patch/software/apply` / `POST /v2/device/{id}/patch/software/scan` | Software patch actions. | Same as OS patch backlog. | Validate request payload structure in tests. |
| `GET /v2/device/{id}/dashboard-url` | Retrieve dashboard deep-link. | Not implemented. | Add test ensuring URL string is returned. |
| `POST /v2/device/{id}/maintenance` (GET variant) | Retrieve maintenance info. | Additional method not mapped. | Add tests for response structure. |
| `GET /v2/device/{id}` (approval + other admin endpoints) | Approve/deny devices. | Approval endpoints missing. | Add tests verifying body flags once added. |

## Organization and Installer Backlog

| Endpoint | Description | Gap Summary | Planned Validation |
| --- | --- | --- | --- |
| `GET /v2/organization/{id}/locations` | List organization locations. | Node lacks location listing. | Add tests verifying pagination. |
| `POST /v2/organization/generate-installer` | Generate installer payload. | No installer helper. | Add tests confirming body serialization. |
| `GET /v2/organization/{id}/location/{location_id}/installer/{installer_type}` | Download installer. | Requires binary handling support. | Add tests mocking binary responses. |
| `PUT /v2/organization/{id}` | Update organization metadata. | Update not implemented. | Add tests for partial updates. |
| `DELETE /v2/organization/{id}` | Archive/remove organization. | Delete missing. | Add tests verifying correct HTTP verb + params. |
| `POST /v2/organization/archive` / `POST /v2/organization/restore` | Archive & restore organizations. | Lifecycle endpoints absent. | Add tests mirroring create/get coverage. |

## Checklist & Document Backlog (Management Scope)

Checklist and document operations are documented separately but live under the management scope. See dedicated coverage files:

- [Checklist Template Coverage](checklist-template-api-methods.md)
- [Document Template Coverage](document-template-api-methods.md)

## Tagging, Vulnerability & Checklist Operations Backlog

| Endpoint | Description | Gap Summary | Planned Validation |
| --- | --- | --- | --- |
| `GET /v2/vulnerability/scan-groups` / related endpoints | Manage vulnerability scan groups. | No vulnerability resource in node. | Add resource + tests for create/upload/list flows. |
| `GET /v2/tag/{assetType}` / `POST /v2/tag` / `PUT /v2/tag/{tagId}` / etc. | Manage asset tags. | Tag CRUD missing. | Add tests covering list/create/update/delete/merge. |
| `POST /v2/organization/checklists` (create/update/delete/promote) | Manage organization checklists. | Checklist workflows not yet mapped. | Extend tests with data-driven assertions once implemented. |

Use this backlog as the authoritative plan for expanding management coverage. Update the status columns and test notes whenever an endpoint gains implementation.
