UNPKG

n8n-nodes-ninja-one

Version:
1,346 lines (1,345 loc) 741 kB
{ "openapi": "3.0.1", "info": { "title": "NinjaOne Public API 2.0", "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": "system", "description": "Core system Entities and Resources" }, { "name": "organization", "description": "Organizations" }, { "name": "devices", "description": "Devices" }, { "name": "groups", "description": "Groups/Search" }, { "name": "queries", "description": "Queries" }, { "name": "management", "description": "Management" }, { "name": "ticketing", "description": "ticketing" }, { "name": "webhooks", "description": "Webhook Endpoints" }, { "name": "Related Items", "description": "Related Items" }, { "name": "Location", "description": "Location" }, { "name": "Backup", "description": "Backup" }, { "name": "Knowledge Base Articles", "description": "Knowledge Base Articles" }, { "name": "Organization Documents", "description": "Organization Documents" }, { "name": "Document Templates", "description": "Document Templates" }, { "name": "Checklist Templates", "description": "Checklist Templates" }, { "name": "Custom Fields", "description": "Custom Fields" }, { "name": "Organization Checklists", "description": "Organization Checklists" } ], "paths": { "/v2/policies/{policy_id}/condition/custom-fields": { "get": { "tags": [ "management" ], "summary": "Get custom fields policy conditions", "description": "Get all custom fields policy conditions for specified policy", "operationId": "getCustomFieldsPolicyConditions", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "default": { "description": "default response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CustomFieldPolicyConditionResponse" } } } } } } }, "post": { "tags": [ "management" ], "summary": "Create custom fields policy condition", "description": "Creates custom fields policy condition for specified policy", "operationId": "createCustomFieldsPolicyCondition", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomFieldsPolicyConditionCreateRequest" } } } }, "responses": { "default": { "description": "default response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomFieldPolicyConditionResponse" } } } } } } }, "/v2/policies/{policy_id}/condition/windows-event": { "get": { "tags": [ "management" ], "summary": "Get windows event conditions", "description": "Get all windows event conditions for specified policy", "operationId": "getWindowsEventPolicyConditions", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "default": { "description": "default response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WindowsEventPolicyConditionResponse" } } } } } } }, "post": { "tags": [ "management" ], "summary": "Create windows event condition", "description": "Creates windows event condition for specified policy", "operationId": "createWindowsEventPolicyCondition", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WindowsEventPolicyConditionCreateRequest" } } } }, "responses": { "default": { "description": "default response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WindowsEventPolicyConditionResponse" } } } } } } }, "/v2/policies/{policy_id}/condition/{condition_id}": { "delete": { "tags": [ "management" ], "summary": "Delete policy condition", "description": "Deletes specified policy condition from specified agent policy", "operationId": "deletePolicyCondition", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "name": "condition_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "default": { "description": "default response", "content": { "*/*": {} } } } } }, "/v2/policies/{policy_id}/condition/custom-fields/{condition_id}": { "get": { "tags": [ "management" ], "summary": "Get custom fields policy condition", "description": "Get specified custom fields condition for specified policy", "operationId": "getCustomFieldsPolicyCondition", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "name": "condition_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "default": { "description": "default response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomFieldPolicyConditionResponse" } } } } } } }, "/v2/policies/{policy_id}/condition/windows-event/{condition_id}": { "get": { "tags": [ "management" ], "summary": "Get windows event condition", "description": "Get specified windows event condition for specified policy", "operationId": "getWindowsEventPolicyCondition", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "name": "condition_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "default": { "description": "default response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WindowsEventPolicyConditionResponse" } } } } } } }, "/v2/webhook": { "put": { "tags": [ "webhooks" ], "summary": "Update API Webhook configuration", "description": "Creates or updates Webhook configuration for current application/client", "operationId": "configureWebhook", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookConfiguration" } } } }, "responses": { "204": { "description": "No Content" }, "403": { "description": "Only system administrators can configure webhooks" } } }, "delete": { "tags": [ "webhooks" ], "summary": "Remove Webhook API channel", "description": "Disables Webhook configuration for current application/client", "operationId": "disableWebhook", "responses": { "204": { "description": "No Content" }, "403": { "description": "Different PSA is already configured" }, "500": { "description": "Failed to disable PSA" } } } }, "/v2/organizations": { "get": { "tags": [ "system" ], "summary": "List organizations", "description": "Returns list of organizations (Brief mode)", "operationId": "getOrganizations", "parameters": [ { "name": "pageSize", "in": "query", "description": "Limit number of organizations to return", "schema": { "type": "integer", "format": "int32" } }, { "name": "after", "in": "query", "description": "Last Organization Identifier from previous page", "schema": { "type": "integer", "format": "int32" } }, { "name": "of", "in": "query", "description": "Organization filter", "schema": { "type": "string" } } ], "responses": { "default": { "description": "default response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Organization" } } } } } } }, "post": { "tags": [ "management" ], "summary": "Create new organization", "description": "Creates new organization with optional list of locations and policy mappings.\nTemplate organization ID can be specified to copy various settings", "operationId": "createOrganization", "parameters": [ { "name": "templateOrganizationId", "in": "query", "schema": { "type": "integer", "description": "Model/Template organization to copy settings from", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationWithLocationsAndPolicyAssignmentsModel" } } } }, "responses": { "default": { "description": "default response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationDetailed" } } } } } } }, "/v2/devices/approval/{mode}": { "post": { "tags": [ "management" ], "summary": "Approve/Reject devices", "description": "Approve or reject devices that are waiting for approval", "operationId": "nodeApprovalOperation", "parameters": [ { "name": "mode", "in": "path", "required": true, "schema": { "type": "string", "description": "Approval action to perform", "enum": [ "APPROVE", "REJECT" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceIDList" } } } }, "responses": { "default": { "description": "default response", "content": { "*/*": {} } } } } }, "/v2/alert/{uid}": { "delete": { "tags": [ "management" ], "summary": "Reset alert/condition", "description": "Resets alert/condition by UID", "operationId": "resetAlert", "parameters": [ { "name": "uid", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "default": { "description": "default response", "content": { "*/*": {} } } } } }, "/v2/alert/{uid}/reset": { "post": { "tags": [ "management" ], "summary": "Reset alert/condition and provide custom data for activity", "description": "Resets alert/condition by UID", "operationId": "resetAlertSetActivityData", "parameters": [ { "name": "uid", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "default": { "description": "default response", "content": { "*/*": {} } } } } }, "/v2/attachments/temp/upload": { "post": { "tags": [ "Knowledge Base Articles" ], "summary": "Upload temporary attachments", "description": "Upload temporary attachment", "operationId": "uploadTempAttachments", "parameters": [ { "name": "entityType", "in": "query", "schema": { "type": "string", "enum": [ "TICKET", "NODE", "DOCUMENT", "RELATED_ITEM", "CHECKLIST", "AUTOMATION", "LOCATION", "ORGANIZATION" ] } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "files": { "type": "array", "items": { "$ref": "#/components/schemas/FormDataBodyPart" } } } } } } }, "responses": { "200": { "description": "Returns a list of uploaded attachments metadata", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AttachmentMetadataPublicApiDTO" } } } } } } } }, "/v2/checklist/archive": { "post": { "tags": [ "Checklist Templates" ], "summary": "Archive a checklist template", "description": "Archive a checklist template by id", "operationId": "archiveChecklistTemplate", "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ArchiveChecklistTemplatesRequest" } } } }, "responses": { "200": { "description": "Returns a list of archive checklist templates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChecklistTemplatePublicApiDTO" } } } } } } } }, "/v2/checklist/templates": { "get": { "tags": [ "Checklist Templates" ], "summary": "List checklist templates", "description": "List checklists templates with given criteria", "operationId": "getChecklistTemplates", "parameters": [ { "name": "checklistTemplateIds", "in": "query", "schema": { "type": "string" } }, { "name": "checklistTemplateName", "in": "query", "schema": { "type": "string" } }, { "name": "required", "in": "query", "schema": { "type": "boolean" } }, { "name": "includeArchived", "in": "query", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Returns a list of checklist templates with given criteria", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChecklistTemplatePublicApiDTO" } } } } } } }, "put": { "tags": [ "Checklist Templates" ], "summary": "Update checklist templates", "description": "Updates multiple checklist templates", "operationId": "updateChecklistTemplates", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateChecklistTemplatePublicApiRequest" } } } } }, "responses": { "200": { "description": "Returns a list of updated checklist templates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChecklistTemplatePublicApiDTO" } } } } } } }, "post": { "tags": [ "Checklist Templates" ], "summary": "Create checklist templates", "description": "Creates multiple checklist templates", "operationId": "createChecklistTemplates", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateChecklistTemplatePublicApiRequest" } } } } }, "responses": { "200": { "description": "Returns a list of created checklist templates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChecklistTemplatePublicApiDTO" } } } } } } } }, "/v2/checklist/template/{checklistTemplateId}": { "delete": { "tags": [ "Checklist Templates" ], "summary": "Delete a checklist template", "description": "Delete a checklist template by id", "operationId": "deleteChecklistTemplate", "parameters": [ { "name": "checklistTemplateId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "204": { "description": "No Content" } } } }, "/v2/checklist/templates/delete": { "post": { "tags": [ "Checklist Templates" ], "summary": "Delete checklist templates", "description": "Deletes checklist templates by id", "operationId": "deleteChecklistTemplates", "requestBody": { "content": { "*/*": { "schema": { "uniqueItems": true, "type": "array", "items": { "type": "integer", "format": "int32" } } } } }, "responses": { "204": { "description": "No Content" } } } }, "/v2/checklist/restore": { "post": { "tags": [ "Checklist Templates" ], "summary": "Restore a checklist template", "description": "Restore a checklist template by id", "operationId": "restoreChecklistTemplate", "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/RestoreChecklistTemplatesRequest" } } } }, "responses": { "200": { "description": "Returns a list of restore checklist templates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChecklistTemplatePublicApiDTO" } } } } } } } }, "/v2/organization/archive": { "post": { "tags": [ "Organization Checklists" ], "summary": "Archive organization checklists", "description": "Archive multiple organization checklists", "operationId": "archiveOrganizationChecklists", "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ArchiveClientChecklistRequest" } } } }, "responses": { "200": { "description": "Returns a list of archive organization checklists", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ClientChecklistPublicApiDTO" } } } } } } } }, "/v2/organization/checklists": { "get": { "tags": [ "Organization Checklists" ], "summary": "List client checklists", "description": "List client checklists with given criteria", "operationId": "getClientChecklists", "parameters": [ { "name": "checklistIds", "in": "query", "schema": { "type": "string" } }, { "name": "organizationIds", "in": "query", "schema": { "type": "string" } }, { "name": "checklistName", "in": "query", "schema": { "type": "string" } }, { "name": "assignedToUserId", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "completed", "in": "query", "schema": { "type": "boolean" } }, { "name": "required", "in": "query", "schema": { "type": "boolean" } }, { "name": "includeArchived", "in": "query", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Returns a list of client checklists with given criteria", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ClientChecklistPublicApiDTO" } } } } } } }, "put": { "tags": [ "Organization Checklists" ], "summary": "Update organization checklists", "description": "Updates multiple organization checklists", "operationId": "updateOrganizationChecklists", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateClientChecklistAndTasksPublicApiRequest" } } } } }, "responses": { "200": { "description": "Returns a list of updated organization checklists", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ClientChecklistPublicApiDTO" } } } } } } }, "post": { "tags": [ "Organization Checklists" ], "summary": "Create organization checklists", "description": "Creates multiple organization checklists", "operationId": "createOrganizationChecklists", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateClientChecklistAndTasksPublicApiRequest" } } } } }, "responses": { "200": { "description": "Returns a list of created organization checklists", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ClientChecklistPublicApiDTO" } } } } } } } }, "/v2/organization/{organizationId}/checklists-from-templates": { "post": { "tags": [ "Organization Checklists" ], "summary": "Create organization checklists from templates", "description": "Creates multiple organization checklists from templates", "operationId": "createOrganizationChecklistsFromTemplates", "parameters": [ { "name": "organizationId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } } } } }, "responses": { "200": { "description": "Returns a list of created organization checklists", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ClientChecklistPublicApiDTO" } } } } } } } }, "/v2/organization/checklist/{checklistId}": { "get": { "tags": [ "Organization Checklists" ], "summary": "Get client checklist", "description": "Get a client checklist by id", "operationId": "getClientChecklist", "parameters": [ { "name": "checklistId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Returns a client checklist with given id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClientChecklistPublicApiDTO" } } } } } }, "delete": { "tags": [ "Organization Checklists" ], "summary": "Delete an organization checklist", "description": "Deletes an organization checklist by id", "operationId": "deleteClientChecklist", "parameters": [ { "name": "checklistId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "204": { "description": "No Content" } } } }, "/v2/organization/checklists/delete": { "post": { "tags": [ "Organization Checklists" ], "summary": "Delete organization checklists", "description": "Deletes organization checklists by id", "operationId": "deleteClientChecklists", "requestBody": { "content": { "*/*": { "schema": { "uniqueItems": true, "type": "array", "items": { "type": "integer", "format": "int32" } } } } }, "responses": { "204": { "description": "No Content" } } } }, "/v2/organization/checklist/{checklistId}/signed-urls": { "get": { "tags": [ "Organization Checklists" ], "summary": "Get organization checklist signed urls", "description": "Get organization checklist signed urls", "operationId": "getClientChecklistSignedUrls", "parameters": [ { "name": "checklistId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Returns a map of content ids and their corresponding signed urls", "content": { "application/json": { "schema": { "type": "string" } } } } } } }, "/v2/organization/checklists/promote-with-name": { "post": { "tags": [ "Organization Checklists" ], "summary": "Promote organization checklists", "description": "Promote organization checklists by id", "operationId": "promoteClientChecklists", "requestBody": { "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PromoteClientChecklistWithNamePublicApiRequest" } } } } }, "responses": { "204": { "description": "No Content" } } } }, "/v2/organization/checklists/promote": { "post": { "tags": [ "Organization Checklists" ], "summary": "Promote organization checklists", "description": "Promote organization checklists by id", "operationId": "promoteClientChecklists_1", "requestBody": { "content": { "*/*": { "schema": { "uniqueItems": true, "type": "array", "items": { "type": "integer", "format": "int32" } } } } }, "responses": { "204": { "description": "No Content" } } } }, "/v2/organization/restore": { "post": { "tags": [ "Organization Checklists" ], "summary": "Restore organization checklists", "description": "Restore multiple organization checklists", "operationId": "restoreOrganizationChecklists", "requestBody": { "content": { "*/*": { "schema": {