diff --git a/.build/CommandletShortNames.yaml b/.build/CommandletShortNames.yaml index dfc477a..4cfbfba 100644 --- a/.build/CommandletShortNames.yaml +++ b/.build/CommandletShortNames.yaml @@ -131,4 +131,97 @@ Set-NinjaOneOrganisationDocuments: Organisation Documents Set-NinjaOneOrganisationPolicies: Organisation Policies Set-NinjaOneTicket: Ticket Set-NinjaOneWindowsServiceConfiguration: Windows Service Configuration -Update-NinjaOneWebhook: Webhook +Update-NinjaOneWebhook: Webhook +Get-NinjaOneChecklistTemplates: Checklist Templates +New-NinjaOneChecklistTemplate: Checklist Template +Remove-NinjaOneChecklistTemplate: Checklist Template +Remove-NinjaOneChecklistTemplates: Checklist Templates +Set-NinjaOneChecklistTemplates: Checklist Templates +Invoke-NinjaOneChecklistArchive: Checklist Archive +Invoke-NinjaOneChecklistRestore: Checklist Restore +Get-NinjaOneEntityCustomFieldsSignedURLs: Entity Custom Fields Signed URLs +Start-NinjaOneOSPatchApply: OS Patch Apply (Start) +Start-NinjaOneOSPatchScanJob: OS Patch Scan Job (Start) +Start-NinjaOneSoftwarePatchApply: Software Patch Apply (Start) +Start-NinjaOneSoftwarePatchScan: Software Patch Scan (Start) +Invoke-NinjaOneDocumentTemplateArchive: Document Template Archive +Invoke-NinjaOneDocumentTemplateRestore: Document Template Restore +Invoke-NinjaOneDocumentTemplatesArchive: Document Templates Archive +Invoke-NinjaOneDocumentTemplatesRestore: Document Templates Restore +New-NinjaOneUnmanagedDevice: Unmanaged Device +Remove-NinjaOneUnmanagedDevice: Unmanaged Device +Set-NinjaOneUnmanagedDevice: Unmanaged Device +Invoke-NinjaOneKnowledgeBaseArticlesArchive: Knowledge Base Articles Archive +Invoke-NinjaOneKnowledgeBaseFoldersArchive: Knowledge Base Folders Archive +New-NinjaOneKnowledgeBaseArticles: Knowledge Base Articles +Remove-NinjaOneKnowledgeBaseArticles: Knowledge Base Articles +Remove-NinjaOneKnowledgeBaseFolders: Knowledge Base Folders +Restore-NinjaOneKnowledgeBaseArticles: Knowledge Base Articles Restore +Restore-NinjaOneKnowledgeBaseFolders: Knowledge Base Folders Restore +Move-NinjaOneKnowledgeBaseItems: Knowledge Base Items Move +Set-NinjaOneKnowledgeBaseArticles: Knowledge Base Articles +Remove-NinjaOneDeviceOwner: Device Owner +Set-NinjaOneDeviceOwner: Device Owner +Get-NinjaOneOrganisationEndUsers: Organisation End Users +Invoke-NinjaOneOrganisationArchive: Organisation Archive +Invoke-NinjaOneOrganisationRestore: Organisation Restore +Get-NinjaOneOrganisationChecklist: Organisation Checklist +Get-NinjaOneOrganisationChecklists: Organisation Checklists +Get-NinjaOneOrganisationChecklistSignedURLs: Organisation Checklist Signed URLs +Invoke-NinjaOneOrganisationChecklistsPromote: Organisation Checklists Promote +Invoke-NinjaOneOrganisationChecklistsPromoteWithName: Organisation Checklists Promote With Name +New-NinjaOneOrganisationChecklist: Organisation Checklist +New-NinjaOneOrganisationChecklistsFromTemplates: Organisation Checklists From Templates +Remove-NinjaOneOrganisationChecklist: Organisation Checklist +Remove-NinjaOneOrganisationChecklists: Organisation Checklists +Set-NinjaOneOrganisationChecklists: Organisation Checklists +Invoke-NinjaOneOrganisationDocumentArchive: Organisation Document Archive +Invoke-NinjaOneOrganisationDocumentRestore: Organisation Document Restore +Invoke-NinjaOneOrganisationDocumentsArchive: Organisation Documents Archive +Invoke-NinjaOneOrganisationDocumentsRestore: Organisation Documents Restore +Get-NinjaOneContact: Contact +Get-NinjaOneSystemContacts: System Contacts +New-NinjaOneContact: Contact +Remove-NinjaOneContact: Contact +Set-NinjaOneContact: Contact +Get-NinjaOneTab: Tab +Get-NinjaOneTabEndUser: Tab End User +Get-NinjaOneTabOrganisation: Tab Organisation +Get-NinjaOneTabRole: Tab Role +Get-NinjaOneTabSummaryEndUser: Tab Summary End User +Get-NinjaOneTabSummaryOrganisation: Tab Summary Organisation +Get-NinjaOneTabSummaryRole: Tab Summary Role +New-NinjaOneTab: Tab +Remove-NinjaOneTab: Tab +Rename-NinjaOneTab: Tab Rename +Set-NinjaOneTab: Tab +Set-NinjaOneTabEndUserOrder: Tab End User Order +Set-NinjaOneTabOrganisationOrder: Tab Organisation Order +Set-NinjaOneTabRoleOrder: Tab Role Order +Set-NinjaOneTabRoleVisibility: Tab Role Visibility +Get-NinjaOneTags: Tags +New-NinjaOneTag: Tag +New-NinjaOneTagGlobal: Tag Global +Remove-NinjaOneTag: Tag +Remove-NinjaOneTags: Tags +Merge-NinjaOneTags: Tags Merge +Set-NinjaOneAssetTag: Asset Tag +Set-NinjaOneTag: Tag +Get-NinjaOneEndUser: End User +Get-NinjaOneEndUserCustomFields: End User Custom Fields +Get-NinjaOneEndUsers: End Users +Get-NinjaOneTechnician: Technician +Get-NinjaOneTechnicians: Technicians +Get-NinjaOneUserRoles: User Roles +New-NinjaOneEndUser: End User +New-NinjaOneTechnician: Technician +Remove-NinjaOneEndUser: End User +Remove-NinjaOneTechnician: Technician +Add-NinjaOneUserRoleMembers: User Role Members (Add) +Remove-NinjaOneUserRoleMembers: User Role Members (Remove) +Set-NinjaOneEndUser: End User +Set-NinjaOneEndUserCustomFields: End User Custom Fields +Set-NinjaOneTechnician: Technician +Get-NinjaOneVulnerabilityScanGroup: Vulnerability Scan Group +Get-NinjaOneVulnerabilityScanGroups: Vulnerability Scan Groups +Invoke-NinjaOneVulnerabilityScanGroupUpload: Vulnerability Scan Group Upload diff --git a/CHANGELOG.md b/CHANGELOG.md index 070ce51..74efb1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,107 @@ # Changelog -Please note that backwards compatibility breaks are prefixed with `{"BC"}` (short for Breaking Change). +Please note that backwards compatibility breaks are prefixed with `{"BC"}` (short for Breaking Change). + +## 2025-09-04 - Version TBD + +* Add new commandlets: + * `Get-NinjaOneChecklistTemplates` + * `New-NinjaOneChecklistTemplate` + * `Remove-NinjaOneChecklistTemplate` + * `Remove-NinjaOneChecklistTemplates` + * `Set-NinjaOneChecklistTemplates` + * `Invoke-NinjaOneChecklistArchive` + * `Invoke-NinjaOneChecklistRestore` + * `Get-NinjaOneEntityCustomFieldsSignedURLs` + * `Start-NinjaOneOSPatchApply` + * `Start-NinjaOneOSPatchScanJob` + * `Start-NinjaOneSoftwarePatchApply` + * `Start-NinjaOneSoftwarePatchScan` + * `Invoke-NinjaOneDocumentTemplateArchive` + * `Invoke-NinjaOneDocumentTemplateRestore` + * `Invoke-NinjaOneDocumentTemplatesArchive` + * `Invoke-NinjaOneDocumentTemplatesRestore` + * `New-NinjaOneUnmanagedDevice` + * `Remove-NinjaOneUnmanagedDevice` + * `Set-NinjaOneUnmanagedDevice` + * `Invoke-NinjaOneKnowledgeBaseArticlesArchive` + * `Invoke-NinjaOneKnowledgeBaseFoldersArchive` + * `New-NinjaOneKnowledgeBaseArticles` + * `Remove-NinjaOneKnowledgeBaseArticles` + * `Remove-NinjaOneKnowledgeBaseFolders` + * `Restore-NinjaOneKnowledgeBaseArticles` + * `Restore-NinjaOneKnowledgeBaseFolders` + * `Move-NinjaOneKnowledgeBaseItems` + * `Set-NinjaOneKnowledgeBaseArticles` + * `Remove-NinjaOneDeviceOwner` + * `Set-NinjaOneDeviceOwner` + * `Get-NinjaOneOrganisationEndUsers` + * `Invoke-NinjaOneOrganisationArchive` + * `Invoke-NinjaOneOrganisationRestore` + * `Get-NinjaOneOrganisationChecklist` + * `Get-NinjaOneOrganisationChecklists` + * `Get-NinjaOneOrganisationChecklistSignedURLs` + * `Invoke-NinjaOneOrganisationChecklistsPromote` + * `Invoke-NinjaOneOrganisationChecklistsPromoteWithName` + * `New-NinjaOneOrganisationChecklist` + * `New-NinjaOneOrganisationChecklistsFromTemplates` + * `Remove-NinjaOneOrganisationChecklist` + * `Remove-NinjaOneOrganisationChecklists` + * `Set-NinjaOneOrganisationChecklists` + * `Invoke-NinjaOneOrganisationDocumentArchive` + * `Invoke-NinjaOneOrganisationDocumentRestore` + * `Invoke-NinjaOneOrganisationDocumentsArchive` + * `Invoke-NinjaOneOrganisationDocumentsRestore` + * `Get-NinjaOneContact` + * `Get-NinjaOneSystemContacts` + * `New-NinjaOneContact` + * `Remove-NinjaOneContact` + * `Set-NinjaOneContact` + * `Get-NinjaOneTab` + * `Get-NinjaOneTabEndUser` + * `Get-NinjaOneTabOrganisation` + * `Get-NinjaOneTabRole` + * `Get-NinjaOneTabSummaryEndUser` + * `Get-NinjaOneTabSummaryOrganisation` + * `Get-NinjaOneTabSummaryRole` + * `New-NinjaOneTab` + * `Remove-NinjaOneTab` + * `Rename-NinjaOneTab` + * `Set-NinjaOneTab` + * `Set-NinjaOneTabEndUserOrder` + * `Set-NinjaOneTabOrganisationOrder` + * `Set-NinjaOneTabRoleOrder` + * `Set-NinjaOneTabRoleVisibility` + * `Get-NinjaOneTags` + * `New-NinjaOneTag` + * `New-NinjaOneTagGlobal` + * `Remove-NinjaOneTag` + * `Remove-NinjaOneTags` + * `Merge-NinjaOneTags` + * `Set-NinjaOneAssetTag` + * `Set-NinjaOneTag` + * `Get-NinjaOneEndUser` + * `Get-NinjaOneEndUserCustomFields` + * `Get-NinjaOneEndUsers` + * `Get-NinjaOneTechnician` + * `Get-NinjaOneTechnicians` + * `Get-NinjaOneUserRoles` + * `New-NinjaOneEndUser` + * `New-NinjaOneTechnician` + * `Remove-NinjaOneEndUser` + * `Remove-NinjaOneTechnician` + * `Add-NinjaOneUserRoleMembers` + * `Remove-NinjaOneUserRoleMembers` + * `Set-NinjaOneEndUser` + * `Set-NinjaOneEndUserCustomFields` + * `Set-NinjaOneTechnician` + * `Get-NinjaOneVulnerabilityScanGroup` + * `Get-NinjaOneVulnerabilityScanGroups` + * `Invoke-NinjaOneVulnerabilityScanGroupUpload` + +* Updates: + * Update module manifest `NinjaOne.psd1`. + * Improve `Get-NinjaOneRelatedItemAttachmentSignedURLs` internals. ## 2024-10-01 - Version 2.0.4 @@ -340,4 +441,4 @@ Please note that backwards compatibility breaks are prefixed with `{"BC"}` (shor ## 2021-08-19 - Version 0.0.1-alpha * Initial preview release of the NinjaRMM API PowerShell module. - \ No newline at end of file + diff --git a/Public/Checklist Templates/Get/Get-NinjaOneChecklistTemplates.ps1 b/Public/Checklist Templates/Get/Get-NinjaOneChecklistTemplates.ps1 new file mode 100644 index 0000000..981125c --- /dev/null +++ b/Public/Checklist Templates/Get/Get-NinjaOneChecklistTemplates.ps1 @@ -0,0 +1,34 @@ +function Get-NinjaOneChecklistTemplates { + <# + .SYNOPSIS + Gets checklist templates. + .DESCRIPTION + Retrieves checklist templates via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Get-NinjaOneChecklistTemplates + + Gets all checklist templates. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/checklisttemplates + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoclt')] + [MetadataAttribute( + '/v2/checklist/templates', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/checklist/templates' + $RequestParams = @{ Resource = $Resource } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw 'No checklist templates found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Checklist Templates/New/New-NinjaOneChecklistTemplate.ps1 b/Public/Checklist Templates/New/New-NinjaOneChecklistTemplate.ps1 new file mode 100644 index 0000000..cd88ddf --- /dev/null +++ b/Public/Checklist Templates/New/New-NinjaOneChecklistTemplate.ps1 @@ -0,0 +1,31 @@ +function New-NinjaOneChecklistTemplate { + <# + .SYNOPSIS + Creates a checklist template. + .DESCRIPTION + Creates a new checklist template via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> New-NinjaOneChecklistTemplate -template @{ name='Onboarding'; items=@('Step1') } + + Creates a checklist template. + .OUTPUTS + A PowerShell object containing the created template. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/checklisttemplate + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('nnoct')] + [MetadataAttribute( + '/v2/checklist/templates', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$template + ) + process { try { if($PSCmdlet.ShouldProcess('Checklist Template','Create')){ return (New-NinjaOnePOSTRequest -Resource 'v2/checklist/templates' -Body $template) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplate.ps1 b/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplate.ps1 new file mode 100644 index 0000000..0567ddd --- /dev/null +++ b/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplate.ps1 @@ -0,0 +1,39 @@ +function Remove-NinjaOneChecklistTemplate { + <# + .SYNOPSIS + Removes a checklist template. + .DESCRIPTION + Deletes a checklist template via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .OUTPUTS + Status code (204) on success. + .EXAMPLE + PS> Remove-NinjaOneChecklistTemplate -checklistTemplateId 10 -Confirm:$false + + Deletes the checklist template with Id 10. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoclt')] + [MetadataAttribute( + '/v2/checklist/template/{checklistTemplateId}', + 'delete' + )] + Param( + # Checklist template Id to delete. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$checklistTemplateId + ) + process { + try { + $Resource = ('v2/checklist/template/{0}' -f $checklistTemplateId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Checklist Template {0}' -f $checklistTemplateId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Checklist template {0} deleted successfully.' -f $checklistTemplateId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplates.ps1 b/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplates.ps1 new file mode 100644 index 0000000..7f761d8 --- /dev/null +++ b/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplates.ps1 @@ -0,0 +1,30 @@ +function Remove-NinjaOneChecklistTemplates { + <# + .SYNOPSIS + Deletes checklist templates. + .DESCRIPTION + Deletes one or more checklist templates via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Remove-NinjaOneChecklistTemplates -templateIds @(1,2) -Confirm:$false + + Deletes templates 1 and 2. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/checklisttemplates + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('rnocltm')] + [MetadataAttribute( + '/v2/checklist/templates/delete', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int[]]$templateIds + ) + process { try { if($PSCmdlet.ShouldProcess('Checklist Templates','Delete')){ return (New-NinjaOnePOSTRequest -Resource 'v2/checklist/templates/delete' -Body $templateIds) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/Checklist Templates/Set/Set-NinjaOneChecklistTemplates.ps1 b/Public/Checklist Templates/Set/Set-NinjaOneChecklistTemplates.ps1 new file mode 100644 index 0000000..34c9e73 --- /dev/null +++ b/Public/Checklist Templates/Set/Set-NinjaOneChecklistTemplates.ps1 @@ -0,0 +1,31 @@ +function Set-NinjaOneChecklistTemplates { + <# + .SYNOPSIS + Updates checklist templates. + .DESCRIPTION + Updates checklist templates via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Set-NinjaOneChecklistTemplates -templates @{ templates = @(@{ id=1; name='New' }) } + + Updates the specified templates. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/checklisttemplates + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snocltm')] + [MetadataAttribute( + '/v2/checklist/templates', + 'put' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$templates + ) + process { try { if($PSCmdlet.ShouldProcess('Checklist Templates','Update')){ return (New-NinjaOnePUTRequest -Resource 'v2/checklist/templates' -Body $templates) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/Checklist/Invoke/Invoke-NinjaOneChecklistArchive.ps1 b/Public/Checklist/Invoke/Invoke-NinjaOneChecklistArchive.ps1 new file mode 100644 index 0000000..148185d --- /dev/null +++ b/Public/Checklist/Invoke/Invoke-NinjaOneChecklistArchive.ps1 @@ -0,0 +1,31 @@ +function Invoke-NinjaOneChecklistArchive { + <# + .SYNOPSIS + Archives checklists. + .DESCRIPTION + Archives one or more checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Invoke-NinjaOneChecklistArchive -request @{ checklistIds = @(1,2) } + + Archives the specified checklists. + .OUTPUTS + Status code or job result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/checklist-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inoclarch')] + [MetadataAttribute( + '/v2/checklist/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Checklists','Archive')){ return (New-NinjaOnePOSTRequest -Resource 'v2/checklist/archive' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/Checklist/Invoke/Invoke-NinjaOneChecklistRestore.ps1 b/Public/Checklist/Invoke/Invoke-NinjaOneChecklistRestore.ps1 new file mode 100644 index 0000000..2f21c68 --- /dev/null +++ b/Public/Checklist/Invoke/Invoke-NinjaOneChecklistRestore.ps1 @@ -0,0 +1,31 @@ +function Invoke-NinjaOneChecklistRestore { + <# + .SYNOPSIS + Restores archived checklists. + .DESCRIPTION + Restores archived checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Invoke-NinjaOneChecklistRestore -request @{ checklistIds = @(1,2) } + + Restores the specified checklists. + .OUTPUTS + Status code or job result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/checklist-restore + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inoclrest')] + [MetadataAttribute( + '/v2/checklist/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Checklists','Restore')){ return (New-NinjaOnePOSTRequest -Resource 'v2/checklist/restore' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/CustomFields/Get/Get-NinjaOneEntityCustomFieldsSignedURLs.ps1 b/Public/CustomFields/Get/Get-NinjaOneEntityCustomFieldsSignedURLs.ps1 new file mode 100644 index 0000000..8428b1a --- /dev/null +++ b/Public/CustomFields/Get/Get-NinjaOneEntityCustomFieldsSignedURLs.ps1 @@ -0,0 +1,51 @@ +function Get-NinjaOneEntityCustomFieldsSignedURLs { + <# + .SYNOPSIS + Gets signed URLs for custom fields on an entity. + .DESCRIPTION + Retrieves signed URLs for custom fields for a given entity type and Id via the NinjaOne v2 API. + .FUNCTIONALITY + Custom Fields + .EXAMPLE + PS> Get-NinjaOneEntityCustomFieldsSignedURLs -entityType ORGANIZATION -entityId 1 + + Gets custom field signed URLs for the ORGANIZATION entity with Id 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/customfields-signedurls + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoecfsu')] + [MetadataAttribute( + '/v2/custom-fields/entity-type/{entityType}/{entityId}/signed-urls', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The entity type. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [ValidateSet('ORGANIZATION','DOCUMENT','LOCATION','NODE','ATTACHMENT','TECHNICIAN','CREDENTIAL','CHECKLIST','END_USER','CONTACT','KB_DOCUMENT')] + [String]$entityType, + # The entity Id. + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Int]$entityId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($entityType) { $Parameters.Remove('entityType') | Out-Null } + if ($entityId) { $Parameters.Remove('entityId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/custom-fields/entity-type/{0}/{1}/signed-urls' -f $entityType, $entityId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('No custom field signed URLs found for {0} {1}.' -f $entityType, $entityId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Devices/Set/Start-NinjaOneOSPatchApply.ps1 b/Public/Devices/Set/Start-NinjaOneOSPatchApply.ps1 new file mode 100644 index 0000000..0627ea9 --- /dev/null +++ b/Public/Devices/Set/Start-NinjaOneOSPatchApply.ps1 @@ -0,0 +1,44 @@ +function Start-NinjaOneOSPatchApply { + <# + .SYNOPSIS + Starts an OS Patch Apply on the target device. + .DESCRIPTION + Submits a job to start an OS patch apply on a device via the NinjaOne v2 API. + .FUNCTIONALITY + Device OS Patch Apply + .EXAMPLE + PS> Start-NinjaOneOSPatchApply -deviceId 1 + + Start an OS Patch Apply on the device with id 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/ospatchapply + #> + [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoospa')] + [MetadataAttribute( + '/v2/device/{id}/patch/os/apply', + 'post' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The device to start the OS patch apply for. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$deviceId + ) + process { + try { + Write-Verbose ('Starting OS Patch Apply for device {0}.' -f $deviceId) + $Resource = ('v2/device/{0}/patch/os/apply' -f $deviceId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('OS Patch Apply for {0}' -f $deviceId), 'Start')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Devices/Set/Start-NinjaOneOSPatchScanJob.ps1 b/Public/Devices/Set/Start-NinjaOneOSPatchScanJob.ps1 new file mode 100644 index 0000000..2399e11 --- /dev/null +++ b/Public/Devices/Set/Start-NinjaOneOSPatchScanJob.ps1 @@ -0,0 +1,40 @@ +function Start-NinjaOneOSPatchScanJob { + <# + .SYNOPSIS + Starts an OS Patch Scan job on the target device. + .DESCRIPTION + Submits a job (POST) to start an OS patch scan on a device via the NinjaOne v2 API. Complements the PATCH variant. + .FUNCTIONALITY + Device OS Patch Scan + .EXAMPLE + PS> Start-NinjaOneOSPatchScanJob -deviceId 1 + + Starts an OS Patch Scan job on device 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/ospatchscan + #> + [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoossp')] + [MetadataAttribute( + '/v2/device/{id}/patch/os/scan', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$deviceId + ) + process { + try { + $Resource = ('v2/device/{0}/patch/os/scan' -f $deviceId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('OS Patch Scan for {0}' -f $deviceId), 'Start')) { + return (New-NinjaOnePOSTRequest @RequestParams) + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Devices/Set/Start-NinjaOneSoftwarePatchApply.ps1 b/Public/Devices/Set/Start-NinjaOneSoftwarePatchApply.ps1 new file mode 100644 index 0000000..0c42631 --- /dev/null +++ b/Public/Devices/Set/Start-NinjaOneSoftwarePatchApply.ps1 @@ -0,0 +1,44 @@ +function Start-NinjaOneSoftwarePatchApply { + <# + .SYNOPSIS + Starts a Software Patch Apply on the target device. + .DESCRIPTION + Submits a job to start a software patch apply on a device via the NinjaOne v2 API. + .FUNCTIONALITY + Device Software Patch Apply + .EXAMPLE + PS> Start-NinjaOneSoftwarePatchApply -deviceId 1 + + Start a Software Patch Apply on the device with id 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/softwarepatchapply + #> + [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoswpa')] + [MetadataAttribute( + '/v2/device/{id}/patch/software/apply', + 'post' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The device to start the software patch apply for. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$deviceId + ) + process { + try { + Write-Verbose ('Starting Software Patch Apply for device {0}.' -f $deviceId) + $Resource = ('v2/device/{0}/patch/software/apply' -f $deviceId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Software Patch Apply for {0}' -f $deviceId), 'Start')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Devices/Set/Start-NinjaOneSoftwarePatchScan.ps1 b/Public/Devices/Set/Start-NinjaOneSoftwarePatchScan.ps1 new file mode 100644 index 0000000..6c3cddb --- /dev/null +++ b/Public/Devices/Set/Start-NinjaOneSoftwarePatchScan.ps1 @@ -0,0 +1,44 @@ +function Start-NinjaOneSoftwarePatchScan { + <# + .SYNOPSIS + Starts a Software Patch Scan on the target device. + .DESCRIPTION + Submits a job to start a software patch scan on a device via the NinjaOne v2 API. + .FUNCTIONALITY + Device Software Patch Scan + .EXAMPLE + PS> Start-NinjaOneSoftwarePatchScan -deviceId 1 + + Start a Software Patch Scan on the device with id 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/softwarepatchscan + #> + [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoswps')] + [MetadataAttribute( + '/v2/device/{id}/patch/software/scan', + 'post' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The device to start the software patch scan for. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$deviceId + ) + process { + try { + Write-Verbose ('Starting Software Patch Scan for device {0}.' -f $deviceId) + $Resource = ('v2/device/{0}/patch/software/scan' -f $deviceId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Software Patch Scan for {0}' -f $deviceId), 'Start')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateArchive.ps1 b/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateArchive.ps1 new file mode 100644 index 0000000..0b50f77 --- /dev/null +++ b/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateArchive.ps1 @@ -0,0 +1,30 @@ +function Invoke-NinjaOneDocumentTemplateArchive { + <# + .SYNOPSIS + Archives a document template. + .DESCRIPTION + Archives a document template via the NinjaOne v2 API. + .FUNCTIONALITY + Document Templates + .EXAMPLE + PS> Invoke-NinjaOneDocumentTemplateArchive -documentTemplateId 10 + + Archives template 10. + .OUTPUTS + Status code or job result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/documenttemplate-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inodta')] + [MetadataAttribute( + '/v2/document-templates/{documentTemplateId}/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$documentTemplateId + ) + process { try { $res='v2/document-templates/{0}/archive' -f $documentTemplateId; if($PSCmdlet.ShouldProcess(('Document Template {0}' -f $documentTemplateId),'Archive')){ return (New-NinjaOnePOSTRequest -Resource $res) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateRestore.ps1 b/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateRestore.ps1 new file mode 100644 index 0000000..f89144d --- /dev/null +++ b/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateRestore.ps1 @@ -0,0 +1,30 @@ +function Invoke-NinjaOneDocumentTemplateRestore { + <# + .SYNOPSIS + Restores an archived document template. + .DESCRIPTION + Restores an archived document template via the NinjaOne v2 API. + .FUNCTIONALITY + Document Templates + .EXAMPLE + PS> Invoke-NinjaOneDocumentTemplateRestore -documentTemplateId 10 + + Restores template 10. + .OUTPUTS + Status code or job result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/documenttemplate-restore + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inodtr')] + [MetadataAttribute( + '/v2/document-templates/{documentTemplateId}/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$documentTemplateId + ) + process { try { $res='v2/document-templates/{0}/restore' -f $documentTemplateId; if($PSCmdlet.ShouldProcess(('Document Template {0}' -f $documentTemplateId),'Restore')){ return (New-NinjaOnePOSTRequest -Resource $res) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesArchive.ps1 b/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesArchive.ps1 new file mode 100644 index 0000000..6642947 --- /dev/null +++ b/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesArchive.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneDocumentTemplatesArchive { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inodtas')] + [MetadataAttribute( + '/v2/document-templates/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Document Templates','Archive')){ return (New-NinjaOnePOSTRequest -Resource 'v2/document-templates/archive' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesRestore.ps1 b/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesRestore.ps1 new file mode 100644 index 0000000..98f4731 --- /dev/null +++ b/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesRestore.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneDocumentTemplatesRestore { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inodtrs')] + [MetadataAttribute( + '/v2/document-templates/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Document Templates','Restore')){ return (New-NinjaOnePOSTRequest -Resource 'v2/document-templates/restore' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Public/ITAM/New/New-NinjaOneUnmanagedDevice.ps1 b/Public/ITAM/New/New-NinjaOneUnmanagedDevice.ps1 new file mode 100644 index 0000000..b7f01e9 --- /dev/null +++ b/Public/ITAM/New/New-NinjaOneUnmanagedDevice.ps1 @@ -0,0 +1,36 @@ +function New-NinjaOneUnmanagedDevice { + <# + .SYNOPSIS + Creates an unmanaged device. + .DESCRIPTION + Creates an unmanaged device via the NinjaOne v2 API. + .FUNCTIONALITY + Unmanaged Devices + .EXAMPLE + PS> New-NinjaOneUnmanagedDevice -unmanagedDevice @{ hostname='asset-5001' } + + Creates an unmanaged device. + .OUTPUTS + A PowerShell object containing the created unmanaged device Id. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/unmanageddevice + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoUD')] + [MetadataAttribute( + '/v2/itam/unmanaged-device', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$unmanagedDevice + ) + process { + try { + $RequestParams = @{ Resource = 'v2/itam/unmanaged-device'; Body = $unmanagedDevice } + if ($PSCmdlet.ShouldProcess('Unmanaged Device', 'Create')) { return (New-NinjaOnePOSTRequest @RequestParams) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/ITAM/Remove/Remove-NinjaOneUnmanagedDevice.ps1 b/Public/ITAM/Remove/Remove-NinjaOneUnmanagedDevice.ps1 new file mode 100644 index 0000000..e5cb8d4 --- /dev/null +++ b/Public/ITAM/Remove/Remove-NinjaOneUnmanagedDevice.ps1 @@ -0,0 +1,39 @@ +function Remove-NinjaOneUnmanagedDevice { + <# + .SYNOPSIS + Deletes an unmanaged device. + .DESCRIPTION + Deletes an unmanaged device via the NinjaOne v2 API. + .FUNCTIONALITY + Unmanaged Devices + .EXAMPLE + PS> Remove-NinjaOneUnmanagedDevice -nodeId 5001 -Confirm:$false + + Deletes unmanaged device 5001. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/unmanageddevice + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoud')] + [MetadataAttribute( + '/v2/itam/unmanaged-device/{nodeId}', + 'delete' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$nodeId + ) + process { + try { + $Resource = ('v2/itam/unmanaged-device/{0}' -f $nodeId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Unmanaged Device {0}' -f $nodeId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Unmanaged device {0} deleted.' -f $nodeId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/ITAM/Set/Set-NinjaOneUnmanagedDevice.ps1 b/Public/ITAM/Set/Set-NinjaOneUnmanagedDevice.ps1 new file mode 100644 index 0000000..b4ca6fa --- /dev/null +++ b/Public/ITAM/Set/Set-NinjaOneUnmanagedDevice.ps1 @@ -0,0 +1,45 @@ +function Set-NinjaOneUnmanagedDevice { + <# + .SYNOPSIS + Updates an unmanaged device. + .DESCRIPTION + Updates an unmanaged device via the NinjaOne v2 API. + .FUNCTIONALITY + Unmanaged Devices + .EXAMPLE + PS> Set-NinjaOneUnmanagedDevice -nodeId 5001 -unmanagedDevice @{ hostname = 'asset-5001' } + + Updates unmanaged device 5001. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/unmanageddevice + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoud')] + [MetadataAttribute( + '/v2/itam/unmanaged-device/{nodeId}', + 'put' + )] + Param( + # Unmanaged device node Id + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$nodeId, + # Update payload + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$unmanagedDevice + ) + process { + try { + $Resource = ('v2/itam/unmanaged-device/{0}' -f $nodeId) + $RequestParams = @{ Resource = $Resource; Body = $unmanagedDevice } + if ($PSCmdlet.ShouldProcess(('Unmanaged Device {0}' -f $nodeId), 'Update')) { + $Result = New-NinjaOnePUTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/KnowledgeBaseArticles/Get/Get-NinjaOneRelatedItemAttachmentSignedURLs.ps1 b/Public/KnowledgeBaseArticles/Get/Get-NinjaOneRelatedItemAttachmentSignedURLs.ps1 new file mode 100644 index 0000000..d29f6c5 --- /dev/null +++ b/Public/KnowledgeBaseArticles/Get/Get-NinjaOneRelatedItemAttachmentSignedURLs.ps1 @@ -0,0 +1,60 @@ + +function Get-NinjaOneRelatedItemAttachmentSignedURLs { + <# + .SYNOPSIS + Gets related item attachment signed URLs from the NinjaOne API. + .DESCRIPTION + Retrieves a related item attachment signed URLs from the NinjaOne v2 API. + .FUNCTIONALITY + Related Item Attachment Signed URLs + .EXAMPLE + PS> Get-NinjaOneRelatedItemAttachmentSignedURLs -entityType 'KB_DOCUMENT' -entityId 1 + + Gets the related item attachment signed URLs for the KB_DOCUMENT entity with id 1. + .OUTPUTS + A powershell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/relateditemattachmentsignedurls + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoriasu')] +[MetadataAttribute( + '/v2/related-items/with-entity/{entityType}/{entityId}/attachments/signed-urls', + 'get' +)] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The entity type of the related item. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [ValidateSet('ORGANIZATION', 'DOCUMENT', 'LOCATION', 'NODE', 'CHECKLIST', 'KB_DOCUMENT')] + [String]$entityType, + # The entity id of the related item. + [Parameter(Mandatory, Position = 1, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$entityId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + # Workaround to prevent the query string processor from adding an 'entityType=' parameter by removing it from the set parameters. + $Parameters.Remove('entityType') | Out-Null + # Workaround to prevent the query string processor from adding an 'entityId=' parameter by removing it from the set parameters. + $Parameters.Remove('entityId') | Out-Null + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + Write-Verbose ('Getting related item attachment signed urls for {0} entity {1}.' -f $entityType, $entityId) + $Resource = ('v2/related-items/with-entity/{0}/{1}/attachments/signed-urls' -f $entityType, $entityId) + $RequestParams = @{ + Resource = $Resource + QSCollection = $QSCollection + } + $RelatedItemAttachmentSignedURLsResults = New-NinjaOneGETRequest @RequestParams + return $RelatedItemAttachmentSignedURLsResults + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} diff --git a/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseArticlesArchive.ps1 b/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseArticlesArchive.ps1 new file mode 100644 index 0000000..98b1dcb --- /dev/null +++ b/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseArticlesArchive.ps1 @@ -0,0 +1,40 @@ +function Invoke-NinjaOneKnowledgeBaseArticlesArchive { + <# + .SYNOPSIS + Archives knowledge base articles. + .DESCRIPTION + Archives knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Invoke-NinjaOneKnowledgeBaseArticlesArchive -articleIds @(1,2,3) + + Archives the specified articles. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/kb-articles-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('inokbaa')] + [MetadataAttribute( + '/v2/knowledgebase/articles/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$articleIds + ) + process { + try { + $Resource = 'v2/knowledgebase/articles/archive' + $RequestParams = @{ Resource = $Resource; Body = $articleIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Articles', 'Archive')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseFoldersArchive.ps1 b/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseFoldersArchive.ps1 new file mode 100644 index 0000000..175357b --- /dev/null +++ b/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseFoldersArchive.ps1 @@ -0,0 +1,40 @@ +function Invoke-NinjaOneKnowledgeBaseFoldersArchive { + <# + .SYNOPSIS + Archives knowledge base folders. + .DESCRIPTION + Archives knowledge base folders via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Invoke-NinjaOneKnowledgeBaseFoldersArchive -folderIds @(10,11) + + Archives the specified folders. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/kb-folders-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('inokbfa')] + [MetadataAttribute( + '/v2/knowledgebase/folders/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$folderIds + ) + process { + try { + $Resource = 'v2/knowledgebase/folders/archive' + $RequestParams = @{ Resource = $Resource; Body = $folderIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Folders', 'Archive')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/KnowledgeBaseArticles/New/New-NinjaOneKnowledgeBaseArticles.ps1 b/Public/KnowledgeBaseArticles/New/New-NinjaOneKnowledgeBaseArticles.ps1 new file mode 100644 index 0000000..08ca162 --- /dev/null +++ b/Public/KnowledgeBaseArticles/New/New-NinjaOneKnowledgeBaseArticles.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneKnowledgeBaseArticles { + <# + .SYNOPSIS + Creates knowledge base articles. + .DESCRIPTION + Creates one or more knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> New-NinjaOneKnowledgeBaseArticles -articles @{ organizationId = 1; folderId = 10; articles = @(@{ name='A'; content='...'} ) } + + Creates knowledge base articles in the specified folder. + .OUTPUTS + A PowerShell object containing the created articles or job result. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/knowledgebase-articles + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnokba')] + [MetadataAttribute( + '/v2/knowledgebase/articles', + 'post' + )] + Param( + # Articles payload per API schema + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$articles + ) + process { + try { + $Resource = 'v2/knowledgebase/articles' + $RequestParams = @{ Resource = $Resource; Body = $articles } + if ($PSCmdlet.ShouldProcess('Knowledge Base Articles', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseArticles.ps1 b/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseArticles.ps1 new file mode 100644 index 0000000..b99016e --- /dev/null +++ b/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseArticles.ps1 @@ -0,0 +1,40 @@ +function Remove-NinjaOneKnowledgeBaseArticles { + <# + .SYNOPSIS + Deletes knowledge base articles. + .DESCRIPTION + Deletes knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Remove-NinjaOneKnowledgeBaseArticles -articleIds @(1,2,3) -Confirm:$false + + Deletes the specified articles. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/kb-articles + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnokba')] + [MetadataAttribute( + '/v2/knowledgebase/articles/delete', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$articleIds + ) + process { + try { + $Resource = 'v2/knowledgebase/articles/delete' + $RequestParams = @{ Resource = $Resource; Body = $articleIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Articles', 'Delete')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseFolders.ps1 b/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseFolders.ps1 new file mode 100644 index 0000000..0834930 --- /dev/null +++ b/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseFolders.ps1 @@ -0,0 +1,40 @@ +function Remove-NinjaOneKnowledgeBaseFolders { + <# + .SYNOPSIS + Deletes knowledge base folders. + .DESCRIPTION + Deletes knowledge base folders via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Remove-NinjaOneKnowledgeBaseFolders -folderIds @(10,11) -Confirm:$false + + Deletes the specified folders. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/kb-folders + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnokbf')] + [MetadataAttribute( + '/v2/knowledgebase/folders/delete', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$folderIds + ) + process { + try { + $Resource = 'v2/knowledgebase/folders/delete' + $RequestParams = @{ Resource = $Resource; Body = $folderIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Folders', 'Delete')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseArticles.ps1 b/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseArticles.ps1 new file mode 100644 index 0000000..4ac7804 --- /dev/null +++ b/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseArticles.ps1 @@ -0,0 +1,40 @@ +function Restore-NinjaOneKnowledgeBaseArticles { + <# + .SYNOPSIS + Restores archived knowledge base articles. + .DESCRIPTION + Restores archived knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Restore-NinjaOneKnowledgeBaseArticles -articleIds @(1,2,3) + + Restores the specified articles. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Restore/kb-articles + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rtnokba')] + [MetadataAttribute( + '/v2/knowledgebase/articles/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$articleIds + ) + process { + try { + $Resource = 'v2/knowledgebase/articles/restore' + $RequestParams = @{ Resource = $Resource; Body = $articleIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Articles', 'Restore')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseFolders.ps1 b/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseFolders.ps1 new file mode 100644 index 0000000..08ee80a --- /dev/null +++ b/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseFolders.ps1 @@ -0,0 +1,40 @@ +function Restore-NinjaOneKnowledgeBaseFolders { + <# + .SYNOPSIS + Restores archived knowledge base folders. + .DESCRIPTION + Restores archived knowledge base folders via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Restore-NinjaOneKnowledgeBaseFolders -folderIds @(10,11) + + Restores the specified folders. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Restore/kb-folders + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rtnokbf')] + [MetadataAttribute( + '/v2/knowledgebase/folders/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$folderIds + ) + process { + try { + $Resource = 'v2/knowledgebase/folders/restore' + $RequestParams = @{ Resource = $Resource; Body = $folderIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Folders', 'Restore')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/KnowledgeBaseArticles/Set/Move-NinjaOneKnowledgeBaseItems.ps1 b/Public/KnowledgeBaseArticles/Set/Move-NinjaOneKnowledgeBaseItems.ps1 new file mode 100644 index 0000000..980da3b --- /dev/null +++ b/Public/KnowledgeBaseArticles/Set/Move-NinjaOneKnowledgeBaseItems.ps1 @@ -0,0 +1,42 @@ +function Move-NinjaOneKnowledgeBaseItems { + <# + .SYNOPSIS + Moves knowledge base folders and documents to another folder. + .DESCRIPTION + Moves knowledge base items using the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Move-NinjaOneKnowledgeBaseItems -moveRequest @{ sourceFolderIds=@(1); sourceDocumentIds=@(2,3); targetFolderId=10 } + + Moves the specified KB items to folder 10. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/kb-move + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('mvnokbi')] + [MetadataAttribute( + '/v2/knowledgebase/folders/move', + 'patch' + )] + Param( + # Move request payload per API schema (MovePublicApiRequest) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$moveRequest + ) + process { + try { + $Resource = 'v2/knowledgebase/folders/move' + $RequestParams = @{ Resource = $Resource; Body = $moveRequest } + if ($PSCmdlet.ShouldProcess('Knowledge Base Items', 'Move')) { + $Response = New-NinjaOnePATCHRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/KnowledgeBaseArticles/Set/Set-NinjaOneKnowledgeBaseArticles.ps1 b/Public/KnowledgeBaseArticles/Set/Set-NinjaOneKnowledgeBaseArticles.ps1 new file mode 100644 index 0000000..7e4d90c --- /dev/null +++ b/Public/KnowledgeBaseArticles/Set/Set-NinjaOneKnowledgeBaseArticles.ps1 @@ -0,0 +1,35 @@ +function Set-NinjaOneKnowledgeBaseArticles { + <# + .SYNOPSIS + Updates knowledge base articles. + .DESCRIPTION + Updates one of more knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Set-NinjaOneKnowledgeBaseArticles -articles @{ articles = @(@{ id=1; name='New' }) } + + Updates the specified KB articles. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/knowledgebase-articles + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snonkba')] + [MetadataAttribute( + '/v2/knowledgebase/articles', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$articles + ) + process { + try { + if($PSCmdlet.ShouldProcess('Knowledge Base Articles','Update')){ return (New-NinjaOnePATCHRequest -Resource 'v2/knowledgebase/articles' -Body $articles) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Management/Remove/Remove-NinjaOneDeviceOwner.ps1 b/Public/Management/Remove/Remove-NinjaOneDeviceOwner.ps1 new file mode 100644 index 0000000..51c811a --- /dev/null +++ b/Public/Management/Remove/Remove-NinjaOneDeviceOwner.ps1 @@ -0,0 +1,48 @@ +function Remove-NinjaOneDeviceOwner { + <# + .SYNOPSIS + Removes the owner of a device. + .DESCRIPTION + Removes the owner of the specified device via the NinjaOne v2 API. + .FUNCTIONALITY + Devices + .EXAMPLE + PS> Remove-NinjaOneDeviceOwner -id 1234 -Confirm:$false + + Removes the owner of device 1234. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/deviceowner + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnodo')] + [MetadataAttribute( + '/v2/device/{id}/owner', + 'delete' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # Device identifier + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/device/{0}/owner' -f $id) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + if ($PSCmdlet.ShouldProcess(('Device {0}' -f $id), 'Remove owner')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Device {0} owner removed.' -f $id) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Management/Set/Set-NinjaOneDeviceOwner.ps1 b/Public/Management/Set/Set-NinjaOneDeviceOwner.ps1 new file mode 100644 index 0000000..b997454 --- /dev/null +++ b/Public/Management/Set/Set-NinjaOneDeviceOwner.ps1 @@ -0,0 +1,52 @@ +function Set-NinjaOneDeviceOwner { + <# + .SYNOPSIS + Sets the owner of a device. + .DESCRIPTION + Sets the owner of the specified device via the NinjaOne v2 API. + .FUNCTIONALITY + Devices + .EXAMPLE + PS> Set-NinjaOneDeviceOwner -id 1234 -ownerUid 'user-uuid-1' + + Sets the owner of device 1234 to the specified user. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/deviceowner + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snodo')] + [MetadataAttribute( + '/v2/device/{id}/owner/{ownerUid}', + 'post' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # Device identifier + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$id, + # Owner UID + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [String]$ownerUid + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + if ($ownerUid) { $Parameters.Remove('ownerUid') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/device/{0}/owner/{1}' -f $id, $ownerUid) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + if ($PSCmdlet.ShouldProcess(('Device {0}' -f $id), ('Set owner {0}' -f $ownerUid))) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Organisation/Get/Get-NinjaOneOrganisationEndUsers.ps1 b/Public/Organisation/Get/Get-NinjaOneOrganisationEndUsers.ps1 new file mode 100644 index 0000000..7bf0a30 --- /dev/null +++ b/Public/Organisation/Get/Get-NinjaOneOrganisationEndUsers.ps1 @@ -0,0 +1,48 @@ +function Get-NinjaOneOrganisationEndUsers { + <# + .SYNOPSIS + Gets end users for an organisation. + .DESCRIPTION + Returns list of end users for a specific organisation via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation + .EXAMPLE + PS> Get-NinjaOneOrganisationEndUsers -organisationId 1 -includeRoles + + Gets end users for organisation 1 including roles. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/organisation-endusers + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnooeu','Get-NinjaOneOrganizationEndUsers')] + [MetadataAttribute( + '/v2/organization/{id}/end-users', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('organizationId')] + [Int]$organisationId, + # Includes user role information + [Parameter(Position = 1)] + [Switch]$includeRoles + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($organisationId) { $Parameters.Remove('organisationId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/organization/{0}/end-users' -f $organisationId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw ('No end users found for organisation {0}.' -f $organisationId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationArchive.ps1 b/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationArchive.ps1 new file mode 100644 index 0000000..b5112e5 --- /dev/null +++ b/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationArchive.ps1 @@ -0,0 +1,42 @@ +function Invoke-NinjaOneOrganisationArchive { + <# + .SYNOPSIS + Archives organisations. + .DESCRIPTION + Archives one or more organisations via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation + .EXAMPLE + PS> Invoke-NinjaOneOrganisationArchive -archiveRequest @{ organizationIds = @(1,2,3) } + + Archives organisations 1, 2 and 3. + .OUTPUTS + Status code or archive result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/organisation-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('inOOA')] + [MetadataAttribute( + '/v2/organization/archive', + 'post' + )] + Param( + # Archive request payload per API schema + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$archiveRequest + ) + process { + try { + $Resource = 'v2/organization/archive' + $RequestParams = @{ Resource = $Resource; Body = $archiveRequest } + if ($PSCmdlet.ShouldProcess('Organisations', 'Archive')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationRestore.ps1 b/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationRestore.ps1 new file mode 100644 index 0000000..aea4a9f --- /dev/null +++ b/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationRestore.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneOrganisationRestore { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOoR')] + [MetadataAttribute( + '/v2/organization/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisations','Restore')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/restore' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklist.ps1 b/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklist.ps1 new file mode 100644 index 0000000..080ac77 --- /dev/null +++ b/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklist.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneOrganisationChecklist { + <# + .SYNOPSIS + Gets an organisation checklist by Id. + .DESCRIPTION + Retrieves an organisation checklist via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Get-NinjaOneOrganisationChecklist -checklistId 22 + + Gets organisation checklist with Id 22. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/organisationchecklist + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoocl1', 'Get-NinjaOneOrganizationChecklist')] + [MetadataAttribute( + '/v2/organization/checklist/{checklistId}', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$checklistId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($checklistId) { $Parameters.Remove('checklistId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/organization/checklist/{0}' -f $checklistId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Checklist {0} not found.' -f $checklistId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklistSignedURLs.ps1 b/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklistSignedURLs.ps1 new file mode 100644 index 0000000..d128974 --- /dev/null +++ b/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklistSignedURLs.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneOrganisationChecklistSignedURLs { + <# + .SYNOPSIS + Gets signed URLs for an organisation checklist. + .DESCRIPTION + Retrieves signed URLs for an organisation checklist via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Get-NinjaOneOrganisationChecklistSignedURLs -checklistId 22 + + Gets signed URLs for organisation checklist Id 22. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/organisationchecklist-signedurls + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnooclsu', 'Get-NinjaOneOrganizationChecklistSignedURLs')] + [MetadataAttribute( + '/v2/organization/checklist/{checklistId}/signed-urls', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$checklistId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($checklistId) { $Parameters.Remove('checklistId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/organization/checklist/{0}/signed-urls' -f $checklistId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('No signed URLs found for checklist {0}.' -f $checklistId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklists.ps1 b/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklists.ps1 new file mode 100644 index 0000000..90a8e18 --- /dev/null +++ b/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklists.ps1 @@ -0,0 +1,34 @@ +function Get-NinjaOneOrganisationChecklists { + <# + .SYNOPSIS + Gets organisation checklists. + .DESCRIPTION + Retrieves organisation checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Get-NinjaOneOrganisationChecklists + + Gets organisation checklists. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/organisationchecklists + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoocl', 'Get-NinjaOneOrganizationChecklists')] + [MetadataAttribute( + '/v2/organization/checklists', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/organization/checklists' + $RequestParams = @{ Resource = $Resource } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw 'No organisation checklists found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromote.ps1 b/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromote.ps1 new file mode 100644 index 0000000..5f6ef65 --- /dev/null +++ b/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromote.ps1 @@ -0,0 +1,31 @@ +function Invoke-NinjaOneOrganisationChecklistsPromote { + <# + .SYNOPSIS + Promotes organisation checklists. + .DESCRIPTION + Promotes organisation checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Invoke-NinjaOneOrganisationChecklistsPromote -request @{ checklistIds=@(1,2) } + + Promotes the specified organisation checklists. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/organisationchecklists-promote + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOoClProm')] + [MetadataAttribute( + '/v2/organization/checklists/promote', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Checklists','Promote')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/checklists/promote' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromoteWithName.ps1 b/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromoteWithName.ps1 new file mode 100644 index 0000000..c856183 --- /dev/null +++ b/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromoteWithName.ps1 @@ -0,0 +1,31 @@ +function Invoke-NinjaOneOrganisationChecklistsPromoteWithName { + <# + .SYNOPSIS + Promotes organisation checklists with a new name. + .DESCRIPTION + Promotes organisation checklists assigning a new name via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Invoke-NinjaOneOrganisationChecklistsPromoteWithName -request @{ checklistIds=@(1); name='New Name' } + + Promotes checklists with a new name. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/organisationchecklists-promote-with-name + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOoClPromName')] + [MetadataAttribute( + '/v2/organization/checklists/promote-with-name', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Checklists','Promote With Name')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/checklists/promote-with-name' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklist.ps1 b/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklist.ps1 new file mode 100644 index 0000000..e397c43 --- /dev/null +++ b/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklist.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneOrganisationChecklist { + <# + .SYNOPSIS + Creates an organisation checklist. + .DESCRIPTION + Creates a new organisation checklist via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> New-NinjaOneOrganisationChecklist -checklist @{ name = 'Onboarding'; items = @('Step1','Step2') } + + Creates an organisation checklist. + .OUTPUTS + A PowerShell object containing the created checklist. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/organisationchecklist + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoocl')] + [MetadataAttribute( + '/v2/organization/checklists', + 'post' + )] + Param( + # Checklist payload per API schema + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$checklist + ) + process { + try { + $Resource = 'v2/organization/checklists' + $RequestParams = @{ Resource = $Resource; Body = $checklist } + if ($PSCmdlet.ShouldProcess('Organisation checklist', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklistsFromTemplates.ps1 b/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklistsFromTemplates.ps1 new file mode 100644 index 0000000..329b338 --- /dev/null +++ b/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklistsFromTemplates.ps1 @@ -0,0 +1,45 @@ +function New-NinjaOneOrganisationChecklistsFromTemplates { + <# + .SYNOPSIS + Creates organisation checklists from templates. + .DESCRIPTION + Creates organisation checklists from templates via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> New-NinjaOneOrganisationChecklistsFromTemplates -organisationId 1 -request @{ templateIds = @(10,11) } + + Creates checklists for organisation 1 from templates 10 and 11. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/organisationchecklists-from-templates + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoocltf')] + [MetadataAttribute( + '/v2/organization/{organizationId}/checklists-from-templates', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$organisationId, + # Request payload per API schema + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { + try { + $Resource = ('v2/organization/{0}/checklists-from-templates' -f $organisationId) + $RequestParams = @{ Resource = $Resource; Body = $request } + if ($PSCmdlet.ShouldProcess(('Organisation {0}' -f $organisationId), 'Create Checklists From Templates')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklist.ps1 b/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklist.ps1 new file mode 100644 index 0000000..a8e6c4c --- /dev/null +++ b/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklist.ps1 @@ -0,0 +1,41 @@ +function Remove-NinjaOneOrganisationChecklist { + <# + .SYNOPSIS + Removes an organisation checklist. + .DESCRIPTION + Deletes an organisation checklist via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Remove-NinjaOneOrganisationChecklist -checklistId 22 -Confirm:$false + + Deletes checklist 22. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/organisationchecklist + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoocl')] + [MetadataAttribute( + '/v2/organization/checklist/{checklistId}', + 'delete' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$checklistId + ) + process { + try { + $Resource = ('v2/organization/checklist/{0}' -f $checklistId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Checklist {0}' -f $checklistId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Checklist {0} deleted successfully.' -f $checklistId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklists.ps1 b/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklists.ps1 new file mode 100644 index 0000000..7d7c49a --- /dev/null +++ b/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklists.ps1 @@ -0,0 +1,31 @@ +function Remove-NinjaOneOrganisationChecklists { + <# + .SYNOPSIS + Deletes organisation checklists. + .DESCRIPTION + Deletes organisation checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Remove-NinjaOneOrganisationChecklists -request @{ checklistIds = @(1,2) } -Confirm:$false + + Deletes the specified organisation checklists. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/organisationchecklists + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('rnOoCls')] + [MetadataAttribute( + '/v2/organization/checklists/delete', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Checklists','Delete')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/checklists/delete' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/OrganisationChecklists/Set/Set-NinjaOneOrganisationChecklists.ps1 b/Public/OrganisationChecklists/Set/Set-NinjaOneOrganisationChecklists.ps1 new file mode 100644 index 0000000..b98fe8e --- /dev/null +++ b/Public/OrganisationChecklists/Set/Set-NinjaOneOrganisationChecklists.ps1 @@ -0,0 +1,31 @@ +function Set-NinjaOneOrganisationChecklists { + <# + .SYNOPSIS + Updates organisation checklists. + .DESCRIPTION + Updates organisation checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Set-NinjaOneOrganisationChecklists -checklists @{ ... } + + Updates organisation checklists. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/organisationchecklists + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snoocl')] + [MetadataAttribute( + '/v2/organization/checklists', + 'put' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$checklists + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Checklists','Update')){ return (New-NinjaOnePUTRequest -Resource 'v2/organization/checklists' -Body $checklists) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentArchive.ps1 b/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentArchive.ps1 new file mode 100644 index 0000000..d802067 --- /dev/null +++ b/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentArchive.ps1 @@ -0,0 +1,15 @@ +function Invoke-NinjaOneOrganisationDocumentArchive { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOodA')] + [MetadataAttribute( + '/v2/organization/document/{clientDocumentId}/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$clientDocumentId + ) + process { try { $res='v2/organization/document/{0}/archive' -f $clientDocumentId; if($PSCmdlet.ShouldProcess(('Organisation Document {0}' -f $clientDocumentId),'Archive')){ return (New-NinjaOnePOSTRequest -Resource $res) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentRestore.ps1 b/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentRestore.ps1 new file mode 100644 index 0000000..76f2cc1 --- /dev/null +++ b/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentRestore.ps1 @@ -0,0 +1,15 @@ +function Invoke-NinjaOneOrganisationDocumentRestore { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOodR')] + [MetadataAttribute( + '/v2/organization/document/{clientDocumentId}/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$clientDocumentId + ) + process { try { $res='v2/organization/document/{0}/restore' -f $clientDocumentId; if($PSCmdlet.ShouldProcess(('Organisation Document {0}' -f $clientDocumentId),'Restore')){ return (New-NinjaOnePOSTRequest -Resource $res) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsArchive.ps1 b/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsArchive.ps1 new file mode 100644 index 0000000..5830514 --- /dev/null +++ b/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsArchive.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneOrganisationDocumentsArchive { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOodsA')] + [MetadataAttribute( + '/v2/organization/documents/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Documents','Archive')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/documents/archive' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsRestore.ps1 b/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsRestore.ps1 new file mode 100644 index 0000000..5a3a56b --- /dev/null +++ b/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsRestore.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneOrganisationDocumentsRestore { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOodsR')] + [MetadataAttribute( + '/v2/organization/documents/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Documents','Restore')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/documents/restore' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Public/System/Get/Get-NinjaOneContact.ps1 b/Public/System/Get/Get-NinjaOneContact.ps1 new file mode 100644 index 0000000..47b14b0 --- /dev/null +++ b/Public/System/Get/Get-NinjaOneContact.ps1 @@ -0,0 +1,55 @@ +function Get-NinjaOneContact { + <# + .SYNOPSIS + Gets a system contact by Id. + .DESCRIPTION + Retrieves a system contact by Id from the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .EXAMPLE + PS> Get-NinjaOneContact -Id 123 + + Gets the system contact with Id 123. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/contact + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnocontact')] + [MetadataAttribute( + '/v2/contact/{id}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The contact Id to retrieve. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('contactId')] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/contact/{0}' -f $id) + $RequestParams = @{ + Resource = $Resource + QSCollection = $QSCollection + } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { + return $Result + } else { + throw ('Contact with id {0} not found.' -f $id) + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} diff --git a/Public/System/Get/Get-NinjaOneSystemContacts.ps1 b/Public/System/Get/Get-NinjaOneSystemContacts.ps1 new file mode 100644 index 0000000..b379665 --- /dev/null +++ b/Public/System/Get/Get-NinjaOneSystemContacts.ps1 @@ -0,0 +1,50 @@ +function Get-NinjaOneSystemContacts { + <# + .SYNOPSIS + Gets system contacts from the NinjaOne API. + .DESCRIPTION + Retrieves system contacts from the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .EXAMPLE + PS> Get-NinjaOneSystemContacts + + Gets all system contacts. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/contacts + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnosc')] + [MetadataAttribute( + '/v2/contacts', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param() + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = 'v2/contacts' + $RequestParams = @{ + Resource = $Resource + QSCollection = $QSCollection + } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { + return $Results + } else { + throw 'No system contacts found.' + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} + diff --git a/Public/System/New/New-NinjaOneContact.ps1 b/Public/System/New/New-NinjaOneContact.ps1 new file mode 100644 index 0000000..ce3b40f --- /dev/null +++ b/Public/System/New/New-NinjaOneContact.ps1 @@ -0,0 +1,46 @@ +function New-NinjaOneContact { + <# + .SYNOPSIS + Creates a new system contact. + .DESCRIPTION + Creates a new system contact via the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .OUTPUTS + A PowerShell object containing the created contact. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/contact + .EXAMPLE + PS> New-NinjaOneContact -contact @{ firstName = 'Jane'; lastName = 'Doe'; email = 'jane@example.com' } + + Creates a new system contact. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoc')] + [MetadataAttribute( + '/v2/contacts', + 'post' + )] + Param( + # Contact object payload per API schema. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$contact + ) + process { + try { + $Resource = 'v2/contacts' + $RequestParams = @{ + Resource = $Resource + Body = $contact + } + if ($PSCmdlet.ShouldProcess('Contact', 'Create')) { + $Create = New-NinjaOnePOSTRequest @RequestParams + return $Create + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} diff --git a/Public/System/Remove/Remove-NinjaOneContact.ps1 b/Public/System/Remove/Remove-NinjaOneContact.ps1 new file mode 100644 index 0000000..9118a64 --- /dev/null +++ b/Public/System/Remove/Remove-NinjaOneContact.ps1 @@ -0,0 +1,47 @@ +function Remove-NinjaOneContact { + <# + .SYNOPSIS + Removes a system contact. + .DESCRIPTION + Deletes a system contact via the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/contact + .EXAMPLE + PS> Remove-NinjaOneContact -Id 123 -Confirm:$false + + Deletes the system contact with Id 123. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoc')] + [MetadataAttribute( + '/v2/contact/{id}', + 'delete' + )] + Param( + # Contact Id to delete. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('contactId')] + [Int]$id + ) + process { + try { + $Resource = ('v2/contact/{0}' -f $id) + $RequestParams = @{ + Resource = $Resource + } + if ($PSCmdlet.ShouldProcess(('Contact {0}' -f $id), 'Delete')) { + $Delete = New-NinjaOneDELETERequest @RequestParams + if ($Delete -eq 204) { + Write-Information ('Contact {0} deleted successfully.' -f $id) + } + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} diff --git a/Public/System/Set/Set-NinjaOneContact.ps1 b/Public/System/Set/Set-NinjaOneContact.ps1 new file mode 100644 index 0000000..b72c779 --- /dev/null +++ b/Public/System/Set/Set-NinjaOneContact.ps1 @@ -0,0 +1,49 @@ +function Set-NinjaOneContact { + <# + .SYNOPSIS + Updates a system contact. + .DESCRIPTION + Updates a system contact via the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/contact + .EXAMPLE + PS> Set-NinjaOneContact -Id 123 -contact @{ phone = '+3100000000' } + + Updates the system contact with Id 123. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoc')] + [MetadataAttribute( + '/v2/contact/{id}', + 'patch' + )] + Param( + # Contact Id to update. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$id, + # Contact patch payload per API schema. + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$contact + ) + process { + try { + $Resource = ('v2/contact/{0}' -f $id) + $RequestParams = @{ + Resource = $Resource + Body = $contact + } + if ($PSCmdlet.ShouldProcess(('Contact {0}' -f $id), 'Update')) { + $Update = New-NinjaOnePATCHRequest @RequestParams + return $Update + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} diff --git a/Public/Tabs/Get/Get-NinjaOneTab.ps1 b/Public/Tabs/Get/Get-NinjaOneTab.ps1 new file mode 100644 index 0000000..e044500 --- /dev/null +++ b/Public/Tabs/Get/Get-NinjaOneTab.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneTab { + <# + .SYNOPSIS + Gets a tab by Id. + .DESCRIPTION + Retrieves a tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTab -tabId 5 + + Gets tab with Id 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotab')] + [MetadataAttribute( + '/v2/tab/{tabId}', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$tabId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}' -f $tabId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Tab {0} not found.' -f $tabId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Tabs/Get/Get-NinjaOneTabEndUser.ps1 b/Public/Tabs/Get/Get-NinjaOneTabEndUser.ps1 new file mode 100644 index 0000000..955ed6f --- /dev/null +++ b/Public/Tabs/Get/Get-NinjaOneTabEndUser.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneTabEndUser { + <# + .SYNOPSIS + Gets the end-user for a tab. + .DESCRIPTION + Retrieves the end-user associated with a tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabEndUser -tabId 5 + + Gets the end-user for tab Id 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-enduser + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabeu')] + [MetadataAttribute( + '/v2/tab/{tabId}/end-user', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$tabId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}/end-user' -f $tabId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('End-user for tab {0} not found.' -f $tabId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Tabs/Get/Get-NinjaOneTabOrganisation.ps1 b/Public/Tabs/Get/Get-NinjaOneTabOrganisation.ps1 new file mode 100644 index 0000000..c687509 --- /dev/null +++ b/Public/Tabs/Get/Get-NinjaOneTabOrganisation.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneTabOrganisation { + <# + .SYNOPSIS + Gets the organisation for a tab. + .DESCRIPTION + Retrieves the organisation associated with a tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabOrganisation -tabId 5 + + Gets the organisation for tab Id 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-organisation + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabo', 'Get-NinjaOneTabOrganization')] + [MetadataAttribute( + '/v2/tab/{tabId}/organization', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$tabId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}/organization' -f $tabId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Organisation for tab {0} not found.' -f $tabId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Tabs/Get/Get-NinjaOneTabRole.ps1 b/Public/Tabs/Get/Get-NinjaOneTabRole.ps1 new file mode 100644 index 0000000..d980280 --- /dev/null +++ b/Public/Tabs/Get/Get-NinjaOneTabRole.ps1 @@ -0,0 +1,48 @@ +function Get-NinjaOneTabRole { + <# + .SYNOPSIS + Gets a tab and extensions for a specific role. + .DESCRIPTION + Retrieves the requested tab along with any extensions based on the supplied role Id via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabRole -tabId 5 -roleId 10 + + Gets tab 5 with extensions as viewed by role 10. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-role + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabr')] + [MetadataAttribute( + '/v2/tab/{tabId}/role/{roleId}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$tabId, + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Int]$roleId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + if ($roleId) { $Parameters.Remove('roleId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}/role/{1}' -f $tabId, $roleId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Tab {0} for role {1} not found.' -f $tabId, $roleId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tabs/Get/Get-NinjaOneTabSummaryEndUser.ps1 b/Public/Tabs/Get/Get-NinjaOneTabSummaryEndUser.ps1 new file mode 100644 index 0000000..c229e9b --- /dev/null +++ b/Public/Tabs/Get/Get-NinjaOneTabSummaryEndUser.ps1 @@ -0,0 +1,35 @@ +function Get-NinjaOneTabSummaryEndUser { + <# + .SYNOPSIS + Gets the summary of custom tabs available to end-user views. + .DESCRIPTION + Retrieves a summary of the custom tabs available to end-user views via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabSummaryEndUser + + Gets the end-user custom tabs summary. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-summary-enduser + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabse')] + [MetadataAttribute( + '/v2/tab/summary/end-user', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/tab/summary/end-user' + $RequestParams = @{ Resource = $Resource } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw 'No end-user tab summary found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tabs/Get/Get-NinjaOneTabSummaryOrganisation.ps1 b/Public/Tabs/Get/Get-NinjaOneTabSummaryOrganisation.ps1 new file mode 100644 index 0000000..d414043 --- /dev/null +++ b/Public/Tabs/Get/Get-NinjaOneTabSummaryOrganisation.ps1 @@ -0,0 +1,35 @@ +function Get-NinjaOneTabSummaryOrganisation { + <# + .SYNOPSIS + Gets the summary of custom tabs available to organisation views. + .DESCRIPTION + Retrieves a summary of the custom tabs available to organisation views via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabSummaryOrganisation + + Gets the organisation custom tabs summary. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-summary-organisation + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabso','Get-NinjaOneTabSummaryOrganization')] + [MetadataAttribute( + '/v2/tab/summary/organization', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/tab/summary/organization' + $RequestParams = @{ Resource = $Resource } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw 'No organisation tab summary found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tabs/Get/Get-NinjaOneTabSummaryRole.ps1 b/Public/Tabs/Get/Get-NinjaOneTabSummaryRole.ps1 new file mode 100644 index 0000000..a14fcd2 --- /dev/null +++ b/Public/Tabs/Get/Get-NinjaOneTabSummaryRole.ps1 @@ -0,0 +1,46 @@ +function Get-NinjaOneTabSummaryRole { + <# + .SYNOPSIS + Gets the summary of custom tabs for a specified role. + .DESCRIPTION + Retrieves a summary of the custom tabs and extensions as viewed by the specified role via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabSummaryRole -roleId 10 + + Gets the custom tabs summary for role Id 10. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-summary-role + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabsr')] + [MetadataAttribute( + '/v2/tab/summary/role/{roleId}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # Role Id to retrieve tab summary for. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$roleId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($roleId) { $Parameters.Remove('roleId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/summary/role/{0}' -f $roleId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('No tab summary found for role {0}.' -f $roleId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tabs/New/New-NinjaOneTab.ps1 b/Public/Tabs/New/New-NinjaOneTab.ps1 new file mode 100644 index 0000000..e0b09d7 --- /dev/null +++ b/Public/Tabs/New/New-NinjaOneTab.ps1 @@ -0,0 +1,36 @@ +function New-NinjaOneTab { + <# + .SYNOPSIS + Creates a new custom tab. + .DESCRIPTION + Creates a new custom tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> New-NinjaOneTab -tab @{ name='My Tab'; scope='ORGANIZATION' } + + Creates a new tab. + .OUTPUTS + A PowerShell object containing the created tab. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/tab + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('nnotab')] + [MetadataAttribute( + '/v2/tab', + 'post' + )] + Param( + # Payload to create tab per API schema + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tab + ) + process { + try { + if($PSCmdlet.ShouldProcess('Tab','Create')){ return (New-NinjaOnePOSTRequest -Resource 'v2/tab' -Body $tab) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Tabs/Remove/Remove-NinjaOneTab.ps1 b/Public/Tabs/Remove/Remove-NinjaOneTab.ps1 new file mode 100644 index 0000000..0fb4038 --- /dev/null +++ b/Public/Tabs/Remove/Remove-NinjaOneTab.ps1 @@ -0,0 +1,46 @@ +function Remove-NinjaOneTab { + <# + .SYNOPSIS + Removes a custom tab. + .DESCRIPTION + Deletes a custom tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Remove-NinjaOneTab -tabId 5 -Confirm:$false + + Deletes tab 5. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/tab + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnotab')] + [MetadataAttribute( + '/v2/tab/{tabId}', + 'delete' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$tabId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}' -f $tabId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + if ($PSCmdlet.ShouldProcess(('Tab {0}' -f $tabId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Tab {0} deleted successfully.' -f $tabId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tabs/Set/Rename-NinjaOneTab.ps1 b/Public/Tabs/Set/Rename-NinjaOneTab.ps1 new file mode 100644 index 0000000..91c188a --- /dev/null +++ b/Public/Tabs/Set/Rename-NinjaOneTab.ps1 @@ -0,0 +1,36 @@ +function Rename-NinjaOneTab { + <# + .SYNOPSIS + Renames a custom tab. + .DESCRIPTION + Renames a custom tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Rename-NinjaOneTab -rename @{ tabId = 5; name = 'New Name' } + + Renames tab 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-rename + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('rnotab')] + [MetadataAttribute( + '/v2/tab/rename', + 'patch' + )] + Param( + # Payload e.g. @{ tabId = 5; name = 'New Name' } + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$rename + ) + process { + try { + if($PSCmdlet.ShouldProcess('Tab','Rename')){ return (New-NinjaOnePATCHRequest -Resource 'v2/tab/rename' -Body $rename) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Tabs/Set/Set-NinjaOneTab.ps1 b/Public/Tabs/Set/Set-NinjaOneTab.ps1 new file mode 100644 index 0000000..bb1c143 --- /dev/null +++ b/Public/Tabs/Set/Set-NinjaOneTab.ps1 @@ -0,0 +1,38 @@ +function Set-NinjaOneTab { + <# + .SYNOPSIS + Updates a custom tab. + .DESCRIPTION + Updates a custom tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTab -tabId 5 -tab @{ name = 'New Name' } + + Updates tab 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snotab')] + [MetadataAttribute( + '/v2/tab/{tabId}', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$tabId, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tab + ) + process { + try { + $res='v2/tab/{0}' -f $tabId + if($PSCmdlet.ShouldProcess(('Tab {0}' -f $tabId),'Update')){ return (New-NinjaOnePATCHRequest -Resource $res -Body $tab) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Tabs/Set/Set-NinjaOneTabEndUserOrder.ps1 b/Public/Tabs/Set/Set-NinjaOneTabEndUserOrder.ps1 new file mode 100644 index 0000000..98f063c --- /dev/null +++ b/Public/Tabs/Set/Set-NinjaOneTabEndUserOrder.ps1 @@ -0,0 +1,45 @@ +function Set-NinjaOneTabEndUserOrder { + <# + .SYNOPSIS + Updates the order of custom tabs for end-user tabs. + .DESCRIPTION + Updates the order of custom tabs for end-user tabs via the NinjaOne v2 API. NOTE: All tabs defined for end-users must be specified in the payload. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTabEndUserOrder -order @( + @{ tabId = 1; order = 1 }, + @{ tabId = 2; order = 2 } + ) + + Sets the order of the end-user tabs. + .OUTPUTS + Status code or updated order data per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-enduser-order + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotabeuo')] + [MetadataAttribute( + '/v2/tab/end-user/order', + 'patch' + )] + Param( + # Array payload specifying the tab order per API schema (CustomTabsOrderPublicApiDTO[]) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$order + ) + process { + try { + $Resource = 'v2/tab/end-user/order' + $RequestParams = @{ Resource = $Resource; Body = $order } + if ($PSCmdlet.ShouldProcess('End-user Tabs', 'Update Order')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tabs/Set/Set-NinjaOneTabOrganisationOrder.ps1 b/Public/Tabs/Set/Set-NinjaOneTabOrganisationOrder.ps1 new file mode 100644 index 0000000..bbd237b --- /dev/null +++ b/Public/Tabs/Set/Set-NinjaOneTabOrganisationOrder.ps1 @@ -0,0 +1,45 @@ +function Set-NinjaOneTabOrganisationOrder { + <# + .SYNOPSIS + Updates the order of custom tabs for organizations and locations. + .DESCRIPTION + Updates the order of custom tabs for organization/location tabs via the NinjaOne v2 API. NOTE: All org tabs must be specified. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTabOrganisationOrder -order @( + @{ tabId = 1; order = 1 }, + @{ tabId = 2; order = 2 } + ) + + Sets the organization tabs order. + .OUTPUTS + Updated order data per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-organization-order + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotaboo')] + [MetadataAttribute( + '/v2/tab/organization/order', + 'patch' + )] + Param( + # Array payload specifying the tab ordering (CustomTabsOrderPublicApiDTO[]) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$order + ) + process { + try { + $Resource = 'v2/tab/organization/order' + $RequestParams = @{ Resource = $Resource; Body = $order } + if ($PSCmdlet.ShouldProcess('Organization Tabs', 'Update Order')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tabs/Set/Set-NinjaOneTabRoleOrder.ps1 b/Public/Tabs/Set/Set-NinjaOneTabRoleOrder.ps1 new file mode 100644 index 0000000..b891127 --- /dev/null +++ b/Public/Tabs/Set/Set-NinjaOneTabRoleOrder.ps1 @@ -0,0 +1,47 @@ +function Set-NinjaOneTabRoleOrder { + <# + .SYNOPSIS + Updates the order of custom tabs for a specific role. + .DESCRIPTION + Updates the order of custom tabs for a role via the NinjaOne v2 API. NOTE: Only tabs created on this role can be ordered. All tabs on the role must be specified. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTabRoleOrder -roleId 10 -order @( + @{ tabId = 1; order = 1 }, + @{ tabId = 2; order = 2 } + ) + + Sets the role tabs order for role 10. + .OUTPUTS + Updated order data per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-role-order + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotabro')] + [MetadataAttribute( + '/v2/tab/role/{roleId}/order', + 'patch' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$roleId, + # Array payload specifying the tab ordering (CustomTabsOrderPublicApiDTO[]) + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$order + ) + process { + try { + $Resource = ('v2/tab/role/{0}/order' -f $roleId) + $RequestParams = @{ Resource = $Resource; Body = $order } + if ($PSCmdlet.ShouldProcess(('Role {0}' -f $roleId), 'Update Tab Order')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tabs/Set/Set-NinjaOneTabRoleVisibility.ps1 b/Public/Tabs/Set/Set-NinjaOneTabRoleVisibility.ps1 new file mode 100644 index 0000000..ab97791 --- /dev/null +++ b/Public/Tabs/Set/Set-NinjaOneTabRoleVisibility.ps1 @@ -0,0 +1,47 @@ +function Set-NinjaOneTabRoleVisibility { + <# + .SYNOPSIS + Sets tab visibility for a role. + .DESCRIPTION + Configures tab visibility for a specific role via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTabRoleVisibility -roleId 10 -visibility @( + @{ tabId = 1; visible = $true }, + @{ tabId = 2; visible = $false } + ) + + Sets visibility for tabs on role 10. + .OUTPUTS + Updated visibility data per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-role-visibility + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotabrv')] + [MetadataAttribute( + '/v2/tab/role/{roleId}/visibility', + 'patch' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$roleId, + # Array payload (CustomTabsVisibilityPublicApiDTO[]) + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$visibility + ) + process { + try { + $Resource = ('v2/tab/role/{0}/visibility' -f $roleId) + $RequestParams = @{ Resource = $Resource; Body = $visibility } + if ($PSCmdlet.ShouldProcess(('Role {0}' -f $roleId), 'Set Tab Visibility')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tags/Get/Get-NinjaOneTags.ps1 b/Public/Tags/Get/Get-NinjaOneTags.ps1 new file mode 100644 index 0000000..82ea4b0 --- /dev/null +++ b/Public/Tags/Get/Get-NinjaOneTags.ps1 @@ -0,0 +1,32 @@ +function Get-NinjaOneTags { + <# + .SYNOPSIS + Gets all tags. + .DESCRIPTION + Retrieves all tags via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Get-NinjaOneTags + + Gets all tags. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tags + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotags')] + [MetadataAttribute( + '/v2/tag', + 'get' + )] + Param() + process { + try { + $RequestParams = @{ Resource = 'v2/tag' } + return (New-NinjaOneGETRequest @RequestParams) + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Tags/New/New-NinjaOneTag.ps1 b/Public/Tags/New/New-NinjaOneTag.ps1 new file mode 100644 index 0000000..a40f272 --- /dev/null +++ b/Public/Tags/New/New-NinjaOneTag.ps1 @@ -0,0 +1,45 @@ +function New-NinjaOneTag { + <# + .SYNOPSIS + Creates a new asset tag. + .DESCRIPTION + Creates a new asset tag for the specified asset type via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> New-NinjaOneTag -assetType 'NODE' -tag @{ name = 'Critical'; color = '#FF0000' } + + Creates a new tag named 'Critical' for asset type NODE. + .OUTPUTS + A PowerShell object containing the created tag. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/tag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnotag')] + [MetadataAttribute( + '/v2/tag/{assetType}', + 'post' + )] + Param( + # The asset type the tag applies to (e.g. NODE, ORGANIZATION, LOCATION). + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [String]$assetType, + # The tag object payload per API schema. + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tag + ) + process { + try { + $Resource = ('v2/tag/{0}' -f $assetType) + $RequestParams = @{ Resource = $Resource; Body = $tag } + if ($PSCmdlet.ShouldProcess(('Tag for {0}' -f $assetType), 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tags/New/New-NinjaOneTagGlobal.ps1 b/Public/Tags/New/New-NinjaOneTagGlobal.ps1 new file mode 100644 index 0000000..bc69639 --- /dev/null +++ b/Public/Tags/New/New-NinjaOneTagGlobal.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneTagGlobal { + <# + .SYNOPSIS + Creates a new tag. + .DESCRIPTION + Creates a new tag via the NinjaOne v2 API (global endpoint without assetType in path). + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> New-NinjaOneTagGlobal -tag @{ name = 'Critical'; color = '#FF0000' } + + Creates a new tag. + .OUTPUTS + A PowerShell object containing the created tag. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/tag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnotagg')] + [MetadataAttribute( + '/v2/tag', + 'post' + )] + Param( + # Tag payload per API schema + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tag + ) + process { + try { + $Resource = 'v2/tag' + $RequestParams = @{ Resource = $Resource; Body = $tag } + if ($PSCmdlet.ShouldProcess('Tag', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tags/Remove/Remove-NinjaOneTag.ps1 b/Public/Tags/Remove/Remove-NinjaOneTag.ps1 new file mode 100644 index 0000000..ca96fc2 --- /dev/null +++ b/Public/Tags/Remove/Remove-NinjaOneTag.ps1 @@ -0,0 +1,39 @@ +function Remove-NinjaOneTag { + <# + .SYNOPSIS + Deletes a tag. + .DESCRIPTION + Deletes a tag via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Remove-NinjaOneTag -tagId 12 -Confirm:$false + + Deletes the tag with Id 12. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/tag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnotag')] + [MetadataAttribute( + '/v2/tag/{tagId}', + 'delete' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$tagId + ) + process { + try { + $Resource = ('v2/tag/{0}' -f $tagId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Tag {0}' -f $tagId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Tag {0} deleted successfully.' -f $tagId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Tags/Remove/Remove-NinjaOneTags.ps1 b/Public/Tags/Remove/Remove-NinjaOneTags.ps1 new file mode 100644 index 0000000..b698cd3 --- /dev/null +++ b/Public/Tags/Remove/Remove-NinjaOneTags.ps1 @@ -0,0 +1,42 @@ +function Remove-NinjaOneTags { + <# + .SYNOPSIS + Deletes asset tags. + .DESCRIPTION + Deletes one or more tags via the NinjaOne v2 API using a POST delete endpoint. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Remove-NinjaOneTags -deleteRequest @{ tagIds = @(1,2,3) } + + Deletes tags with Ids 1,2,3. + .OUTPUTS + Status code (usually 200/204) per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/tags + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnotags')] + [MetadataAttribute( + '/v2/tag/delete', + 'post' + )] + Param( + # Delete request payload as per API schema (e.g. tagIds array) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$deleteRequest + ) + process { + try { + $Resource = 'v2/tag/delete' + $RequestParams = @{ Resource = $Resource; Body = $deleteRequest } + if ($PSCmdlet.ShouldProcess('Tags', 'Delete')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tags/Set/Merge-NinjaOneTags.ps1 b/Public/Tags/Set/Merge-NinjaOneTags.ps1 new file mode 100644 index 0000000..8cecb46 --- /dev/null +++ b/Public/Tags/Set/Merge-NinjaOneTags.ps1 @@ -0,0 +1,42 @@ +function Merge-NinjaOneTags { + <# + .SYNOPSIS + Merges asset tags. + .DESCRIPTION + Merges tags via the NinjaOne v2 API using the tag merge endpoint. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Merge-NinjaOneTags -mergeRequest @{ sourceTagIds = @(5,6); targetTagId = 1 } + + Merges tags 5 and 6 into tag 1. + .OUTPUTS + Status code or merged tag per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tag-merge + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('mnotags')] + [MetadataAttribute( + '/v2/tag/merge', + 'post' + )] + Param( + # Merge request payload as per API schema (source/target tag ids) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$mergeRequest + ) + process { + try { + $Resource = 'v2/tag/merge' + $RequestParams = @{ Resource = $Resource; Body = $mergeRequest } + if ($PSCmdlet.ShouldProcess('Tags', 'Merge')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tags/Set/Set-NinjaOneAssetTag.ps1 b/Public/Tags/Set/Set-NinjaOneAssetTag.ps1 new file mode 100644 index 0000000..de93fb0 --- /dev/null +++ b/Public/Tags/Set/Set-NinjaOneAssetTag.ps1 @@ -0,0 +1,48 @@ +function Set-NinjaOneAssetTag { + <# + .SYNOPSIS + Updates tag assignments for an asset. + .DESCRIPTION + Updates tags for a specific asset type and asset Id via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Set-NinjaOneAssetTag -assetType 'NODE' -assetId 123 -tagAssignment @{ tagIds = @(1,2) } + + Assigns tags 1 and 2 to node 123. + .OUTPUTS + Status code or updated assignment per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/assettag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoatag')] + [MetadataAttribute( + '/v2/tag/{assetType}/{assetId}', + 'put' + )] + Param( + # Asset type (e.g. NODE, ORGANIZATION, LOCATION) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [String]$assetType, + # Asset Id + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Int]$assetId, + # Tag assignment payload + [Parameter(Mandatory, Position = 2, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tagAssignment + ) + process { + try { + $Resource = ('v2/tag/{0}/{1}' -f $assetType, $assetId) + $RequestParams = @{ Resource = $Resource; Body = $tagAssignment } + if ($PSCmdlet.ShouldProcess(('{0} {1}' -f $assetType, $assetId), 'Update Tags')) { + $Result = New-NinjaOnePUTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Tags/Set/Set-NinjaOneTag.ps1 b/Public/Tags/Set/Set-NinjaOneTag.ps1 new file mode 100644 index 0000000..a028a59 --- /dev/null +++ b/Public/Tags/Set/Set-NinjaOneTag.ps1 @@ -0,0 +1,46 @@ +function Set-NinjaOneTag { + <# + .SYNOPSIS + Updates an asset tag. + .DESCRIPTION + Updates an existing tag via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Set-NinjaOneTag -tagId 12 -tag @{ name = 'Priority-1' } + + Updates the tag with Id 12. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotag')] + [MetadataAttribute( + '/v2/tag/{tagId}', + 'put' + )] + Param( + # The tag Id to update. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$tagId, + # The tag update payload. + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tag + ) + process { + try { + $Resource = ('v2/tag/{0}' -f $tagId) + $RequestParams = @{ Resource = $Resource; Body = $tag } + if ($PSCmdlet.ShouldProcess(('Tag {0}' -f $tagId), 'Update')) { + $Result = New-NinjaOnePUTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Users/Get/Get-NinjaOneEndUser.ps1 b/Public/Users/Get/Get-NinjaOneEndUser.ps1 new file mode 100644 index 0000000..241b07f --- /dev/null +++ b/Public/Users/Get/Get-NinjaOneEndUser.ps1 @@ -0,0 +1,45 @@ +function Get-NinjaOneEndUser { + <# + .SYNOPSIS + Gets an end user by Id. + .DESCRIPTION + Retrieves a specific end user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneEndUser -Id 101 + + Gets the end user with Id 101. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/enduser + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoeu')] + [MetadataAttribute( + '/v2/user/end-user/{id}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/user/end-user/{0}' -f $id) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('End user {0} not found.' -f $id) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Users/Get/Get-NinjaOneEndUserCustomFields.ps1 b/Public/Users/Get/Get-NinjaOneEndUserCustomFields.ps1 new file mode 100644 index 0000000..0cf7a9b --- /dev/null +++ b/Public/Users/Get/Get-NinjaOneEndUserCustomFields.ps1 @@ -0,0 +1,45 @@ +function Get-NinjaOneEndUserCustomFields { + <# + .SYNOPSIS + Gets custom fields for an end user. + .DESCRIPTION + Retrieves the list of custom fields for an end user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneEndUserCustomFields -Id 101 + + Gets custom fields for end user 101. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/enduser-customfields + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoeucf')] + [MetadataAttribute( + '/v2/user/end-user/{id}/custom-fields', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/user/end-user/{0}/custom-fields' -f $id) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('No custom fields found for end user {0}.' -f $id) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Users/Get/Get-NinjaOneEndUsers.ps1 b/Public/Users/Get/Get-NinjaOneEndUsers.ps1 new file mode 100644 index 0000000..0378ae0 --- /dev/null +++ b/Public/Users/Get/Get-NinjaOneEndUsers.ps1 @@ -0,0 +1,35 @@ +function Get-NinjaOneEndUsers { + <# + .SYNOPSIS + Gets all end users. + .DESCRIPTION + Retrieves all end users via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneEndUsers + + Gets all end users. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/endusers + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoeus')] + [MetadataAttribute( + '/v2/user/end-users', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/user/end-users' + $RequestParams = @{ Resource = $Resource } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw 'No end users found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Users/Get/Get-NinjaOneTechnician.ps1 b/Public/Users/Get/Get-NinjaOneTechnician.ps1 new file mode 100644 index 0000000..6d9a81b --- /dev/null +++ b/Public/Users/Get/Get-NinjaOneTechnician.ps1 @@ -0,0 +1,45 @@ +function Get-NinjaOneTechnician { + <# + .SYNOPSIS + Gets a technician by Id. + .DESCRIPTION + Retrieves a specific technician via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneTechnician -Id 77 + + Gets the technician with Id 77. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/technician + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotec')] + [MetadataAttribute( + '/v2/user/technician/{id}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/user/technician/{0}' -f $id) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Technician {0} not found.' -f $id) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Users/Get/Get-NinjaOneTechnicians.ps1 b/Public/Users/Get/Get-NinjaOneTechnicians.ps1 new file mode 100644 index 0000000..8b03b7f --- /dev/null +++ b/Public/Users/Get/Get-NinjaOneTechnicians.ps1 @@ -0,0 +1,35 @@ +function Get-NinjaOneTechnicians { + <# + .SYNOPSIS + Gets all technicians. + .DESCRIPTION + Retrieves all technicians via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneTechnicians + + Gets all technicians. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/technicians + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotecs')] + [MetadataAttribute( + '/v2/user/technicians', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/user/technicians' + $RequestParams = @{ Resource = $Resource } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw 'No technicians found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Users/Get/Get-NinjaOneUserRoles.ps1 b/Public/Users/Get/Get-NinjaOneUserRoles.ps1 new file mode 100644 index 0000000..b2e6179 --- /dev/null +++ b/Public/Users/Get/Get-NinjaOneUserRoles.ps1 @@ -0,0 +1,31 @@ +function Get-NinjaOneUserRoles { + <# + .SYNOPSIS + Gets user roles. + .DESCRIPTION + Retrieves all user roles via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneUserRoles + + Gets all user roles. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/userroles + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnour')] + [MetadataAttribute( + '/v2/user/roles', + 'get' + )] + Param() + process { + try { + return (New-NinjaOneGETRequest -Resource 'v2/user/roles') + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Users/New/New-NinjaOneEndUser.ps1 b/Public/Users/New/New-NinjaOneEndUser.ps1 new file mode 100644 index 0000000..00cac13 --- /dev/null +++ b/Public/Users/New/New-NinjaOneEndUser.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneEndUser { + <# + .SYNOPSIS + Creates a new end user. + .DESCRIPTION + Creates a new end user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> New-NinjaOneEndUser -endUser @{ firstName = 'Jane'; lastName = 'Doe'; email = 'jane@example.com' } + + Creates a new end user. + .OUTPUTS + A PowerShell object containing the created end user. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/enduser + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoeu')] + [MetadataAttribute( + '/v2/user/end-users', + 'post' + )] + Param( + # End user payload per API schema. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$endUser + ) + process { + try { + $Resource = 'v2/user/end-users' + $RequestParams = @{ Resource = $Resource; Body = $endUser } + if ($PSCmdlet.ShouldProcess('EndUser', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Users/New/New-NinjaOneTechnician.ps1 b/Public/Users/New/New-NinjaOneTechnician.ps1 new file mode 100644 index 0000000..ffbe040 --- /dev/null +++ b/Public/Users/New/New-NinjaOneTechnician.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneTechnician { + <# + .SYNOPSIS + Creates a new technician. + .DESCRIPTION + Creates a new technician via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> New-NinjaOneTechnician -technician @{ firstName = 'John'; lastName = 'Smith'; email = 'john@example.com' } + + Creates a new technician. + .OUTPUTS + A PowerShell object containing the created technician. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/technician + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnotec')] + [MetadataAttribute( + '/v2/user/technicians', + 'post' + )] + Param( + # Technician payload per API schema. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$technician + ) + process { + try { + $Resource = 'v2/user/technicians' + $RequestParams = @{ Resource = $Resource; Body = $technician } + if ($PSCmdlet.ShouldProcess('Technician', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Users/Remove/Remove-NinjaOneEndUser.ps1 b/Public/Users/Remove/Remove-NinjaOneEndUser.ps1 new file mode 100644 index 0000000..239b93c --- /dev/null +++ b/Public/Users/Remove/Remove-NinjaOneEndUser.ps1 @@ -0,0 +1,40 @@ +function Remove-NinjaOneEndUser { + <# + .SYNOPSIS + Removes an end-user. + .DESCRIPTION + Deletes an end-user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/enduser + .EXAMPLE + PS> Remove-NinjaOneEndUser -Id 42 -Confirm:$false + + Deletes the end-user with Id 42. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoeu')] + [MetadataAttribute( + '/v2/user/end-user/{id}', + 'delete' + )] + Param( + # End-user Id to delete. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + process { + try { + $Resource = ('v2/user/end-user/{0}' -f $id) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('End-user {0}' -f $id), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('End-user {0} deleted successfully.' -f $id) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Users/Remove/Remove-NinjaOneTechnician.ps1 b/Public/Users/Remove/Remove-NinjaOneTechnician.ps1 new file mode 100644 index 0000000..13712ed --- /dev/null +++ b/Public/Users/Remove/Remove-NinjaOneTechnician.ps1 @@ -0,0 +1,40 @@ +function Remove-NinjaOneTechnician { + <# + .SYNOPSIS + Removes a technician user. + .DESCRIPTION + Deletes a technician user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/technician + .EXAMPLE + PS> Remove-NinjaOneTechnician -Id 7 -Confirm:$false + + Deletes the technician user with Id 7. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnot')] + [MetadataAttribute( + '/v2/user/technician/{id}', + 'delete' + )] + Param( + # Technician Id to delete. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + process { + try { + $Resource = ('v2/user/technician/{0}' -f $id) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Technician {0}' -f $id), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Technician {0} deleted successfully.' -f $id) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Users/Set/Add-NinjaOneUserRoleMembers.ps1 b/Public/Users/Set/Add-NinjaOneUserRoleMembers.ps1 new file mode 100644 index 0000000..5165ef1 --- /dev/null +++ b/Public/Users/Set/Add-NinjaOneUserRoleMembers.ps1 @@ -0,0 +1,38 @@ +function Add-NinjaOneUserRoleMembers { + <# + .SYNOPSIS + Adds members to a user role. + .DESCRIPTION + Adds one or more members to the specified user role via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Add-NinjaOneUserRoleMembers -roleId 10 -members @{ userIds = @(1,2) } + + Adds users 1 and 2 to role 10. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/userrole-addmembers + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('anourm')] + [MetadataAttribute( + '/v2/user/role/{roleId}/add-members', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$roleId, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$members + ) + process { + try { + $res='v2/user/role/{0}/add-members' -f $roleId + if($PSCmdlet.ShouldProcess(('Role {0}' -f $roleId),'Add Members')){ return (New-NinjaOnePATCHRequest -Resource $res -Body $members) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Users/Set/Remove-NinjaOneUserRoleMembers.ps1 b/Public/Users/Set/Remove-NinjaOneUserRoleMembers.ps1 new file mode 100644 index 0000000..472924b --- /dev/null +++ b/Public/Users/Set/Remove-NinjaOneUserRoleMembers.ps1 @@ -0,0 +1,38 @@ +function Remove-NinjaOneUserRoleMembers { + <# + .SYNOPSIS + Removes members from a user role. + .DESCRIPTION + Removes one of more members from the specified user role via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Remove-NinjaOneUserRoleMembers -roleId 10 -members @{ userIds = @(1,2) } -Confirm:$false + + Removes users 1 and 2 from role 10. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/userrole-removemembers + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('rnourm')] + [MetadataAttribute( + '/v2/user/role/{roleId}/remove-members', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$roleId, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$members + ) + process { + try { + $res='v2/user/role/{0}/remove-members' -f $roleId + if($PSCmdlet.ShouldProcess(('Role {0}' -f $roleId),'Remove Members')){ return (New-NinjaOnePATCHRequest -Resource $res -Body $members) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Users/Set/Set-NinjaOneEndUser.ps1 b/Public/Users/Set/Set-NinjaOneEndUser.ps1 new file mode 100644 index 0000000..3d3c664 --- /dev/null +++ b/Public/Users/Set/Set-NinjaOneEndUser.ps1 @@ -0,0 +1,43 @@ +function Set-NinjaOneEndUser { + <# + .SYNOPSIS + Updates an end user. + .DESCRIPTION + Updates an end user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Set-NinjaOneEndUser -Id 101 -endUser @{ phone = '+3100000000' } + + Updates the end user 101. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/enduser + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoeu')] + [MetadataAttribute( + '/v2/user/end-user/{id}', + 'patch' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$id, + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$endUser + ) + process { + try { + $Resource = ('v2/user/end-user/{0}' -f $id) + $RequestParams = @{ Resource = $Resource; Body = $endUser } + if ($PSCmdlet.ShouldProcess(('End user {0}' -f $id), 'Update')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Users/Set/Set-NinjaOneEndUserCustomFields.ps1 b/Public/Users/Set/Set-NinjaOneEndUserCustomFields.ps1 new file mode 100644 index 0000000..d4dd2f1 --- /dev/null +++ b/Public/Users/Set/Set-NinjaOneEndUserCustomFields.ps1 @@ -0,0 +1,38 @@ +function Set-NinjaOneEndUserCustomFields { + <# + .SYNOPSIS + Updates custom fields for an end user. + .DESCRIPTION + Updates end user custom fields via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Set-NinjaOneEndUserCustomFields -Id 101 -customFields @{ field1='value' } + + Updates custom fields for end user 101. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/enduser-customfields + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snoeucf')] + [MetadataAttribute( + '/v2/user/end-user/{id}/custom-fields', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$id, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$customFields + ) + process { + try { + $res='v2/user/end-user/{0}/custom-fields' -f $id + if($PSCmdlet.ShouldProcess(('End user {0}' -f $id),'Update Custom Fields')){ return (New-NinjaOnePATCHRequest -Resource $res -Body $customFields) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Public/Users/Set/Set-NinjaOneTechnician.ps1 b/Public/Users/Set/Set-NinjaOneTechnician.ps1 new file mode 100644 index 0000000..a7f6c9d --- /dev/null +++ b/Public/Users/Set/Set-NinjaOneTechnician.ps1 @@ -0,0 +1,43 @@ +function Set-NinjaOneTechnician { + <# + .SYNOPSIS + Updates a technician. + .DESCRIPTION + Updates a technician via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Set-NinjaOneTechnician -Id 77 -technician @{ phone = '+3100000000' } + + Updates the technician 77. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/technician + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotec')] + [MetadataAttribute( + '/v2/user/technician/{id}', + 'patch' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$id, + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$technician + ) + process { + try { + $Resource = ('v2/user/technician/{0}' -f $id) + $RequestParams = @{ Resource = $Resource; Body = $technician } + if ($PSCmdlet.ShouldProcess(('Technician {0}' -f $id), 'Update')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroup.ps1 b/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroup.ps1 new file mode 100644 index 0000000..cda7a55 --- /dev/null +++ b/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroup.ps1 @@ -0,0 +1,31 @@ +function Get-NinjaOneVulnerabilityScanGroup { + <# + .SYNOPSIS + Gets a vulnerability scan group by Id. + .DESCRIPTION + Retrieves a specific vulnerability scan group via the NinjaOne v2 API. + .FUNCTIONALITY + Vulnerability Management + .EXAMPLE + PS> Get-NinjaOneVulnerabilityScanGroup -scan_group_id 5 + + Gets scan group 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/vulnerability-scangroup + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnovsg1')] + [MetadataAttribute( + '/v2/vulnerability/scan-groups/{scan-group-id}', + 'get' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('scanGroupId')] + [Int]$scan_group_id + ) + process { try { $res='v2/vulnerability/scan-groups/{0}' -f $scan_group_id; return (New-NinjaOneGETRequest -Resource $res) } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroups.ps1 b/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroups.ps1 new file mode 100644 index 0000000..47b7b0a --- /dev/null +++ b/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroups.ps1 @@ -0,0 +1,27 @@ +function Get-NinjaOneVulnerabilityScanGroups { + <# + .SYNOPSIS + Gets vulnerability scan groups. + .DESCRIPTION + Retrieves all vulnerability scan groups via the NinjaOne v2 API. + .FUNCTIONALITY + Vulnerability Management + .EXAMPLE + PS> Get-NinjaOneVulnerabilityScanGroups + + Gets all scan groups. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/vulnerability-scangroups + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnovsg')] + [MetadataAttribute( + '/v2/vulnerability/scan-groups', + 'get' + )] + Param() + process { try { return (New-NinjaOneGETRequest -Resource 'v2/vulnerability/scan-groups') } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Public/Vulnerability/Invoke/Invoke-NinjaOneVulnerabilityScanGroupUpload.ps1 b/Public/Vulnerability/Invoke/Invoke-NinjaOneVulnerabilityScanGroupUpload.ps1 new file mode 100644 index 0000000..ef0269c --- /dev/null +++ b/Public/Vulnerability/Invoke/Invoke-NinjaOneVulnerabilityScanGroupUpload.ps1 @@ -0,0 +1,34 @@ +function Invoke-NinjaOneVulnerabilityScanGroupUpload { + <# + .SYNOPSIS + Uploads data for a vulnerability scan group. + .DESCRIPTION + Uploads data for a specified vulnerability scan group via the NinjaOne v2 API. + .FUNCTIONALITY + Vulnerability Management + .EXAMPLE + PS> Invoke-NinjaOneVulnerabilityScanGroupUpload -scan_group_id 5 -upload @{ ... } + + Uploads content to scan group 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/vulnerability-scangroup-upload + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inovsgu')] + [MetadataAttribute( + '/v2/vulnerability/scan-groups/{scan-group-id}/upload', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('scanGroupId')] + [Int]$scan_group_id, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$upload + ) + process { try { $res='v2/vulnerability/scan-groups/{0}/upload' -f $scan_group_id; if($PSCmdlet.ShouldProcess(('Scan Group {0}' -f $scan_group_id),'Upload')){ return (New-NinjaOnePOSTRequest -Resource $res -Body $upload) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/NinjaOne.psd1 b/Source/NinjaOne.psd1 index 130ae62..664f3cf 100644 --- a/Source/NinjaOne.psd1 +++ b/Source/NinjaOne.psd1 @@ -83,7 +83,9 @@ 'Get-NinjaOneAutomations', 'Get-NinjaOneBackupJobs', 'Get-NinjaOneComputerSystems', - 'Get-NinjaOneContacts', + 'Get-NinjaOneContacts', + 'Get-NinjaOneSystemContacts', + 'Get-NinjaOneContact', 'Get-NinjaOneCustomFields', 'Get-NinjaOneCustomFieldSignedURLs', 'Get-NinjaOneCustomFieldsPolicyCondition', @@ -118,7 +120,8 @@ 'Get-NinjaOneIntegrityCheckJobs', 'Get-NinjaOneJobs', 'Get-NinjaOneKnowledgeBaseArticle', - 'Get-NinjaOneKnowledgeBaseFolders', + 'Get-NinjaOneKnowledgeBaseFolders', + 'Get-NinjaOneChecklistTemplates', 'Get-NinjaOneLocationCustomFields', 'Get-NinjaOneLocations', 'Get-NinjaOneLoggedOnUsers', @@ -127,7 +130,10 @@ 'Get-NinjaOneOrganisationCustomFields', 'Get-NinjaOneOrganisationDevices', 'Get-NinjaOneOrganisationDocuments', - 'Get-NinjaOneOrganisationDocumentSignedURLs', + 'Get-NinjaOneOrganisationDocumentSignedURLs', + 'Get-NinjaOneOrganisationChecklists', + 'Get-NinjaOneOrganisationChecklist', + 'Get-NinjaOneOrganisationChecklistSignedURLs', 'Get-NinjaOneOrgnaisationInformation', 'Get-NinjaOneOrganisationKnowledgeBaseArticles', 'Get-NinjaOneOrganisationLocations', @@ -144,7 +150,84 @@ 'Get-NinjaOneRelatedItemAttachment', 'Get-NinjaOneRelatedItemAttachmentSignedURLs', 'Get-NinjaOneRelatedItems', - 'Get-NinjaOneRoles', + 'Get-NinjaOneRoles', + 'Get-NinjaOneTab', + 'Get-NinjaOneTabEndUser', + 'Get-NinjaOneTabOrganisation', + 'Get-NinjaOneEntityCustomFieldsSignedURLs', + 'Get-NinjaOneTabSummaryEndUser', + 'Get-NinjaOneTabSummaryOrganisation', + 'Get-NinjaOneTabSummaryRole', + 'Set-NinjaOneTabEndUserOrder', + 'Get-NinjaOneTabRole', + 'Remove-NinjaOneTab', + 'Set-NinjaOneTabRoleVisibility', + 'Set-NinjaOneTabOrganisationOrder', + 'Set-NinjaOneTabRoleOrder', + 'Get-NinjaOneTags', + 'Remove-NinjaOneTag', + 'New-NinjaOneUnmanagedDevice', + 'Remove-NinjaOneUnmanagedDevice', + 'Get-NinjaOneUserRoles', + 'Add-NinjaOneUserRoleMembers', + 'Remove-NinjaOneUserRoleMembers', + 'Set-NinjaOneEndUserCustomFields', + 'Set-NinjaOneKnowledgeBaseArticles', + 'Set-NinjaOneTab', + 'Rename-NinjaOneTab', + 'New-NinjaOneTab', + 'Get-NinjaOneVulnerabilityScanGroups', + 'Get-NinjaOneVulnerabilityScanGroup', + 'Invoke-NinjaOneVulnerabilityScanGroupUpload', + 'Invoke-NinjaOneChecklistArchive', + 'Invoke-NinjaOneChecklistRestore', + 'New-NinjaOneChecklistTemplate', + 'Remove-NinjaOneChecklistTemplates', + 'Set-NinjaOneChecklistTemplates', + 'Set-NinjaOneOrganisationChecklists', + 'Remove-NinjaOneOrganisationChecklists', + 'Invoke-NinjaOneOrganisationChecklistsPromote', + 'Invoke-NinjaOneOrganisationChecklistsPromoteWithName', + 'Invoke-NinjaOneDocumentTemplateArchive', + 'Invoke-NinjaOneDocumentTemplateRestore', + 'Invoke-NinjaOneDocumentTemplatesArchive', + 'Invoke-NinjaOneDocumentTemplatesRestore', + 'Invoke-NinjaOneOrganisationDocumentArchive', + 'Invoke-NinjaOneOrganisationDocumentRestore', + 'Invoke-NinjaOneOrganisationDocumentsArchive', + 'Invoke-NinjaOneOrganisationDocumentsRestore', + 'Invoke-NinjaOneOrganisationRestore', + 'New-NinjaOneOrganisationChecklist', + 'New-NinjaOneOrganisationChecklistsFromTemplates', + 'Remove-NinjaOneOrganisationChecklist', + 'Invoke-NinjaOneOrganisationArchive', + 'New-NinjaOneKnowledgeBaseArticles', + 'Invoke-NinjaOneKnowledgeBaseArticlesArchive', + 'Invoke-NinjaOneKnowledgeBaseFoldersArchive', + 'Remove-NinjaOneKnowledgeBaseArticles', + 'Remove-NinjaOneKnowledgeBaseFolders', + 'Restore-NinjaOneKnowledgeBaseArticles', + 'Restore-NinjaOneKnowledgeBaseFolders', + 'Move-NinjaOneKnowledgeBaseItems', + 'Get-NinjaOneEndUsers', + 'New-NinjaOneEndUser', + 'Get-NinjaOneEndUser', + 'Set-NinjaOneEndUser', + 'Get-NinjaOneEndUserCustomFields', + 'Get-NinjaOneOrganisationEndUsers', + 'Get-NinjaOneTechnicians', + 'New-NinjaOneTechnician', + 'Get-NinjaOneTechnician', + 'Set-NinjaOneTechnician', + 'New-NinjaOneTag', + 'New-NinjaOneTagGlobal', + 'Set-NinjaOneTag', + 'Remove-NinjaOneTags', + 'Merge-NinjaOneTags', + 'Set-NinjaOneAssetTag', + 'Set-NinjaOneUnmanagedDevice', + 'Set-NinjaOneDeviceOwner', + 'Remove-NinjaOneDeviceOwner', 'Get-NinjaOneSoftwareInventory', 'Get-NinjaOneSoftwarePatches', 'Get-NinjaOneSoftwarePatchInstalls', @@ -172,7 +255,8 @@ 'New-NinjaOneDocumentTemplateFieldObject', 'New-NinjaOneEntityRelation', 'New-NinjaOneEntityRelations', - 'New-NinjaOneInstaller', + 'New-NinjaOneInstaller', + 'New-NinjaOneContact', 'New-NinjaOneIntegrityCheckJob', 'New-NinjaOneLocation', 'New-NinjaOneOrganisation', @@ -183,29 +267,38 @@ 'New-NinjaOneTicket', 'New-NinjaOneTicketComment', 'New-NinjaOneWindowsEventPolicyCondition', - 'Remove-NinjaOneDeviceMaintenance', - 'Remove-NinjaOneDocumentTemplate', - 'Remove-NinjaOneOrganisationDocument', - 'Remove-NinjaonePolicyCondition', - 'Remove-NinjaOneRelatedItem', - 'Remove-NinjaOneRematedItems', - 'Remove-NinjaOneWebhook', - 'Reset-NinjaOneAlert', - 'Reset-NinjaOneDevicePolicyOverrides', + 'Remove-NinjaOneDeviceMaintenance', + 'Remove-NinjaOneDocumentTemplate', + 'Remove-NinjaOneChecklistTemplate', + 'Remove-NinjaOneOrganisationDocument', + 'Remove-NinjaOnePolicyCondition', + 'Remove-NinjaOneRelatedItem', + 'Remove-NinjaOneContact', + 'Remove-NinjaOneEndUser', + 'Remove-NinjaOneTechnician', + 'Remove-NinjaOneRematedItems', + 'Remove-NinjaOneWebhook', + 'Reset-NinjaOneAlert', + 'Reset-NinjaOneDevicePolicyOverrides', 'Restart-NinjaOneDevice', 'Set-NinjaOneDevice', 'Set-NinjaOneDeviceApproval', 'Set-NinjaOneDeviceCustomFields', - 'Set-NinjaOneDeviceMaintenance', - 'Set-NinjaOneDocumentTemplate', + 'Set-NinjaOneDeviceMaintenance', + 'Start-NinjaOneOSPatchScanJob', + 'Start-NinjaOneOSPatchApply', + 'Start-NinjaOneSoftwarePatchScan', + 'Start-NinjaOneSoftwarePatchApply', + 'Set-NinjaOneDocumentTemplate', 'Set-NinjaOneLocation', 'Set-NinjaOneLocationCustomFields', 'Set-NinjaOneOrganisation', 'Set-NinjaOneOrganisationCustomFields', 'Set-NinjaOneOrganisationDocument', - 'Set-NinjaOneOrganisationDocuments', - 'Set-NinjaOneOrganisationPolicies', - 'Set-NinjaOneTicket', + 'Set-NinjaOneOrganisationDocuments', + 'Set-NinjaOneOrganisationPolicies', + 'Set-NinjaOneContact', + 'Set-NinjaOneTicket', 'Set-NinjaOneWindowsServiceConfiguration', 'Update-NinjaOneWebhook' ) @@ -276,4 +369,4 @@ # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' -} \ No newline at end of file +} diff --git a/Source/Public/Checklist Templates/Get/Get-NinjaOneChecklistTemplates.ps1 b/Source/Public/Checklist Templates/Get/Get-NinjaOneChecklistTemplates.ps1 new file mode 100644 index 0000000..981125c --- /dev/null +++ b/Source/Public/Checklist Templates/Get/Get-NinjaOneChecklistTemplates.ps1 @@ -0,0 +1,34 @@ +function Get-NinjaOneChecklistTemplates { + <# + .SYNOPSIS + Gets checklist templates. + .DESCRIPTION + Retrieves checklist templates via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Get-NinjaOneChecklistTemplates + + Gets all checklist templates. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/checklisttemplates + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoclt')] + [MetadataAttribute( + '/v2/checklist/templates', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/checklist/templates' + $RequestParams = @{ Resource = $Resource } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw 'No checklist templates found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Checklist Templates/New/New-NinjaOneChecklistTemplate.ps1 b/Source/Public/Checklist Templates/New/New-NinjaOneChecklistTemplate.ps1 new file mode 100644 index 0000000..cd88ddf --- /dev/null +++ b/Source/Public/Checklist Templates/New/New-NinjaOneChecklistTemplate.ps1 @@ -0,0 +1,31 @@ +function New-NinjaOneChecklistTemplate { + <# + .SYNOPSIS + Creates a checklist template. + .DESCRIPTION + Creates a new checklist template via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> New-NinjaOneChecklistTemplate -template @{ name='Onboarding'; items=@('Step1') } + + Creates a checklist template. + .OUTPUTS + A PowerShell object containing the created template. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/checklisttemplate + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('nnoct')] + [MetadataAttribute( + '/v2/checklist/templates', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$template + ) + process { try { if($PSCmdlet.ShouldProcess('Checklist Template','Create')){ return (New-NinjaOnePOSTRequest -Resource 'v2/checklist/templates' -Body $template) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplate.ps1 b/Source/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplate.ps1 new file mode 100644 index 0000000..0567ddd --- /dev/null +++ b/Source/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplate.ps1 @@ -0,0 +1,39 @@ +function Remove-NinjaOneChecklistTemplate { + <# + .SYNOPSIS + Removes a checklist template. + .DESCRIPTION + Deletes a checklist template via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .OUTPUTS + Status code (204) on success. + .EXAMPLE + PS> Remove-NinjaOneChecklistTemplate -checklistTemplateId 10 -Confirm:$false + + Deletes the checklist template with Id 10. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoclt')] + [MetadataAttribute( + '/v2/checklist/template/{checklistTemplateId}', + 'delete' + )] + Param( + # Checklist template Id to delete. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$checklistTemplateId + ) + process { + try { + $Resource = ('v2/checklist/template/{0}' -f $checklistTemplateId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Checklist Template {0}' -f $checklistTemplateId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Checklist template {0} deleted successfully.' -f $checklistTemplateId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplates.ps1 b/Source/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplates.ps1 new file mode 100644 index 0000000..7f761d8 --- /dev/null +++ b/Source/Public/Checklist Templates/Remove/Remove-NinjaOneChecklistTemplates.ps1 @@ -0,0 +1,30 @@ +function Remove-NinjaOneChecklistTemplates { + <# + .SYNOPSIS + Deletes checklist templates. + .DESCRIPTION + Deletes one or more checklist templates via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Remove-NinjaOneChecklistTemplates -templateIds @(1,2) -Confirm:$false + + Deletes templates 1 and 2. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/checklisttemplates + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('rnocltm')] + [MetadataAttribute( + '/v2/checklist/templates/delete', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int[]]$templateIds + ) + process { try { if($PSCmdlet.ShouldProcess('Checklist Templates','Delete')){ return (New-NinjaOnePOSTRequest -Resource 'v2/checklist/templates/delete' -Body $templateIds) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/Checklist Templates/Set/Set-NinjaOneChecklistTemplates.ps1 b/Source/Public/Checklist Templates/Set/Set-NinjaOneChecklistTemplates.ps1 new file mode 100644 index 0000000..34c9e73 --- /dev/null +++ b/Source/Public/Checklist Templates/Set/Set-NinjaOneChecklistTemplates.ps1 @@ -0,0 +1,31 @@ +function Set-NinjaOneChecklistTemplates { + <# + .SYNOPSIS + Updates checklist templates. + .DESCRIPTION + Updates checklist templates via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Set-NinjaOneChecklistTemplates -templates @{ templates = @(@{ id=1; name='New' }) } + + Updates the specified templates. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/checklisttemplates + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snocltm')] + [MetadataAttribute( + '/v2/checklist/templates', + 'put' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$templates + ) + process { try { if($PSCmdlet.ShouldProcess('Checklist Templates','Update')){ return (New-NinjaOnePUTRequest -Resource 'v2/checklist/templates' -Body $templates) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/Checklist/Invoke/Invoke-NinjaOneChecklistArchive.ps1 b/Source/Public/Checklist/Invoke/Invoke-NinjaOneChecklistArchive.ps1 new file mode 100644 index 0000000..148185d --- /dev/null +++ b/Source/Public/Checklist/Invoke/Invoke-NinjaOneChecklistArchive.ps1 @@ -0,0 +1,31 @@ +function Invoke-NinjaOneChecklistArchive { + <# + .SYNOPSIS + Archives checklists. + .DESCRIPTION + Archives one or more checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Invoke-NinjaOneChecklistArchive -request @{ checklistIds = @(1,2) } + + Archives the specified checklists. + .OUTPUTS + Status code or job result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/checklist-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inoclarch')] + [MetadataAttribute( + '/v2/checklist/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Checklists','Archive')){ return (New-NinjaOnePOSTRequest -Resource 'v2/checklist/archive' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/Checklist/Invoke/Invoke-NinjaOneChecklistRestore.ps1 b/Source/Public/Checklist/Invoke/Invoke-NinjaOneChecklistRestore.ps1 new file mode 100644 index 0000000..2f21c68 --- /dev/null +++ b/Source/Public/Checklist/Invoke/Invoke-NinjaOneChecklistRestore.ps1 @@ -0,0 +1,31 @@ +function Invoke-NinjaOneChecklistRestore { + <# + .SYNOPSIS + Restores archived checklists. + .DESCRIPTION + Restores archived checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Checklist Templates + .EXAMPLE + PS> Invoke-NinjaOneChecklistRestore -request @{ checklistIds = @(1,2) } + + Restores the specified checklists. + .OUTPUTS + Status code or job result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/checklist-restore + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inoclrest')] + [MetadataAttribute( + '/v2/checklist/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Checklists','Restore')){ return (New-NinjaOnePOSTRequest -Resource 'v2/checklist/restore' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/CustomFields/Get/Get-NinjaOneEntityCustomFieldsSignedURLs.ps1 b/Source/Public/CustomFields/Get/Get-NinjaOneEntityCustomFieldsSignedURLs.ps1 new file mode 100644 index 0000000..8428b1a --- /dev/null +++ b/Source/Public/CustomFields/Get/Get-NinjaOneEntityCustomFieldsSignedURLs.ps1 @@ -0,0 +1,51 @@ +function Get-NinjaOneEntityCustomFieldsSignedURLs { + <# + .SYNOPSIS + Gets signed URLs for custom fields on an entity. + .DESCRIPTION + Retrieves signed URLs for custom fields for a given entity type and Id via the NinjaOne v2 API. + .FUNCTIONALITY + Custom Fields + .EXAMPLE + PS> Get-NinjaOneEntityCustomFieldsSignedURLs -entityType ORGANIZATION -entityId 1 + + Gets custom field signed URLs for the ORGANIZATION entity with Id 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/customfields-signedurls + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoecfsu')] + [MetadataAttribute( + '/v2/custom-fields/entity-type/{entityType}/{entityId}/signed-urls', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The entity type. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [ValidateSet('ORGANIZATION','DOCUMENT','LOCATION','NODE','ATTACHMENT','TECHNICIAN','CREDENTIAL','CHECKLIST','END_USER','CONTACT','KB_DOCUMENT')] + [String]$entityType, + # The entity Id. + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Int]$entityId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($entityType) { $Parameters.Remove('entityType') | Out-Null } + if ($entityId) { $Parameters.Remove('entityId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/custom-fields/entity-type/{0}/{1}/signed-urls' -f $entityType, $entityId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('No custom field signed URLs found for {0} {1}.' -f $entityType, $entityId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Devices/Set/Start-NinjaOneOSPatchApply.ps1 b/Source/Public/Devices/Set/Start-NinjaOneOSPatchApply.ps1 new file mode 100644 index 0000000..0627ea9 --- /dev/null +++ b/Source/Public/Devices/Set/Start-NinjaOneOSPatchApply.ps1 @@ -0,0 +1,44 @@ +function Start-NinjaOneOSPatchApply { + <# + .SYNOPSIS + Starts an OS Patch Apply on the target device. + .DESCRIPTION + Submits a job to start an OS patch apply on a device via the NinjaOne v2 API. + .FUNCTIONALITY + Device OS Patch Apply + .EXAMPLE + PS> Start-NinjaOneOSPatchApply -deviceId 1 + + Start an OS Patch Apply on the device with id 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/ospatchapply + #> + [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoospa')] + [MetadataAttribute( + '/v2/device/{id}/patch/os/apply', + 'post' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The device to start the OS patch apply for. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$deviceId + ) + process { + try { + Write-Verbose ('Starting OS Patch Apply for device {0}.' -f $deviceId) + $Resource = ('v2/device/{0}/patch/os/apply' -f $deviceId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('OS Patch Apply for {0}' -f $deviceId), 'Start')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Devices/Set/Start-NinjaOneOSPatchScanJob.ps1 b/Source/Public/Devices/Set/Start-NinjaOneOSPatchScanJob.ps1 new file mode 100644 index 0000000..2399e11 --- /dev/null +++ b/Source/Public/Devices/Set/Start-NinjaOneOSPatchScanJob.ps1 @@ -0,0 +1,40 @@ +function Start-NinjaOneOSPatchScanJob { + <# + .SYNOPSIS + Starts an OS Patch Scan job on the target device. + .DESCRIPTION + Submits a job (POST) to start an OS patch scan on a device via the NinjaOne v2 API. Complements the PATCH variant. + .FUNCTIONALITY + Device OS Patch Scan + .EXAMPLE + PS> Start-NinjaOneOSPatchScanJob -deviceId 1 + + Starts an OS Patch Scan job on device 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/ospatchscan + #> + [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoossp')] + [MetadataAttribute( + '/v2/device/{id}/patch/os/scan', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$deviceId + ) + process { + try { + $Resource = ('v2/device/{0}/patch/os/scan' -f $deviceId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('OS Patch Scan for {0}' -f $deviceId), 'Start')) { + return (New-NinjaOnePOSTRequest @RequestParams) + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Devices/Set/Start-NinjaOneSoftwarePatchApply.ps1 b/Source/Public/Devices/Set/Start-NinjaOneSoftwarePatchApply.ps1 new file mode 100644 index 0000000..0c42631 --- /dev/null +++ b/Source/Public/Devices/Set/Start-NinjaOneSoftwarePatchApply.ps1 @@ -0,0 +1,44 @@ +function Start-NinjaOneSoftwarePatchApply { + <# + .SYNOPSIS + Starts a Software Patch Apply on the target device. + .DESCRIPTION + Submits a job to start a software patch apply on a device via the NinjaOne v2 API. + .FUNCTIONALITY + Device Software Patch Apply + .EXAMPLE + PS> Start-NinjaOneSoftwarePatchApply -deviceId 1 + + Start a Software Patch Apply on the device with id 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/softwarepatchapply + #> + [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoswpa')] + [MetadataAttribute( + '/v2/device/{id}/patch/software/apply', + 'post' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The device to start the software patch apply for. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$deviceId + ) + process { + try { + Write-Verbose ('Starting Software Patch Apply for device {0}.' -f $deviceId) + $Resource = ('v2/device/{0}/patch/software/apply' -f $deviceId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Software Patch Apply for {0}' -f $deviceId), 'Start')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Devices/Set/Start-NinjaOneSoftwarePatchScan.ps1 b/Source/Public/Devices/Set/Start-NinjaOneSoftwarePatchScan.ps1 new file mode 100644 index 0000000..6c3cddb --- /dev/null +++ b/Source/Public/Devices/Set/Start-NinjaOneSoftwarePatchScan.ps1 @@ -0,0 +1,44 @@ +function Start-NinjaOneSoftwarePatchScan { + <# + .SYNOPSIS + Starts a Software Patch Scan on the target device. + .DESCRIPTION + Submits a job to start a software patch scan on a device via the NinjaOne v2 API. + .FUNCTIONALITY + Device Software Patch Scan + .EXAMPLE + PS> Start-NinjaOneSoftwarePatchScan -deviceId 1 + + Start a Software Patch Scan on the device with id 1. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/softwarepatchscan + #> + [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoswps')] + [MetadataAttribute( + '/v2/device/{id}/patch/software/scan', + 'post' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The device to start the software patch scan for. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$deviceId + ) + process { + try { + Write-Verbose ('Starting Software Patch Scan for device {0}.' -f $deviceId) + $Resource = ('v2/device/{0}/patch/software/scan' -f $deviceId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Software Patch Scan for {0}' -f $deviceId), 'Start')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateArchive.ps1 b/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateArchive.ps1 new file mode 100644 index 0000000..0b50f77 --- /dev/null +++ b/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateArchive.ps1 @@ -0,0 +1,30 @@ +function Invoke-NinjaOneDocumentTemplateArchive { + <# + .SYNOPSIS + Archives a document template. + .DESCRIPTION + Archives a document template via the NinjaOne v2 API. + .FUNCTIONALITY + Document Templates + .EXAMPLE + PS> Invoke-NinjaOneDocumentTemplateArchive -documentTemplateId 10 + + Archives template 10. + .OUTPUTS + Status code or job result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/documenttemplate-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inodta')] + [MetadataAttribute( + '/v2/document-templates/{documentTemplateId}/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$documentTemplateId + ) + process { try { $res='v2/document-templates/{0}/archive' -f $documentTemplateId; if($PSCmdlet.ShouldProcess(('Document Template {0}' -f $documentTemplateId),'Archive')){ return (New-NinjaOnePOSTRequest -Resource $res) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateRestore.ps1 b/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateRestore.ps1 new file mode 100644 index 0000000..f89144d --- /dev/null +++ b/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplateRestore.ps1 @@ -0,0 +1,30 @@ +function Invoke-NinjaOneDocumentTemplateRestore { + <# + .SYNOPSIS + Restores an archived document template. + .DESCRIPTION + Restores an archived document template via the NinjaOne v2 API. + .FUNCTIONALITY + Document Templates + .EXAMPLE + PS> Invoke-NinjaOneDocumentTemplateRestore -documentTemplateId 10 + + Restores template 10. + .OUTPUTS + Status code or job result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/documenttemplate-restore + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inodtr')] + [MetadataAttribute( + '/v2/document-templates/{documentTemplateId}/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$documentTemplateId + ) + process { try { $res='v2/document-templates/{0}/restore' -f $documentTemplateId; if($PSCmdlet.ShouldProcess(('Document Template {0}' -f $documentTemplateId),'Restore')){ return (New-NinjaOnePOSTRequest -Resource $res) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesArchive.ps1 b/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesArchive.ps1 new file mode 100644 index 0000000..6642947 --- /dev/null +++ b/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesArchive.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneDocumentTemplatesArchive { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inodtas')] + [MetadataAttribute( + '/v2/document-templates/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Document Templates','Archive')){ return (New-NinjaOnePOSTRequest -Resource 'v2/document-templates/archive' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesRestore.ps1 b/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesRestore.ps1 new file mode 100644 index 0000000..98f4731 --- /dev/null +++ b/Source/Public/Document Templates/Invoke/Invoke-NinjaOneDocumentTemplatesRestore.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneDocumentTemplatesRestore { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inodtrs')] + [MetadataAttribute( + '/v2/document-templates/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Document Templates','Restore')){ return (New-NinjaOnePOSTRequest -Resource 'v2/document-templates/restore' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Source/Public/ITAM/New/New-NinjaOneUnmanagedDevice.ps1 b/Source/Public/ITAM/New/New-NinjaOneUnmanagedDevice.ps1 new file mode 100644 index 0000000..b7f01e9 --- /dev/null +++ b/Source/Public/ITAM/New/New-NinjaOneUnmanagedDevice.ps1 @@ -0,0 +1,36 @@ +function New-NinjaOneUnmanagedDevice { + <# + .SYNOPSIS + Creates an unmanaged device. + .DESCRIPTION + Creates an unmanaged device via the NinjaOne v2 API. + .FUNCTIONALITY + Unmanaged Devices + .EXAMPLE + PS> New-NinjaOneUnmanagedDevice -unmanagedDevice @{ hostname='asset-5001' } + + Creates an unmanaged device. + .OUTPUTS + A PowerShell object containing the created unmanaged device Id. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/unmanageddevice + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoUD')] + [MetadataAttribute( + '/v2/itam/unmanaged-device', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$unmanagedDevice + ) + process { + try { + $RequestParams = @{ Resource = 'v2/itam/unmanaged-device'; Body = $unmanagedDevice } + if ($PSCmdlet.ShouldProcess('Unmanaged Device', 'Create')) { return (New-NinjaOnePOSTRequest @RequestParams) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/ITAM/Remove/Remove-NinjaOneUnmanagedDevice.ps1 b/Source/Public/ITAM/Remove/Remove-NinjaOneUnmanagedDevice.ps1 new file mode 100644 index 0000000..e5cb8d4 --- /dev/null +++ b/Source/Public/ITAM/Remove/Remove-NinjaOneUnmanagedDevice.ps1 @@ -0,0 +1,39 @@ +function Remove-NinjaOneUnmanagedDevice { + <# + .SYNOPSIS + Deletes an unmanaged device. + .DESCRIPTION + Deletes an unmanaged device via the NinjaOne v2 API. + .FUNCTIONALITY + Unmanaged Devices + .EXAMPLE + PS> Remove-NinjaOneUnmanagedDevice -nodeId 5001 -Confirm:$false + + Deletes unmanaged device 5001. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/unmanageddevice + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoud')] + [MetadataAttribute( + '/v2/itam/unmanaged-device/{nodeId}', + 'delete' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$nodeId + ) + process { + try { + $Resource = ('v2/itam/unmanaged-device/{0}' -f $nodeId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Unmanaged Device {0}' -f $nodeId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Unmanaged device {0} deleted.' -f $nodeId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/ITAM/Set/Set-NinjaOneUnmanagedDevice.ps1 b/Source/Public/ITAM/Set/Set-NinjaOneUnmanagedDevice.ps1 new file mode 100644 index 0000000..b4ca6fa --- /dev/null +++ b/Source/Public/ITAM/Set/Set-NinjaOneUnmanagedDevice.ps1 @@ -0,0 +1,45 @@ +function Set-NinjaOneUnmanagedDevice { + <# + .SYNOPSIS + Updates an unmanaged device. + .DESCRIPTION + Updates an unmanaged device via the NinjaOne v2 API. + .FUNCTIONALITY + Unmanaged Devices + .EXAMPLE + PS> Set-NinjaOneUnmanagedDevice -nodeId 5001 -unmanagedDevice @{ hostname = 'asset-5001' } + + Updates unmanaged device 5001. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/unmanageddevice + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoud')] + [MetadataAttribute( + '/v2/itam/unmanaged-device/{nodeId}', + 'put' + )] + Param( + # Unmanaged device node Id + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$nodeId, + # Update payload + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$unmanagedDevice + ) + process { + try { + $Resource = ('v2/itam/unmanaged-device/{0}' -f $nodeId) + $RequestParams = @{ Resource = $Resource; Body = $unmanagedDevice } + if ($PSCmdlet.ShouldProcess(('Unmanaged Device {0}' -f $nodeId), 'Update')) { + $Result = New-NinjaOnePUTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/KnowledgeBaseArticles/Get/Get-NinjaOneRelatedItemAttachmentSignedURLs.ps1 b/Source/Public/KnowledgeBaseArticles/Get/Get-NinjaOneRelatedItemAttachmentSignedURLs.ps1 index d0d54c6..d29f6c5 100644 --- a/Source/Public/KnowledgeBaseArticles/Get/Get-NinjaOneRelatedItemAttachmentSignedURLs.ps1 +++ b/Source/Public/KnowledgeBaseArticles/Get/Get-NinjaOneRelatedItemAttachmentSignedURLs.ps1 @@ -19,10 +19,10 @@ function Get-NinjaOneRelatedItemAttachmentSignedURLs { [CmdletBinding()] [OutputType([Object])] [Alias('gnoriasu')] - [MetadataAttribute( - '/v2/related-items/{relatedItemId}/attachment/download', - 'get' - )] +[MetadataAttribute( + '/v2/related-items/with-entity/{entityType}/{entityId}/attachments/signed-urls', + 'get' +)] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] Param( # The entity type of the related item. @@ -57,4 +57,4 @@ function Get-NinjaOneRelatedItemAttachmentSignedURLs { New-NinjaOneError -ErrorRecord $_ } } -} \ No newline at end of file +} diff --git a/Source/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseArticlesArchive.ps1 b/Source/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseArticlesArchive.ps1 new file mode 100644 index 0000000..98b1dcb --- /dev/null +++ b/Source/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseArticlesArchive.ps1 @@ -0,0 +1,40 @@ +function Invoke-NinjaOneKnowledgeBaseArticlesArchive { + <# + .SYNOPSIS + Archives knowledge base articles. + .DESCRIPTION + Archives knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Invoke-NinjaOneKnowledgeBaseArticlesArchive -articleIds @(1,2,3) + + Archives the specified articles. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/kb-articles-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('inokbaa')] + [MetadataAttribute( + '/v2/knowledgebase/articles/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$articleIds + ) + process { + try { + $Resource = 'v2/knowledgebase/articles/archive' + $RequestParams = @{ Resource = $Resource; Body = $articleIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Articles', 'Archive')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseFoldersArchive.ps1 b/Source/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseFoldersArchive.ps1 new file mode 100644 index 0000000..175357b --- /dev/null +++ b/Source/Public/KnowledgeBaseArticles/Invoke/Invoke-NinjaOneKnowledgeBaseFoldersArchive.ps1 @@ -0,0 +1,40 @@ +function Invoke-NinjaOneKnowledgeBaseFoldersArchive { + <# + .SYNOPSIS + Archives knowledge base folders. + .DESCRIPTION + Archives knowledge base folders via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Invoke-NinjaOneKnowledgeBaseFoldersArchive -folderIds @(10,11) + + Archives the specified folders. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/kb-folders-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('inokbfa')] + [MetadataAttribute( + '/v2/knowledgebase/folders/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$folderIds + ) + process { + try { + $Resource = 'v2/knowledgebase/folders/archive' + $RequestParams = @{ Resource = $Resource; Body = $folderIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Folders', 'Archive')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/KnowledgeBaseArticles/New/New-NinjaOneKnowledgeBaseArticles.ps1 b/Source/Public/KnowledgeBaseArticles/New/New-NinjaOneKnowledgeBaseArticles.ps1 new file mode 100644 index 0000000..08ca162 --- /dev/null +++ b/Source/Public/KnowledgeBaseArticles/New/New-NinjaOneKnowledgeBaseArticles.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneKnowledgeBaseArticles { + <# + .SYNOPSIS + Creates knowledge base articles. + .DESCRIPTION + Creates one or more knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> New-NinjaOneKnowledgeBaseArticles -articles @{ organizationId = 1; folderId = 10; articles = @(@{ name='A'; content='...'} ) } + + Creates knowledge base articles in the specified folder. + .OUTPUTS + A PowerShell object containing the created articles or job result. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/knowledgebase-articles + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnokba')] + [MetadataAttribute( + '/v2/knowledgebase/articles', + 'post' + )] + Param( + # Articles payload per API schema + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$articles + ) + process { + try { + $Resource = 'v2/knowledgebase/articles' + $RequestParams = @{ Resource = $Resource; Body = $articles } + if ($PSCmdlet.ShouldProcess('Knowledge Base Articles', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseArticles.ps1 b/Source/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseArticles.ps1 new file mode 100644 index 0000000..b99016e --- /dev/null +++ b/Source/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseArticles.ps1 @@ -0,0 +1,40 @@ +function Remove-NinjaOneKnowledgeBaseArticles { + <# + .SYNOPSIS + Deletes knowledge base articles. + .DESCRIPTION + Deletes knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Remove-NinjaOneKnowledgeBaseArticles -articleIds @(1,2,3) -Confirm:$false + + Deletes the specified articles. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/kb-articles + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnokba')] + [MetadataAttribute( + '/v2/knowledgebase/articles/delete', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$articleIds + ) + process { + try { + $Resource = 'v2/knowledgebase/articles/delete' + $RequestParams = @{ Resource = $Resource; Body = $articleIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Articles', 'Delete')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseFolders.ps1 b/Source/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseFolders.ps1 new file mode 100644 index 0000000..0834930 --- /dev/null +++ b/Source/Public/KnowledgeBaseArticles/Remove/Remove-NinjaOneKnowledgeBaseFolders.ps1 @@ -0,0 +1,40 @@ +function Remove-NinjaOneKnowledgeBaseFolders { + <# + .SYNOPSIS + Deletes knowledge base folders. + .DESCRIPTION + Deletes knowledge base folders via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Remove-NinjaOneKnowledgeBaseFolders -folderIds @(10,11) -Confirm:$false + + Deletes the specified folders. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/kb-folders + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnokbf')] + [MetadataAttribute( + '/v2/knowledgebase/folders/delete', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$folderIds + ) + process { + try { + $Resource = 'v2/knowledgebase/folders/delete' + $RequestParams = @{ Resource = $Resource; Body = $folderIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Folders', 'Delete')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseArticles.ps1 b/Source/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseArticles.ps1 new file mode 100644 index 0000000..4ac7804 --- /dev/null +++ b/Source/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseArticles.ps1 @@ -0,0 +1,40 @@ +function Restore-NinjaOneKnowledgeBaseArticles { + <# + .SYNOPSIS + Restores archived knowledge base articles. + .DESCRIPTION + Restores archived knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Restore-NinjaOneKnowledgeBaseArticles -articleIds @(1,2,3) + + Restores the specified articles. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Restore/kb-articles + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rtnokba')] + [MetadataAttribute( + '/v2/knowledgebase/articles/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$articleIds + ) + process { + try { + $Resource = 'v2/knowledgebase/articles/restore' + $RequestParams = @{ Resource = $Resource; Body = $articleIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Articles', 'Restore')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseFolders.ps1 b/Source/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseFolders.ps1 new file mode 100644 index 0000000..08ee80a --- /dev/null +++ b/Source/Public/KnowledgeBaseArticles/Restore/Restore-NinjaOneKnowledgeBaseFolders.ps1 @@ -0,0 +1,40 @@ +function Restore-NinjaOneKnowledgeBaseFolders { + <# + .SYNOPSIS + Restores archived knowledge base folders. + .DESCRIPTION + Restores archived knowledge base folders via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Restore-NinjaOneKnowledgeBaseFolders -folderIds @(10,11) + + Restores the specified folders. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Restore/kb-folders + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rtnokbf')] + [MetadataAttribute( + '/v2/knowledgebase/folders/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int[]]$folderIds + ) + process { + try { + $Resource = 'v2/knowledgebase/folders/restore' + $RequestParams = @{ Resource = $Resource; Body = $folderIds } + if ($PSCmdlet.ShouldProcess('Knowledge Base Folders', 'Restore')) { + $Response = New-NinjaOnePOSTRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/KnowledgeBaseArticles/Set/Move-NinjaOneKnowledgeBaseItems.ps1 b/Source/Public/KnowledgeBaseArticles/Set/Move-NinjaOneKnowledgeBaseItems.ps1 new file mode 100644 index 0000000..980da3b --- /dev/null +++ b/Source/Public/KnowledgeBaseArticles/Set/Move-NinjaOneKnowledgeBaseItems.ps1 @@ -0,0 +1,42 @@ +function Move-NinjaOneKnowledgeBaseItems { + <# + .SYNOPSIS + Moves knowledge base folders and documents to another folder. + .DESCRIPTION + Moves knowledge base items using the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Move-NinjaOneKnowledgeBaseItems -moveRequest @{ sourceFolderIds=@(1); sourceDocumentIds=@(2,3); targetFolderId=10 } + + Moves the specified KB items to folder 10. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/kb-move + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('mvnokbi')] + [MetadataAttribute( + '/v2/knowledgebase/folders/move', + 'patch' + )] + Param( + # Move request payload per API schema (MovePublicApiRequest) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$moveRequest + ) + process { + try { + $Resource = 'v2/knowledgebase/folders/move' + $RequestParams = @{ Resource = $Resource; Body = $moveRequest } + if ($PSCmdlet.ShouldProcess('Knowledge Base Items', 'Move')) { + $Response = New-NinjaOnePATCHRequest @RequestParams + return $Response + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/KnowledgeBaseArticles/Set/Set-NinjaOneKnowledgeBaseArticles.ps1 b/Source/Public/KnowledgeBaseArticles/Set/Set-NinjaOneKnowledgeBaseArticles.ps1 new file mode 100644 index 0000000..7e4d90c --- /dev/null +++ b/Source/Public/KnowledgeBaseArticles/Set/Set-NinjaOneKnowledgeBaseArticles.ps1 @@ -0,0 +1,35 @@ +function Set-NinjaOneKnowledgeBaseArticles { + <# + .SYNOPSIS + Updates knowledge base articles. + .DESCRIPTION + Updates one of more knowledge base articles via the NinjaOne v2 API. + .FUNCTIONALITY + Knowledge Base Articles + .EXAMPLE + PS> Set-NinjaOneKnowledgeBaseArticles -articles @{ articles = @(@{ id=1; name='New' }) } + + Updates the specified KB articles. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/knowledgebase-articles + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snonkba')] + [MetadataAttribute( + '/v2/knowledgebase/articles', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$articles + ) + process { + try { + if($PSCmdlet.ShouldProcess('Knowledge Base Articles','Update')){ return (New-NinjaOnePATCHRequest -Resource 'v2/knowledgebase/articles' -Body $articles) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Management/Remove/Remove-NinjaOneDeviceOwner.ps1 b/Source/Public/Management/Remove/Remove-NinjaOneDeviceOwner.ps1 new file mode 100644 index 0000000..51c811a --- /dev/null +++ b/Source/Public/Management/Remove/Remove-NinjaOneDeviceOwner.ps1 @@ -0,0 +1,48 @@ +function Remove-NinjaOneDeviceOwner { + <# + .SYNOPSIS + Removes the owner of a device. + .DESCRIPTION + Removes the owner of the specified device via the NinjaOne v2 API. + .FUNCTIONALITY + Devices + .EXAMPLE + PS> Remove-NinjaOneDeviceOwner -id 1234 -Confirm:$false + + Removes the owner of device 1234. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/deviceowner + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnodo')] + [MetadataAttribute( + '/v2/device/{id}/owner', + 'delete' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # Device identifier + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/device/{0}/owner' -f $id) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + if ($PSCmdlet.ShouldProcess(('Device {0}' -f $id), 'Remove owner')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Device {0} owner removed.' -f $id) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Management/Set/Set-NinjaOneDeviceOwner.ps1 b/Source/Public/Management/Set/Set-NinjaOneDeviceOwner.ps1 new file mode 100644 index 0000000..b997454 --- /dev/null +++ b/Source/Public/Management/Set/Set-NinjaOneDeviceOwner.ps1 @@ -0,0 +1,52 @@ +function Set-NinjaOneDeviceOwner { + <# + .SYNOPSIS + Sets the owner of a device. + .DESCRIPTION + Sets the owner of the specified device via the NinjaOne v2 API. + .FUNCTIONALITY + Devices + .EXAMPLE + PS> Set-NinjaOneDeviceOwner -id 1234 -ownerUid 'user-uuid-1' + + Sets the owner of device 1234 to the specified user. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/deviceowner + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snodo')] + [MetadataAttribute( + '/v2/device/{id}/owner/{ownerUid}', + 'post' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # Device identifier + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$id, + # Owner UID + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [String]$ownerUid + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + if ($ownerUid) { $Parameters.Remove('ownerUid') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/device/{0}/owner/{1}' -f $id, $ownerUid) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + if ($PSCmdlet.ShouldProcess(('Device {0}' -f $id), ('Set owner {0}' -f $ownerUid))) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Organisation/Get/Get-NinjaOneOrganisationEndUsers.ps1 b/Source/Public/Organisation/Get/Get-NinjaOneOrganisationEndUsers.ps1 new file mode 100644 index 0000000..7bf0a30 --- /dev/null +++ b/Source/Public/Organisation/Get/Get-NinjaOneOrganisationEndUsers.ps1 @@ -0,0 +1,48 @@ +function Get-NinjaOneOrganisationEndUsers { + <# + .SYNOPSIS + Gets end users for an organisation. + .DESCRIPTION + Returns list of end users for a specific organisation via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation + .EXAMPLE + PS> Get-NinjaOneOrganisationEndUsers -organisationId 1 -includeRoles + + Gets end users for organisation 1 including roles. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/organisation-endusers + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnooeu','Get-NinjaOneOrganizationEndUsers')] + [MetadataAttribute( + '/v2/organization/{id}/end-users', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('organizationId')] + [Int]$organisationId, + # Includes user role information + [Parameter(Position = 1)] + [Switch]$includeRoles + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($organisationId) { $Parameters.Remove('organisationId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/organization/{0}/end-users' -f $organisationId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw ('No end users found for organisation {0}.' -f $organisationId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationArchive.ps1 b/Source/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationArchive.ps1 new file mode 100644 index 0000000..b5112e5 --- /dev/null +++ b/Source/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationArchive.ps1 @@ -0,0 +1,42 @@ +function Invoke-NinjaOneOrganisationArchive { + <# + .SYNOPSIS + Archives organisations. + .DESCRIPTION + Archives one or more organisations via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation + .EXAMPLE + PS> Invoke-NinjaOneOrganisationArchive -archiveRequest @{ organizationIds = @(1,2,3) } + + Archives organisations 1, 2 and 3. + .OUTPUTS + Status code or archive result per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/organisation-archive + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('inOOA')] + [MetadataAttribute( + '/v2/organization/archive', + 'post' + )] + Param( + # Archive request payload per API schema + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$archiveRequest + ) + process { + try { + $Resource = 'v2/organization/archive' + $RequestParams = @{ Resource = $Resource; Body = $archiveRequest } + if ($PSCmdlet.ShouldProcess('Organisations', 'Archive')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationRestore.ps1 b/Source/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationRestore.ps1 new file mode 100644 index 0000000..aea4a9f --- /dev/null +++ b/Source/Public/Organisation/Invoke/Invoke-NinjaOneOrganisationRestore.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneOrganisationRestore { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOoR')] + [MetadataAttribute( + '/v2/organization/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisations','Restore')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/restore' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Source/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklist.ps1 b/Source/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklist.ps1 new file mode 100644 index 0000000..080ac77 --- /dev/null +++ b/Source/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklist.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneOrganisationChecklist { + <# + .SYNOPSIS + Gets an organisation checklist by Id. + .DESCRIPTION + Retrieves an organisation checklist via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Get-NinjaOneOrganisationChecklist -checklistId 22 + + Gets organisation checklist with Id 22. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/organisationchecklist + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoocl1', 'Get-NinjaOneOrganizationChecklist')] + [MetadataAttribute( + '/v2/organization/checklist/{checklistId}', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$checklistId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($checklistId) { $Parameters.Remove('checklistId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/organization/checklist/{0}' -f $checklistId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Checklist {0} not found.' -f $checklistId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklistSignedURLs.ps1 b/Source/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklistSignedURLs.ps1 new file mode 100644 index 0000000..d128974 --- /dev/null +++ b/Source/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklistSignedURLs.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneOrganisationChecklistSignedURLs { + <# + .SYNOPSIS + Gets signed URLs for an organisation checklist. + .DESCRIPTION + Retrieves signed URLs for an organisation checklist via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Get-NinjaOneOrganisationChecklistSignedURLs -checklistId 22 + + Gets signed URLs for organisation checklist Id 22. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/organisationchecklist-signedurls + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnooclsu', 'Get-NinjaOneOrganizationChecklistSignedURLs')] + [MetadataAttribute( + '/v2/organization/checklist/{checklistId}/signed-urls', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$checklistId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($checklistId) { $Parameters.Remove('checklistId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/organization/checklist/{0}/signed-urls' -f $checklistId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('No signed URLs found for checklist {0}.' -f $checklistId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklists.ps1 b/Source/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklists.ps1 new file mode 100644 index 0000000..90a8e18 --- /dev/null +++ b/Source/Public/OrganisationChecklists/Get/Get-NinjaOneOrganisationChecklists.ps1 @@ -0,0 +1,34 @@ +function Get-NinjaOneOrganisationChecklists { + <# + .SYNOPSIS + Gets organisation checklists. + .DESCRIPTION + Retrieves organisation checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Get-NinjaOneOrganisationChecklists + + Gets organisation checklists. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/organisationchecklists + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoocl', 'Get-NinjaOneOrganizationChecklists')] + [MetadataAttribute( + '/v2/organization/checklists', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/organization/checklists' + $RequestParams = @{ Resource = $Resource } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw 'No organisation checklists found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromote.ps1 b/Source/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromote.ps1 new file mode 100644 index 0000000..5f6ef65 --- /dev/null +++ b/Source/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromote.ps1 @@ -0,0 +1,31 @@ +function Invoke-NinjaOneOrganisationChecklistsPromote { + <# + .SYNOPSIS + Promotes organisation checklists. + .DESCRIPTION + Promotes organisation checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Invoke-NinjaOneOrganisationChecklistsPromote -request @{ checklistIds=@(1,2) } + + Promotes the specified organisation checklists. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/organisationchecklists-promote + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOoClProm')] + [MetadataAttribute( + '/v2/organization/checklists/promote', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Checklists','Promote')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/checklists/promote' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromoteWithName.ps1 b/Source/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromoteWithName.ps1 new file mode 100644 index 0000000..c856183 --- /dev/null +++ b/Source/Public/OrganisationChecklists/Invoke/Invoke-NinjaOneOrganisationChecklistsPromoteWithName.ps1 @@ -0,0 +1,31 @@ +function Invoke-NinjaOneOrganisationChecklistsPromoteWithName { + <# + .SYNOPSIS + Promotes organisation checklists with a new name. + .DESCRIPTION + Promotes organisation checklists assigning a new name via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Invoke-NinjaOneOrganisationChecklistsPromoteWithName -request @{ checklistIds=@(1); name='New Name' } + + Promotes checklists with a new name. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/organisationchecklists-promote-with-name + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOoClPromName')] + [MetadataAttribute( + '/v2/organization/checklists/promote-with-name', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Checklists','Promote With Name')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/checklists/promote-with-name' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklist.ps1 b/Source/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklist.ps1 new file mode 100644 index 0000000..e397c43 --- /dev/null +++ b/Source/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklist.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneOrganisationChecklist { + <# + .SYNOPSIS + Creates an organisation checklist. + .DESCRIPTION + Creates a new organisation checklist via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> New-NinjaOneOrganisationChecklist -checklist @{ name = 'Onboarding'; items = @('Step1','Step2') } + + Creates an organisation checklist. + .OUTPUTS + A PowerShell object containing the created checklist. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/organisationchecklist + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoocl')] + [MetadataAttribute( + '/v2/organization/checklists', + 'post' + )] + Param( + # Checklist payload per API schema + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$checklist + ) + process { + try { + $Resource = 'v2/organization/checklists' + $RequestParams = @{ Resource = $Resource; Body = $checklist } + if ($PSCmdlet.ShouldProcess('Organisation checklist', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklistsFromTemplates.ps1 b/Source/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklistsFromTemplates.ps1 new file mode 100644 index 0000000..329b338 --- /dev/null +++ b/Source/Public/OrganisationChecklists/New/New-NinjaOneOrganisationChecklistsFromTemplates.ps1 @@ -0,0 +1,45 @@ +function New-NinjaOneOrganisationChecklistsFromTemplates { + <# + .SYNOPSIS + Creates organisation checklists from templates. + .DESCRIPTION + Creates organisation checklists from templates via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> New-NinjaOneOrganisationChecklistsFromTemplates -organisationId 1 -request @{ templateIds = @(10,11) } + + Creates checklists for organisation 1 from templates 10 and 11. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/organisationchecklists-from-templates + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoocltf')] + [MetadataAttribute( + '/v2/organization/{organizationId}/checklists-from-templates', + 'post' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$organisationId, + # Request payload per API schema + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { + try { + $Resource = ('v2/organization/{0}/checklists-from-templates' -f $organisationId) + $RequestParams = @{ Resource = $Resource; Body = $request } + if ($PSCmdlet.ShouldProcess(('Organisation {0}' -f $organisationId), 'Create Checklists From Templates')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklist.ps1 b/Source/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklist.ps1 new file mode 100644 index 0000000..a8e6c4c --- /dev/null +++ b/Source/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklist.ps1 @@ -0,0 +1,41 @@ +function Remove-NinjaOneOrganisationChecklist { + <# + .SYNOPSIS + Removes an organisation checklist. + .DESCRIPTION + Deletes an organisation checklist via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Remove-NinjaOneOrganisationChecklist -checklistId 22 -Confirm:$false + + Deletes checklist 22. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/organisationchecklist + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoocl')] + [MetadataAttribute( + '/v2/organization/checklist/{checklistId}', + 'delete' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$checklistId + ) + process { + try { + $Resource = ('v2/organization/checklist/{0}' -f $checklistId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Checklist {0}' -f $checklistId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Checklist {0} deleted successfully.' -f $checklistId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklists.ps1 b/Source/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklists.ps1 new file mode 100644 index 0000000..7d7c49a --- /dev/null +++ b/Source/Public/OrganisationChecklists/Remove/Remove-NinjaOneOrganisationChecklists.ps1 @@ -0,0 +1,31 @@ +function Remove-NinjaOneOrganisationChecklists { + <# + .SYNOPSIS + Deletes organisation checklists. + .DESCRIPTION + Deletes organisation checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Remove-NinjaOneOrganisationChecklists -request @{ checklistIds = @(1,2) } -Confirm:$false + + Deletes the specified organisation checklists. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/organisationchecklists + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('rnOoCls')] + [MetadataAttribute( + '/v2/organization/checklists/delete', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Checklists','Delete')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/checklists/delete' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/OrganisationChecklists/Set/Set-NinjaOneOrganisationChecklists.ps1 b/Source/Public/OrganisationChecklists/Set/Set-NinjaOneOrganisationChecklists.ps1 new file mode 100644 index 0000000..b98fe8e --- /dev/null +++ b/Source/Public/OrganisationChecklists/Set/Set-NinjaOneOrganisationChecklists.ps1 @@ -0,0 +1,31 @@ +function Set-NinjaOneOrganisationChecklists { + <# + .SYNOPSIS + Updates organisation checklists. + .DESCRIPTION + Updates organisation checklists via the NinjaOne v2 API. + .FUNCTIONALITY + Organisation Checklists + .EXAMPLE + PS> Set-NinjaOneOrganisationChecklists -checklists @{ ... } + + Updates organisation checklists. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/organisationchecklists + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snoocl')] + [MetadataAttribute( + '/v2/organization/checklists', + 'put' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$checklists + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Checklists','Update')){ return (New-NinjaOnePUTRequest -Resource 'v2/organization/checklists' -Body $checklists) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentArchive.ps1 b/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentArchive.ps1 new file mode 100644 index 0000000..d802067 --- /dev/null +++ b/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentArchive.ps1 @@ -0,0 +1,15 @@ +function Invoke-NinjaOneOrganisationDocumentArchive { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOodA')] + [MetadataAttribute( + '/v2/organization/document/{clientDocumentId}/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$clientDocumentId + ) + process { try { $res='v2/organization/document/{0}/archive' -f $clientDocumentId; if($PSCmdlet.ShouldProcess(('Organisation Document {0}' -f $clientDocumentId),'Archive')){ return (New-NinjaOnePOSTRequest -Resource $res) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentRestore.ps1 b/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentRestore.ps1 new file mode 100644 index 0000000..76f2cc1 --- /dev/null +++ b/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentRestore.ps1 @@ -0,0 +1,15 @@ +function Invoke-NinjaOneOrganisationDocumentRestore { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOodR')] + [MetadataAttribute( + '/v2/organization/document/{clientDocumentId}/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$clientDocumentId + ) + process { try { $res='v2/organization/document/{0}/restore' -f $clientDocumentId; if($PSCmdlet.ShouldProcess(('Organisation Document {0}' -f $clientDocumentId),'Restore')){ return (New-NinjaOnePOSTRequest -Resource $res) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsArchive.ps1 b/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsArchive.ps1 new file mode 100644 index 0000000..5830514 --- /dev/null +++ b/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsArchive.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneOrganisationDocumentsArchive { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOodsA')] + [MetadataAttribute( + '/v2/organization/documents/archive', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Documents','Archive')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/documents/archive' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsRestore.ps1 b/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsRestore.ps1 new file mode 100644 index 0000000..5a3a56b --- /dev/null +++ b/Source/Public/OrganisationDocuments/Invoke/Invoke-NinjaOneOrganisationDocumentsRestore.ps1 @@ -0,0 +1,16 @@ +function Invoke-NinjaOneOrganisationDocumentsRestore { + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inOodsR')] + [MetadataAttribute( + '/v2/organization/documents/restore', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$request + ) + process { try { if($PSCmdlet.ShouldProcess('Organisation Documents','Restore')){ return (New-NinjaOnePOSTRequest -Resource 'v2/organization/documents/restore' -Body $request) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} + diff --git a/Source/Public/System/Get/Get-NinjaOneContact.ps1 b/Source/Public/System/Get/Get-NinjaOneContact.ps1 new file mode 100644 index 0000000..47b14b0 --- /dev/null +++ b/Source/Public/System/Get/Get-NinjaOneContact.ps1 @@ -0,0 +1,55 @@ +function Get-NinjaOneContact { + <# + .SYNOPSIS + Gets a system contact by Id. + .DESCRIPTION + Retrieves a system contact by Id from the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .EXAMPLE + PS> Get-NinjaOneContact -Id 123 + + Gets the system contact with Id 123. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/contact + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnocontact')] + [MetadataAttribute( + '/v2/contact/{id}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # The contact Id to retrieve. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('contactId')] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/contact/{0}' -f $id) + $RequestParams = @{ + Resource = $Resource + QSCollection = $QSCollection + } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { + return $Result + } else { + throw ('Contact with id {0} not found.' -f $id) + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} diff --git a/Source/Public/System/Get/Get-NinjaOneSystemContacts.ps1 b/Source/Public/System/Get/Get-NinjaOneSystemContacts.ps1 new file mode 100644 index 0000000..b379665 --- /dev/null +++ b/Source/Public/System/Get/Get-NinjaOneSystemContacts.ps1 @@ -0,0 +1,50 @@ +function Get-NinjaOneSystemContacts { + <# + .SYNOPSIS + Gets system contacts from the NinjaOne API. + .DESCRIPTION + Retrieves system contacts from the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .EXAMPLE + PS> Get-NinjaOneSystemContacts + + Gets all system contacts. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/contacts + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnosc')] + [MetadataAttribute( + '/v2/contacts', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param() + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = 'v2/contacts' + $RequestParams = @{ + Resource = $Resource + QSCollection = $QSCollection + } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { + return $Results + } else { + throw 'No system contacts found.' + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} + diff --git a/Source/Public/System/New/New-NinjaOneContact.ps1 b/Source/Public/System/New/New-NinjaOneContact.ps1 new file mode 100644 index 0000000..ce3b40f --- /dev/null +++ b/Source/Public/System/New/New-NinjaOneContact.ps1 @@ -0,0 +1,46 @@ +function New-NinjaOneContact { + <# + .SYNOPSIS + Creates a new system contact. + .DESCRIPTION + Creates a new system contact via the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .OUTPUTS + A PowerShell object containing the created contact. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/contact + .EXAMPLE + PS> New-NinjaOneContact -contact @{ firstName = 'Jane'; lastName = 'Doe'; email = 'jane@example.com' } + + Creates a new system contact. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoc')] + [MetadataAttribute( + '/v2/contacts', + 'post' + )] + Param( + # Contact object payload per API schema. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$contact + ) + process { + try { + $Resource = 'v2/contacts' + $RequestParams = @{ + Resource = $Resource + Body = $contact + } + if ($PSCmdlet.ShouldProcess('Contact', 'Create')) { + $Create = New-NinjaOnePOSTRequest @RequestParams + return $Create + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} diff --git a/Source/Public/System/Remove/Remove-NinjaOneContact.ps1 b/Source/Public/System/Remove/Remove-NinjaOneContact.ps1 new file mode 100644 index 0000000..9118a64 --- /dev/null +++ b/Source/Public/System/Remove/Remove-NinjaOneContact.ps1 @@ -0,0 +1,47 @@ +function Remove-NinjaOneContact { + <# + .SYNOPSIS + Removes a system contact. + .DESCRIPTION + Deletes a system contact via the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/contact + .EXAMPLE + PS> Remove-NinjaOneContact -Id 123 -Confirm:$false + + Deletes the system contact with Id 123. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoc')] + [MetadataAttribute( + '/v2/contact/{id}', + 'delete' + )] + Param( + # Contact Id to delete. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('contactId')] + [Int]$id + ) + process { + try { + $Resource = ('v2/contact/{0}' -f $id) + $RequestParams = @{ + Resource = $Resource + } + if ($PSCmdlet.ShouldProcess(('Contact {0}' -f $id), 'Delete')) { + $Delete = New-NinjaOneDELETERequest @RequestParams + if ($Delete -eq 204) { + Write-Information ('Contact {0} deleted successfully.' -f $id) + } + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} diff --git a/Source/Public/System/Set/Set-NinjaOneContact.ps1 b/Source/Public/System/Set/Set-NinjaOneContact.ps1 new file mode 100644 index 0000000..b72c779 --- /dev/null +++ b/Source/Public/System/Set/Set-NinjaOneContact.ps1 @@ -0,0 +1,49 @@ +function Set-NinjaOneContact { + <# + .SYNOPSIS + Updates a system contact. + .DESCRIPTION + Updates a system contact via the NinjaOne v2 API. + .FUNCTIONALITY + Contacts + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/contact + .EXAMPLE + PS> Set-NinjaOneContact -Id 123 -contact @{ phone = '+3100000000' } + + Updates the system contact with Id 123. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoc')] + [MetadataAttribute( + '/v2/contact/{id}', + 'patch' + )] + Param( + # Contact Id to update. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$id, + # Contact patch payload per API schema. + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$contact + ) + process { + try { + $Resource = ('v2/contact/{0}' -f $id) + $RequestParams = @{ + Resource = $Resource + Body = $contact + } + if ($PSCmdlet.ShouldProcess(('Contact {0}' -f $id), 'Update')) { + $Update = New-NinjaOnePATCHRequest @RequestParams + return $Update + } + } catch { + New-NinjaOneError -ErrorRecord $_ + } + } +} diff --git a/Source/Public/Tabs/Get/Get-NinjaOneTab.ps1 b/Source/Public/Tabs/Get/Get-NinjaOneTab.ps1 new file mode 100644 index 0000000..e044500 --- /dev/null +++ b/Source/Public/Tabs/Get/Get-NinjaOneTab.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneTab { + <# + .SYNOPSIS + Gets a tab by Id. + .DESCRIPTION + Retrieves a tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTab -tabId 5 + + Gets tab with Id 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotab')] + [MetadataAttribute( + '/v2/tab/{tabId}', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$tabId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}' -f $tabId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Tab {0} not found.' -f $tabId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Tabs/Get/Get-NinjaOneTabEndUser.ps1 b/Source/Public/Tabs/Get/Get-NinjaOneTabEndUser.ps1 new file mode 100644 index 0000000..955ed6f --- /dev/null +++ b/Source/Public/Tabs/Get/Get-NinjaOneTabEndUser.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneTabEndUser { + <# + .SYNOPSIS + Gets the end-user for a tab. + .DESCRIPTION + Retrieves the end-user associated with a tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabEndUser -tabId 5 + + Gets the end-user for tab Id 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-enduser + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabeu')] + [MetadataAttribute( + '/v2/tab/{tabId}/end-user', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$tabId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}/end-user' -f $tabId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('End-user for tab {0} not found.' -f $tabId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Tabs/Get/Get-NinjaOneTabOrganisation.ps1 b/Source/Public/Tabs/Get/Get-NinjaOneTabOrganisation.ps1 new file mode 100644 index 0000000..c687509 --- /dev/null +++ b/Source/Public/Tabs/Get/Get-NinjaOneTabOrganisation.ps1 @@ -0,0 +1,44 @@ +function Get-NinjaOneTabOrganisation { + <# + .SYNOPSIS + Gets the organisation for a tab. + .DESCRIPTION + Retrieves the organisation associated with a tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabOrganisation -tabId 5 + + Gets the organisation for tab Id 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-organisation + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabo', 'Get-NinjaOneTabOrganization')] + [MetadataAttribute( + '/v2/tab/{tabId}/organization', + 'get' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$tabId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}/organization' -f $tabId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Organisation for tab {0} not found.' -f $tabId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Tabs/Get/Get-NinjaOneTabRole.ps1 b/Source/Public/Tabs/Get/Get-NinjaOneTabRole.ps1 new file mode 100644 index 0000000..d980280 --- /dev/null +++ b/Source/Public/Tabs/Get/Get-NinjaOneTabRole.ps1 @@ -0,0 +1,48 @@ +function Get-NinjaOneTabRole { + <# + .SYNOPSIS + Gets a tab and extensions for a specific role. + .DESCRIPTION + Retrieves the requested tab along with any extensions based on the supplied role Id via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabRole -tabId 5 -roleId 10 + + Gets tab 5 with extensions as viewed by role 10. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-role + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabr')] + [MetadataAttribute( + '/v2/tab/{tabId}/role/{roleId}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$tabId, + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Int]$roleId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + if ($roleId) { $Parameters.Remove('roleId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}/role/{1}' -f $tabId, $roleId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Tab {0} for role {1} not found.' -f $tabId, $roleId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tabs/Get/Get-NinjaOneTabSummaryEndUser.ps1 b/Source/Public/Tabs/Get/Get-NinjaOneTabSummaryEndUser.ps1 new file mode 100644 index 0000000..c229e9b --- /dev/null +++ b/Source/Public/Tabs/Get/Get-NinjaOneTabSummaryEndUser.ps1 @@ -0,0 +1,35 @@ +function Get-NinjaOneTabSummaryEndUser { + <# + .SYNOPSIS + Gets the summary of custom tabs available to end-user views. + .DESCRIPTION + Retrieves a summary of the custom tabs available to end-user views via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabSummaryEndUser + + Gets the end-user custom tabs summary. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-summary-enduser + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabse')] + [MetadataAttribute( + '/v2/tab/summary/end-user', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/tab/summary/end-user' + $RequestParams = @{ Resource = $Resource } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw 'No end-user tab summary found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tabs/Get/Get-NinjaOneTabSummaryOrganisation.ps1 b/Source/Public/Tabs/Get/Get-NinjaOneTabSummaryOrganisation.ps1 new file mode 100644 index 0000000..d414043 --- /dev/null +++ b/Source/Public/Tabs/Get/Get-NinjaOneTabSummaryOrganisation.ps1 @@ -0,0 +1,35 @@ +function Get-NinjaOneTabSummaryOrganisation { + <# + .SYNOPSIS + Gets the summary of custom tabs available to organisation views. + .DESCRIPTION + Retrieves a summary of the custom tabs available to organisation views via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabSummaryOrganisation + + Gets the organisation custom tabs summary. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-summary-organisation + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabso','Get-NinjaOneTabSummaryOrganization')] + [MetadataAttribute( + '/v2/tab/summary/organization', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/tab/summary/organization' + $RequestParams = @{ Resource = $Resource } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw 'No organisation tab summary found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tabs/Get/Get-NinjaOneTabSummaryRole.ps1 b/Source/Public/Tabs/Get/Get-NinjaOneTabSummaryRole.ps1 new file mode 100644 index 0000000..a14fcd2 --- /dev/null +++ b/Source/Public/Tabs/Get/Get-NinjaOneTabSummaryRole.ps1 @@ -0,0 +1,46 @@ +function Get-NinjaOneTabSummaryRole { + <# + .SYNOPSIS + Gets the summary of custom tabs for a specified role. + .DESCRIPTION + Retrieves a summary of the custom tabs and extensions as viewed by the specified role via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Get-NinjaOneTabSummaryRole -roleId 10 + + Gets the custom tabs summary for role Id 10. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tab-summary-role + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotabsr')] + [MetadataAttribute( + '/v2/tab/summary/role/{roleId}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + # Role Id to retrieve tab summary for. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$roleId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($roleId) { $Parameters.Remove('roleId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/summary/role/{0}' -f $roleId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('No tab summary found for role {0}.' -f $roleId) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tabs/New/New-NinjaOneTab.ps1 b/Source/Public/Tabs/New/New-NinjaOneTab.ps1 new file mode 100644 index 0000000..e0b09d7 --- /dev/null +++ b/Source/Public/Tabs/New/New-NinjaOneTab.ps1 @@ -0,0 +1,36 @@ +function New-NinjaOneTab { + <# + .SYNOPSIS + Creates a new custom tab. + .DESCRIPTION + Creates a new custom tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> New-NinjaOneTab -tab @{ name='My Tab'; scope='ORGANIZATION' } + + Creates a new tab. + .OUTPUTS + A PowerShell object containing the created tab. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/tab + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('nnotab')] + [MetadataAttribute( + '/v2/tab', + 'post' + )] + Param( + # Payload to create tab per API schema + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tab + ) + process { + try { + if($PSCmdlet.ShouldProcess('Tab','Create')){ return (New-NinjaOnePOSTRequest -Resource 'v2/tab' -Body $tab) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Tabs/Remove/Remove-NinjaOneTab.ps1 b/Source/Public/Tabs/Remove/Remove-NinjaOneTab.ps1 new file mode 100644 index 0000000..0fb4038 --- /dev/null +++ b/Source/Public/Tabs/Remove/Remove-NinjaOneTab.ps1 @@ -0,0 +1,46 @@ +function Remove-NinjaOneTab { + <# + .SYNOPSIS + Removes a custom tab. + .DESCRIPTION + Deletes a custom tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Remove-NinjaOneTab -tabId 5 -Confirm:$false + + Deletes tab 5. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/tab + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnotab')] + [MetadataAttribute( + '/v2/tab/{tabId}', + 'delete' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$tabId + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($tabId) { $Parameters.Remove('tabId') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/tab/{0}' -f $tabId) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + if ($PSCmdlet.ShouldProcess(('Tab {0}' -f $tabId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Tab {0} deleted successfully.' -f $tabId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tabs/Set/Rename-NinjaOneTab.ps1 b/Source/Public/Tabs/Set/Rename-NinjaOneTab.ps1 new file mode 100644 index 0000000..91c188a --- /dev/null +++ b/Source/Public/Tabs/Set/Rename-NinjaOneTab.ps1 @@ -0,0 +1,36 @@ +function Rename-NinjaOneTab { + <# + .SYNOPSIS + Renames a custom tab. + .DESCRIPTION + Renames a custom tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Rename-NinjaOneTab -rename @{ tabId = 5; name = 'New Name' } + + Renames tab 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-rename + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('rnotab')] + [MetadataAttribute( + '/v2/tab/rename', + 'patch' + )] + Param( + # Payload e.g. @{ tabId = 5; name = 'New Name' } + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$rename + ) + process { + try { + if($PSCmdlet.ShouldProcess('Tab','Rename')){ return (New-NinjaOnePATCHRequest -Resource 'v2/tab/rename' -Body $rename) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Tabs/Set/Set-NinjaOneTab.ps1 b/Source/Public/Tabs/Set/Set-NinjaOneTab.ps1 new file mode 100644 index 0000000..bb1c143 --- /dev/null +++ b/Source/Public/Tabs/Set/Set-NinjaOneTab.ps1 @@ -0,0 +1,38 @@ +function Set-NinjaOneTab { + <# + .SYNOPSIS + Updates a custom tab. + .DESCRIPTION + Updates a custom tab via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTab -tabId 5 -tab @{ name = 'New Name' } + + Updates tab 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snotab')] + [MetadataAttribute( + '/v2/tab/{tabId}', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$tabId, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tab + ) + process { + try { + $res='v2/tab/{0}' -f $tabId + if($PSCmdlet.ShouldProcess(('Tab {0}' -f $tabId),'Update')){ return (New-NinjaOnePATCHRequest -Resource $res -Body $tab) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Tabs/Set/Set-NinjaOneTabEndUserOrder.ps1 b/Source/Public/Tabs/Set/Set-NinjaOneTabEndUserOrder.ps1 new file mode 100644 index 0000000..98f063c --- /dev/null +++ b/Source/Public/Tabs/Set/Set-NinjaOneTabEndUserOrder.ps1 @@ -0,0 +1,45 @@ +function Set-NinjaOneTabEndUserOrder { + <# + .SYNOPSIS + Updates the order of custom tabs for end-user tabs. + .DESCRIPTION + Updates the order of custom tabs for end-user tabs via the NinjaOne v2 API. NOTE: All tabs defined for end-users must be specified in the payload. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTabEndUserOrder -order @( + @{ tabId = 1; order = 1 }, + @{ tabId = 2; order = 2 } + ) + + Sets the order of the end-user tabs. + .OUTPUTS + Status code or updated order data per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-enduser-order + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotabeuo')] + [MetadataAttribute( + '/v2/tab/end-user/order', + 'patch' + )] + Param( + # Array payload specifying the tab order per API schema (CustomTabsOrderPublicApiDTO[]) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$order + ) + process { + try { + $Resource = 'v2/tab/end-user/order' + $RequestParams = @{ Resource = $Resource; Body = $order } + if ($PSCmdlet.ShouldProcess('End-user Tabs', 'Update Order')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tabs/Set/Set-NinjaOneTabOrganisationOrder.ps1 b/Source/Public/Tabs/Set/Set-NinjaOneTabOrganisationOrder.ps1 new file mode 100644 index 0000000..bbd237b --- /dev/null +++ b/Source/Public/Tabs/Set/Set-NinjaOneTabOrganisationOrder.ps1 @@ -0,0 +1,45 @@ +function Set-NinjaOneTabOrganisationOrder { + <# + .SYNOPSIS + Updates the order of custom tabs for organizations and locations. + .DESCRIPTION + Updates the order of custom tabs for organization/location tabs via the NinjaOne v2 API. NOTE: All org tabs must be specified. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTabOrganisationOrder -order @( + @{ tabId = 1; order = 1 }, + @{ tabId = 2; order = 2 } + ) + + Sets the organization tabs order. + .OUTPUTS + Updated order data per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-organization-order + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotaboo')] + [MetadataAttribute( + '/v2/tab/organization/order', + 'patch' + )] + Param( + # Array payload specifying the tab ordering (CustomTabsOrderPublicApiDTO[]) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$order + ) + process { + try { + $Resource = 'v2/tab/organization/order' + $RequestParams = @{ Resource = $Resource; Body = $order } + if ($PSCmdlet.ShouldProcess('Organization Tabs', 'Update Order')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tabs/Set/Set-NinjaOneTabRoleOrder.ps1 b/Source/Public/Tabs/Set/Set-NinjaOneTabRoleOrder.ps1 new file mode 100644 index 0000000..b891127 --- /dev/null +++ b/Source/Public/Tabs/Set/Set-NinjaOneTabRoleOrder.ps1 @@ -0,0 +1,47 @@ +function Set-NinjaOneTabRoleOrder { + <# + .SYNOPSIS + Updates the order of custom tabs for a specific role. + .DESCRIPTION + Updates the order of custom tabs for a role via the NinjaOne v2 API. NOTE: Only tabs created on this role can be ordered. All tabs on the role must be specified. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTabRoleOrder -roleId 10 -order @( + @{ tabId = 1; order = 1 }, + @{ tabId = 2; order = 2 } + ) + + Sets the role tabs order for role 10. + .OUTPUTS + Updated order data per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-role-order + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotabro')] + [MetadataAttribute( + '/v2/tab/role/{roleId}/order', + 'patch' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$roleId, + # Array payload specifying the tab ordering (CustomTabsOrderPublicApiDTO[]) + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$order + ) + process { + try { + $Resource = ('v2/tab/role/{0}/order' -f $roleId) + $RequestParams = @{ Resource = $Resource; Body = $order } + if ($PSCmdlet.ShouldProcess(('Role {0}' -f $roleId), 'Update Tab Order')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tabs/Set/Set-NinjaOneTabRoleVisibility.ps1 b/Source/Public/Tabs/Set/Set-NinjaOneTabRoleVisibility.ps1 new file mode 100644 index 0000000..ab97791 --- /dev/null +++ b/Source/Public/Tabs/Set/Set-NinjaOneTabRoleVisibility.ps1 @@ -0,0 +1,47 @@ +function Set-NinjaOneTabRoleVisibility { + <# + .SYNOPSIS + Sets tab visibility for a role. + .DESCRIPTION + Configures tab visibility for a specific role via the NinjaOne v2 API. + .FUNCTIONALITY + Tabs + .EXAMPLE + PS> Set-NinjaOneTabRoleVisibility -roleId 10 -visibility @( + @{ tabId = 1; visible = $true }, + @{ tabId = 2; visible = $false } + ) + + Sets visibility for tabs on role 10. + .OUTPUTS + Updated visibility data per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tab-role-visibility + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotabrv')] + [MetadataAttribute( + '/v2/tab/role/{roleId}/visibility', + 'patch' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$roleId, + # Array payload (CustomTabsVisibilityPublicApiDTO[]) + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$visibility + ) + process { + try { + $Resource = ('v2/tab/role/{0}/visibility' -f $roleId) + $RequestParams = @{ Resource = $Resource; Body = $visibility } + if ($PSCmdlet.ShouldProcess(('Role {0}' -f $roleId), 'Set Tab Visibility')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tags/Get/Get-NinjaOneTags.ps1 b/Source/Public/Tags/Get/Get-NinjaOneTags.ps1 new file mode 100644 index 0000000..82ea4b0 --- /dev/null +++ b/Source/Public/Tags/Get/Get-NinjaOneTags.ps1 @@ -0,0 +1,32 @@ +function Get-NinjaOneTags { + <# + .SYNOPSIS + Gets all tags. + .DESCRIPTION + Retrieves all tags via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Get-NinjaOneTags + + Gets all tags. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/tags + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotags')] + [MetadataAttribute( + '/v2/tag', + 'get' + )] + Param() + process { + try { + $RequestParams = @{ Resource = 'v2/tag' } + return (New-NinjaOneGETRequest @RequestParams) + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Tags/New/New-NinjaOneTag.ps1 b/Source/Public/Tags/New/New-NinjaOneTag.ps1 new file mode 100644 index 0000000..a40f272 --- /dev/null +++ b/Source/Public/Tags/New/New-NinjaOneTag.ps1 @@ -0,0 +1,45 @@ +function New-NinjaOneTag { + <# + .SYNOPSIS + Creates a new asset tag. + .DESCRIPTION + Creates a new asset tag for the specified asset type via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> New-NinjaOneTag -assetType 'NODE' -tag @{ name = 'Critical'; color = '#FF0000' } + + Creates a new tag named 'Critical' for asset type NODE. + .OUTPUTS + A PowerShell object containing the created tag. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/tag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnotag')] + [MetadataAttribute( + '/v2/tag/{assetType}', + 'post' + )] + Param( + # The asset type the tag applies to (e.g. NODE, ORGANIZATION, LOCATION). + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [String]$assetType, + # The tag object payload per API schema. + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tag + ) + process { + try { + $Resource = ('v2/tag/{0}' -f $assetType) + $RequestParams = @{ Resource = $Resource; Body = $tag } + if ($PSCmdlet.ShouldProcess(('Tag for {0}' -f $assetType), 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tags/New/New-NinjaOneTagGlobal.ps1 b/Source/Public/Tags/New/New-NinjaOneTagGlobal.ps1 new file mode 100644 index 0000000..bc69639 --- /dev/null +++ b/Source/Public/Tags/New/New-NinjaOneTagGlobal.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneTagGlobal { + <# + .SYNOPSIS + Creates a new tag. + .DESCRIPTION + Creates a new tag via the NinjaOne v2 API (global endpoint without assetType in path). + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> New-NinjaOneTagGlobal -tag @{ name = 'Critical'; color = '#FF0000' } + + Creates a new tag. + .OUTPUTS + A PowerShell object containing the created tag. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/tag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnotagg')] + [MetadataAttribute( + '/v2/tag', + 'post' + )] + Param( + # Tag payload per API schema + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tag + ) + process { + try { + $Resource = 'v2/tag' + $RequestParams = @{ Resource = $Resource; Body = $tag } + if ($PSCmdlet.ShouldProcess('Tag', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tags/Remove/Remove-NinjaOneTag.ps1 b/Source/Public/Tags/Remove/Remove-NinjaOneTag.ps1 new file mode 100644 index 0000000..ca96fc2 --- /dev/null +++ b/Source/Public/Tags/Remove/Remove-NinjaOneTag.ps1 @@ -0,0 +1,39 @@ +function Remove-NinjaOneTag { + <# + .SYNOPSIS + Deletes a tag. + .DESCRIPTION + Deletes a tag via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Remove-NinjaOneTag -tagId 12 -Confirm:$false + + Deletes the tag with Id 12. + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/tag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnotag')] + [MetadataAttribute( + '/v2/tag/{tagId}', + 'delete' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$tagId + ) + process { + try { + $Resource = ('v2/tag/{0}' -f $tagId) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Tag {0}' -f $tagId), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Tag {0} deleted successfully.' -f $tagId) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Tags/Remove/Remove-NinjaOneTags.ps1 b/Source/Public/Tags/Remove/Remove-NinjaOneTags.ps1 new file mode 100644 index 0000000..b698cd3 --- /dev/null +++ b/Source/Public/Tags/Remove/Remove-NinjaOneTags.ps1 @@ -0,0 +1,42 @@ +function Remove-NinjaOneTags { + <# + .SYNOPSIS + Deletes asset tags. + .DESCRIPTION + Deletes one or more tags via the NinjaOne v2 API using a POST delete endpoint. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Remove-NinjaOneTags -deleteRequest @{ tagIds = @(1,2,3) } + + Deletes tags with Ids 1,2,3. + .OUTPUTS + Status code (usually 200/204) per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/tags + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnotags')] + [MetadataAttribute( + '/v2/tag/delete', + 'post' + )] + Param( + # Delete request payload as per API schema (e.g. tagIds array) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$deleteRequest + ) + process { + try { + $Resource = 'v2/tag/delete' + $RequestParams = @{ Resource = $Resource; Body = $deleteRequest } + if ($PSCmdlet.ShouldProcess('Tags', 'Delete')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tags/Set/Merge-NinjaOneTags.ps1 b/Source/Public/Tags/Set/Merge-NinjaOneTags.ps1 new file mode 100644 index 0000000..8cecb46 --- /dev/null +++ b/Source/Public/Tags/Set/Merge-NinjaOneTags.ps1 @@ -0,0 +1,42 @@ +function Merge-NinjaOneTags { + <# + .SYNOPSIS + Merges asset tags. + .DESCRIPTION + Merges tags via the NinjaOne v2 API using the tag merge endpoint. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Merge-NinjaOneTags -mergeRequest @{ sourceTagIds = @(5,6); targetTagId = 1 } + + Merges tags 5 and 6 into tag 1. + .OUTPUTS + Status code or merged tag per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tag-merge + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('mnotags')] + [MetadataAttribute( + '/v2/tag/merge', + 'post' + )] + Param( + # Merge request payload as per API schema (source/target tag ids) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$mergeRequest + ) + process { + try { + $Resource = 'v2/tag/merge' + $RequestParams = @{ Resource = $Resource; Body = $mergeRequest } + if ($PSCmdlet.ShouldProcess('Tags', 'Merge')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tags/Set/Set-NinjaOneAssetTag.ps1 b/Source/Public/Tags/Set/Set-NinjaOneAssetTag.ps1 new file mode 100644 index 0000000..de93fb0 --- /dev/null +++ b/Source/Public/Tags/Set/Set-NinjaOneAssetTag.ps1 @@ -0,0 +1,48 @@ +function Set-NinjaOneAssetTag { + <# + .SYNOPSIS + Updates tag assignments for an asset. + .DESCRIPTION + Updates tags for a specific asset type and asset Id via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Set-NinjaOneAssetTag -assetType 'NODE' -assetId 123 -tagAssignment @{ tagIds = @(1,2) } + + Assigns tags 1 and 2 to node 123. + .OUTPUTS + Status code or updated assignment per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/assettag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoatag')] + [MetadataAttribute( + '/v2/tag/{assetType}/{assetId}', + 'put' + )] + Param( + # Asset type (e.g. NODE, ORGANIZATION, LOCATION) + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [String]$assetType, + # Asset Id + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Int]$assetId, + # Tag assignment payload + [Parameter(Mandatory, Position = 2, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tagAssignment + ) + process { + try { + $Resource = ('v2/tag/{0}/{1}' -f $assetType, $assetId) + $RequestParams = @{ Resource = $Resource; Body = $tagAssignment } + if ($PSCmdlet.ShouldProcess(('{0} {1}' -f $assetType, $assetId), 'Update Tags')) { + $Result = New-NinjaOnePUTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Tags/Set/Set-NinjaOneTag.ps1 b/Source/Public/Tags/Set/Set-NinjaOneTag.ps1 new file mode 100644 index 0000000..a028a59 --- /dev/null +++ b/Source/Public/Tags/Set/Set-NinjaOneTag.ps1 @@ -0,0 +1,46 @@ +function Set-NinjaOneTag { + <# + .SYNOPSIS + Updates an asset tag. + .DESCRIPTION + Updates an existing tag via the NinjaOne v2 API. + .FUNCTIONALITY + Asset Tags + .EXAMPLE + PS> Set-NinjaOneTag -tagId 12 -tag @{ name = 'Priority-1' } + + Updates the tag with Id 12. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/tag + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotag')] + [MetadataAttribute( + '/v2/tag/{tagId}', + 'put' + )] + Param( + # The tag Id to update. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('id')] + [Int]$tagId, + # The tag update payload. + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$tag + ) + process { + try { + $Resource = ('v2/tag/{0}' -f $tagId) + $RequestParams = @{ Resource = $Resource; Body = $tag } + if ($PSCmdlet.ShouldProcess(('Tag {0}' -f $tagId), 'Update')) { + $Result = New-NinjaOnePUTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Users/Get/Get-NinjaOneEndUser.ps1 b/Source/Public/Users/Get/Get-NinjaOneEndUser.ps1 new file mode 100644 index 0000000..241b07f --- /dev/null +++ b/Source/Public/Users/Get/Get-NinjaOneEndUser.ps1 @@ -0,0 +1,45 @@ +function Get-NinjaOneEndUser { + <# + .SYNOPSIS + Gets an end user by Id. + .DESCRIPTION + Retrieves a specific end user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneEndUser -Id 101 + + Gets the end user with Id 101. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/enduser + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoeu')] + [MetadataAttribute( + '/v2/user/end-user/{id}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/user/end-user/{0}' -f $id) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('End user {0} not found.' -f $id) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Users/Get/Get-NinjaOneEndUserCustomFields.ps1 b/Source/Public/Users/Get/Get-NinjaOneEndUserCustomFields.ps1 new file mode 100644 index 0000000..0cf7a9b --- /dev/null +++ b/Source/Public/Users/Get/Get-NinjaOneEndUserCustomFields.ps1 @@ -0,0 +1,45 @@ +function Get-NinjaOneEndUserCustomFields { + <# + .SYNOPSIS + Gets custom fields for an end user. + .DESCRIPTION + Retrieves the list of custom fields for an end user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneEndUserCustomFields -Id 101 + + Gets custom fields for end user 101. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/enduser-customfields + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoeucf')] + [MetadataAttribute( + '/v2/user/end-user/{id}/custom-fields', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/user/end-user/{0}/custom-fields' -f $id) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('No custom fields found for end user {0}.' -f $id) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Users/Get/Get-NinjaOneEndUsers.ps1 b/Source/Public/Users/Get/Get-NinjaOneEndUsers.ps1 new file mode 100644 index 0000000..0378ae0 --- /dev/null +++ b/Source/Public/Users/Get/Get-NinjaOneEndUsers.ps1 @@ -0,0 +1,35 @@ +function Get-NinjaOneEndUsers { + <# + .SYNOPSIS + Gets all end users. + .DESCRIPTION + Retrieves all end users via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneEndUsers + + Gets all end users. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/endusers + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnoeus')] + [MetadataAttribute( + '/v2/user/end-users', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/user/end-users' + $RequestParams = @{ Resource = $Resource } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw 'No end users found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Users/Get/Get-NinjaOneTechnician.ps1 b/Source/Public/Users/Get/Get-NinjaOneTechnician.ps1 new file mode 100644 index 0000000..6d9a81b --- /dev/null +++ b/Source/Public/Users/Get/Get-NinjaOneTechnician.ps1 @@ -0,0 +1,45 @@ +function Get-NinjaOneTechnician { + <# + .SYNOPSIS + Gets a technician by Id. + .DESCRIPTION + Retrieves a specific technician via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneTechnician -Id 77 + + Gets the technician with Id 77. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/technician + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotec')] + [MetadataAttribute( + '/v2/user/technician/{id}', + 'get' + )] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Uses dynamic parameter parsing.')] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + begin { + $CommandName = $MyInvocation.InvocationName + $Parameters = (Get-Command -Name $CommandName).Parameters + if ($id) { $Parameters.Remove('id') | Out-Null } + $QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters + } + process { + try { + $Resource = ('v2/user/technician/{0}' -f $id) + $RequestParams = @{ Resource = $Resource; QSCollection = $QSCollection } + $Result = New-NinjaOneGETRequest @RequestParams + if ($Result) { return $Result } else { throw ('Technician {0} not found.' -f $id) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Users/Get/Get-NinjaOneTechnicians.ps1 b/Source/Public/Users/Get/Get-NinjaOneTechnicians.ps1 new file mode 100644 index 0000000..8b03b7f --- /dev/null +++ b/Source/Public/Users/Get/Get-NinjaOneTechnicians.ps1 @@ -0,0 +1,35 @@ +function Get-NinjaOneTechnicians { + <# + .SYNOPSIS + Gets all technicians. + .DESCRIPTION + Retrieves all technicians via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneTechnicians + + Gets all technicians. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/technicians + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnotecs')] + [MetadataAttribute( + '/v2/user/technicians', + 'get' + )] + Param() + process { + try { + $Resource = 'v2/user/technicians' + $RequestParams = @{ Resource = $Resource } + $Results = New-NinjaOneGETRequest @RequestParams + if ($Results) { return $Results } else { throw 'No technicians found.' } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Users/Get/Get-NinjaOneUserRoles.ps1 b/Source/Public/Users/Get/Get-NinjaOneUserRoles.ps1 new file mode 100644 index 0000000..b2e6179 --- /dev/null +++ b/Source/Public/Users/Get/Get-NinjaOneUserRoles.ps1 @@ -0,0 +1,31 @@ +function Get-NinjaOneUserRoles { + <# + .SYNOPSIS + Gets user roles. + .DESCRIPTION + Retrieves all user roles via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Get-NinjaOneUserRoles + + Gets all user roles. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/userroles + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnour')] + [MetadataAttribute( + '/v2/user/roles', + 'get' + )] + Param() + process { + try { + return (New-NinjaOneGETRequest -Resource 'v2/user/roles') + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Users/New/New-NinjaOneEndUser.ps1 b/Source/Public/Users/New/New-NinjaOneEndUser.ps1 new file mode 100644 index 0000000..00cac13 --- /dev/null +++ b/Source/Public/Users/New/New-NinjaOneEndUser.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneEndUser { + <# + .SYNOPSIS + Creates a new end user. + .DESCRIPTION + Creates a new end user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> New-NinjaOneEndUser -endUser @{ firstName = 'Jane'; lastName = 'Doe'; email = 'jane@example.com' } + + Creates a new end user. + .OUTPUTS + A PowerShell object containing the created end user. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/enduser + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnoeu')] + [MetadataAttribute( + '/v2/user/end-users', + 'post' + )] + Param( + # End user payload per API schema. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$endUser + ) + process { + try { + $Resource = 'v2/user/end-users' + $RequestParams = @{ Resource = $Resource; Body = $endUser } + if ($PSCmdlet.ShouldProcess('EndUser', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Users/New/New-NinjaOneTechnician.ps1 b/Source/Public/Users/New/New-NinjaOneTechnician.ps1 new file mode 100644 index 0000000..ffbe040 --- /dev/null +++ b/Source/Public/Users/New/New-NinjaOneTechnician.ps1 @@ -0,0 +1,42 @@ +function New-NinjaOneTechnician { + <# + .SYNOPSIS + Creates a new technician. + .DESCRIPTION + Creates a new technician via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> New-NinjaOneTechnician -technician @{ firstName = 'John'; lastName = 'Smith'; email = 'john@example.com' } + + Creates a new technician. + .OUTPUTS + A PowerShell object containing the created technician. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/New/technician + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('nnotec')] + [MetadataAttribute( + '/v2/user/technicians', + 'post' + )] + Param( + # Technician payload per API schema. + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$technician + ) + process { + try { + $Resource = 'v2/user/technicians' + $RequestParams = @{ Resource = $Resource; Body = $technician } + if ($PSCmdlet.ShouldProcess('Technician', 'Create')) { + $Result = New-NinjaOnePOSTRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Users/Remove/Remove-NinjaOneEndUser.ps1 b/Source/Public/Users/Remove/Remove-NinjaOneEndUser.ps1 new file mode 100644 index 0000000..239b93c --- /dev/null +++ b/Source/Public/Users/Remove/Remove-NinjaOneEndUser.ps1 @@ -0,0 +1,40 @@ +function Remove-NinjaOneEndUser { + <# + .SYNOPSIS + Removes an end-user. + .DESCRIPTION + Deletes an end-user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/enduser + .EXAMPLE + PS> Remove-NinjaOneEndUser -Id 42 -Confirm:$false + + Deletes the end-user with Id 42. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnoeu')] + [MetadataAttribute( + '/v2/user/end-user/{id}', + 'delete' + )] + Param( + # End-user Id to delete. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + process { + try { + $Resource = ('v2/user/end-user/{0}' -f $id) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('End-user {0}' -f $id), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('End-user {0} deleted successfully.' -f $id) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Users/Remove/Remove-NinjaOneTechnician.ps1 b/Source/Public/Users/Remove/Remove-NinjaOneTechnician.ps1 new file mode 100644 index 0000000..13712ed --- /dev/null +++ b/Source/Public/Users/Remove/Remove-NinjaOneTechnician.ps1 @@ -0,0 +1,40 @@ +function Remove-NinjaOneTechnician { + <# + .SYNOPSIS + Removes a technician user. + .DESCRIPTION + Deletes a technician user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .OUTPUTS + Status code (204) on success. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Remove/technician + .EXAMPLE + PS> Remove-NinjaOneTechnician -Id 7 -Confirm:$false + + Deletes the technician user with Id 7. + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('rnot')] + [MetadataAttribute( + '/v2/user/technician/{id}', + 'delete' + )] + Param( + # Technician Id to delete. + [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [Int]$id + ) + process { + try { + $Resource = ('v2/user/technician/{0}' -f $id) + $RequestParams = @{ Resource = $Resource } + if ($PSCmdlet.ShouldProcess(('Technician {0}' -f $id), 'Delete')) { + $Response = New-NinjaOneDELETERequest @RequestParams + if ($Response -eq 204) { Write-Information ('Technician {0} deleted successfully.' -f $id) } + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Users/Set/Add-NinjaOneUserRoleMembers.ps1 b/Source/Public/Users/Set/Add-NinjaOneUserRoleMembers.ps1 new file mode 100644 index 0000000..5165ef1 --- /dev/null +++ b/Source/Public/Users/Set/Add-NinjaOneUserRoleMembers.ps1 @@ -0,0 +1,38 @@ +function Add-NinjaOneUserRoleMembers { + <# + .SYNOPSIS + Adds members to a user role. + .DESCRIPTION + Adds one or more members to the specified user role via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Add-NinjaOneUserRoleMembers -roleId 10 -members @{ userIds = @(1,2) } + + Adds users 1 and 2 to role 10. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/userrole-addmembers + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('anourm')] + [MetadataAttribute( + '/v2/user/role/{roleId}/add-members', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$roleId, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$members + ) + process { + try { + $res='v2/user/role/{0}/add-members' -f $roleId + if($PSCmdlet.ShouldProcess(('Role {0}' -f $roleId),'Add Members')){ return (New-NinjaOnePATCHRequest -Resource $res -Body $members) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Users/Set/Remove-NinjaOneUserRoleMembers.ps1 b/Source/Public/Users/Set/Remove-NinjaOneUserRoleMembers.ps1 new file mode 100644 index 0000000..472924b --- /dev/null +++ b/Source/Public/Users/Set/Remove-NinjaOneUserRoleMembers.ps1 @@ -0,0 +1,38 @@ +function Remove-NinjaOneUserRoleMembers { + <# + .SYNOPSIS + Removes members from a user role. + .DESCRIPTION + Removes one of more members from the specified user role via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Remove-NinjaOneUserRoleMembers -roleId 10 -members @{ userIds = @(1,2) } -Confirm:$false + + Removes users 1 and 2 from role 10. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/userrole-removemembers + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('rnourm')] + [MetadataAttribute( + '/v2/user/role/{roleId}/remove-members', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$roleId, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$members + ) + process { + try { + $res='v2/user/role/{0}/remove-members' -f $roleId + if($PSCmdlet.ShouldProcess(('Role {0}' -f $roleId),'Remove Members')){ return (New-NinjaOnePATCHRequest -Resource $res -Body $members) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Users/Set/Set-NinjaOneEndUser.ps1 b/Source/Public/Users/Set/Set-NinjaOneEndUser.ps1 new file mode 100644 index 0000000..3d3c664 --- /dev/null +++ b/Source/Public/Users/Set/Set-NinjaOneEndUser.ps1 @@ -0,0 +1,43 @@ +function Set-NinjaOneEndUser { + <# + .SYNOPSIS + Updates an end user. + .DESCRIPTION + Updates an end user via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Set-NinjaOneEndUser -Id 101 -endUser @{ phone = '+3100000000' } + + Updates the end user 101. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/enduser + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snoeu')] + [MetadataAttribute( + '/v2/user/end-user/{id}', + 'patch' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$id, + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$endUser + ) + process { + try { + $Resource = ('v2/user/end-user/{0}' -f $id) + $RequestParams = @{ Resource = $Resource; Body = $endUser } + if ($PSCmdlet.ShouldProcess(('End user {0}' -f $id), 'Update')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Users/Set/Set-NinjaOneEndUserCustomFields.ps1 b/Source/Public/Users/Set/Set-NinjaOneEndUserCustomFields.ps1 new file mode 100644 index 0000000..d4dd2f1 --- /dev/null +++ b/Source/Public/Users/Set/Set-NinjaOneEndUserCustomFields.ps1 @@ -0,0 +1,38 @@ +function Set-NinjaOneEndUserCustomFields { + <# + .SYNOPSIS + Updates custom fields for an end user. + .DESCRIPTION + Updates end user custom fields via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Set-NinjaOneEndUserCustomFields -Id 101 -customFields @{ field1='value' } + + Updates custom fields for end user 101. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/enduser-customfields + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('snoeucf')] + [MetadataAttribute( + '/v2/user/end-user/{id}/custom-fields', + 'patch' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Int]$id, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$customFields + ) + process { + try { + $res='v2/user/end-user/{0}/custom-fields' -f $id + if($PSCmdlet.ShouldProcess(('End user {0}' -f $id),'Update Custom Fields')){ return (New-NinjaOnePATCHRequest -Resource $res -Body $customFields) } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} diff --git a/Source/Public/Users/Set/Set-NinjaOneTechnician.ps1 b/Source/Public/Users/Set/Set-NinjaOneTechnician.ps1 new file mode 100644 index 0000000..a7f6c9d --- /dev/null +++ b/Source/Public/Users/Set/Set-NinjaOneTechnician.ps1 @@ -0,0 +1,43 @@ +function Set-NinjaOneTechnician { + <# + .SYNOPSIS + Updates a technician. + .DESCRIPTION + Updates a technician via the NinjaOne v2 API. + .FUNCTIONALITY + Users + .EXAMPLE + PS> Set-NinjaOneTechnician -Id 77 -technician @{ phone = '+3100000000' } + + Updates the technician 77. + .OUTPUTS + Status code or updated resource per API. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Set/technician + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] + [OutputType([Object])] + [Alias('snotec')] + [MetadataAttribute( + '/v2/user/technician/{id}', + 'patch' + )] + Param( + [Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)] + [Int]$id, + [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$technician + ) + process { + try { + $Resource = ('v2/user/technician/{0}' -f $id) + $RequestParams = @{ Resource = $Resource; Body = $technician } + if ($PSCmdlet.ShouldProcess(('Technician {0}' -f $id), 'Update')) { + $Result = New-NinjaOnePATCHRequest @RequestParams + return $Result + } + } catch { New-NinjaOneError -ErrorRecord $_ } + } +} + diff --git a/Source/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroup.ps1 b/Source/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroup.ps1 new file mode 100644 index 0000000..cda7a55 --- /dev/null +++ b/Source/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroup.ps1 @@ -0,0 +1,31 @@ +function Get-NinjaOneVulnerabilityScanGroup { + <# + .SYNOPSIS + Gets a vulnerability scan group by Id. + .DESCRIPTION + Retrieves a specific vulnerability scan group via the NinjaOne v2 API. + .FUNCTIONALITY + Vulnerability Management + .EXAMPLE + PS> Get-NinjaOneVulnerabilityScanGroup -scan_group_id 5 + + Gets scan group 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/vulnerability-scangroup + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnovsg1')] + [MetadataAttribute( + '/v2/vulnerability/scan-groups/{scan-group-id}', + 'get' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('scanGroupId')] + [Int]$scan_group_id + ) + process { try { $res='v2/vulnerability/scan-groups/{0}' -f $scan_group_id; return (New-NinjaOneGETRequest -Resource $res) } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroups.ps1 b/Source/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroups.ps1 new file mode 100644 index 0000000..47b7b0a --- /dev/null +++ b/Source/Public/Vulnerability/Get/Get-NinjaOneVulnerabilityScanGroups.ps1 @@ -0,0 +1,27 @@ +function Get-NinjaOneVulnerabilityScanGroups { + <# + .SYNOPSIS + Gets vulnerability scan groups. + .DESCRIPTION + Retrieves all vulnerability scan groups via the NinjaOne v2 API. + .FUNCTIONALITY + Vulnerability Management + .EXAMPLE + PS> Get-NinjaOneVulnerabilityScanGroups + + Gets all scan groups. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/vulnerability-scangroups + #> + [CmdletBinding()] + [OutputType([Object])] + [Alias('gnovsg')] + [MetadataAttribute( + '/v2/vulnerability/scan-groups', + 'get' + )] + Param() + process { try { return (New-NinjaOneGETRequest -Resource 'v2/vulnerability/scan-groups') } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/Source/Public/Vulnerability/Invoke/Invoke-NinjaOneVulnerabilityScanGroupUpload.ps1 b/Source/Public/Vulnerability/Invoke/Invoke-NinjaOneVulnerabilityScanGroupUpload.ps1 new file mode 100644 index 0000000..ef0269c --- /dev/null +++ b/Source/Public/Vulnerability/Invoke/Invoke-NinjaOneVulnerabilityScanGroupUpload.ps1 @@ -0,0 +1,34 @@ +function Invoke-NinjaOneVulnerabilityScanGroupUpload { + <# + .SYNOPSIS + Uploads data for a vulnerability scan group. + .DESCRIPTION + Uploads data for a specified vulnerability scan group via the NinjaOne v2 API. + .FUNCTIONALITY + Vulnerability Management + .EXAMPLE + PS> Invoke-NinjaOneVulnerabilityScanGroupUpload -scan_group_id 5 -upload @{ ... } + + Uploads content to scan group 5. + .OUTPUTS + A PowerShell object containing the response. + .LINK + https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/vulnerability-scangroup-upload + #> + [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')] + [OutputType([Object])] + [Alias('inovsgu')] + [MetadataAttribute( + '/v2/vulnerability/scan-groups/{scan-group-id}/upload', + 'post' + )] + Param( + [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] + [Alias('scanGroupId')] + [Int]$scan_group_id, + [Parameter(Mandatory, Position=1, ValueFromPipelineByPropertyName)] + [Alias('body')] + [Object]$upload + ) + process { try { $res='v2/vulnerability/scan-groups/{0}/upload' -f $scan_group_id; if($PSCmdlet.ShouldProcess(('Scan Group {0}' -f $scan_group_id),'Upload')){ return (New-NinjaOnePOSTRequest -Resource $res -Body $upload) } } catch { New-NinjaOneError -ErrorRecord $_ } } +} diff --git a/ninjaOne-API-core-resources.yaml b/ninjaOne-API-core-resources.yaml new file mode 100644 index 0000000..5d010d8 --- /dev/null +++ b/ninjaOne-API-core-resources.yaml @@ -0,0 +1,15895 @@ +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: Users + description: Users + - 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 + - name: Vulnerability Management + description: Vulnerability Management +paths: + /v2/contacts: + get: + tags: + - system + summary: Contact list + description: Get all contacts + operationId: getContacts + responses: + "200": + description: List of contacts + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Contact" + "403": + description: Forbidden + post: + tags: + - management + summary: Create a contact + description: Create a new contact + operationId: createContact + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateContactRequest" + responses: + "200": + description: Contact created + content: + application/json: + schema: + $ref: "#/components/schemas/Contact" + "400": + description: Bad request + "403": + description: Forbidden + "401": + description: Unauthorized + /v2/contact/{id}: + get: + tags: + - system + summary: Contact details + description: Get a contact by their ID + operationId: getContactById + parameters: + - name: id + in: path + description: Contact identifier + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: Contact details + content: + application/json: + schema: + $ref: "#/components/schemas/Contact" + "404": + description: Contact not found + "403": + description: Forbidden + "401": + description: Unauthorized + delete: + tags: + - management + summary: Delete a contact + description: Delete a contact by their ID + operationId: deleteContact + parameters: + - name: id + in: path + description: Contact identifier + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: Contact deleted + "400": + description: Several possible validation errors + "404": + description: Contact not found + "403": + description: Forbidden + "401": + description: Unauthorized + patch: + tags: + - management + summary: Update a contact + description: Update a contact by their ID + operationId: updateContact + parameters: + - name: id + in: path + description: Contact identifier + required: true + schema: + type: integer + format: int32 + requestBody: + description: Contact request payload + content: + application/json: + schema: + $ref: "#/components/schemas/ContactPatchRequest" + responses: + "200": + description: Contact updated + content: + application/json: + schema: + $ref: "#/components/schemas/Contact" + "404": + description: Contact not found + "400": + description: Bad request + "403": + description: Forbidden + "401": + description: Unauthorized + /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. + Template 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 + - TRIGGER + - TECHNICIAN + - FILE_TRANSFER_AUTOMATION + - END_USER + - EMAIL_TEMPLATE + 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: + application/json: + 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: + application/json: + 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: + application/json: + 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: + application/json: + 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: + application/json: + 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: + application/json: + 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: + application/json: + 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: + application/json: + schema: + $ref: "#/components/schemas/ArchiveClientChecklistRequest" + responses: + "200": + description: Returns a list of restore organization checklists + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ClientChecklistPublicApiDTO" + /v2/organization/document/{clientDocumentId}/archive: + post: + tags: + - Organization Documents + summary: Archive an organization document + description: Archives an organization document by id + operationId: archiveClientDocument + parameters: + - name: clientDocumentId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: Returns the organization document archived + content: + application/json: + schema: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiDTO" + /v2/organization/documents/archive: + post: + tags: + - Organization Documents + summary: Archives organization documents + description: Archives multiple organization documents by id + operationId: archiveMultiPageClientDocuments + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "200": + description: Returns a list of archived organization documents + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiDTO" + /v2/organization/{organizationId}/template/{documentTemplateId}/document: + post: + tags: + - Organization Documents + summary: Create organization document + description: Creates an organization document and returns the document created + operationId: createOrganizationDocument + parameters: + - name: organizationId + in: path + description: Organization identifier + required: true + schema: + type: integer + format: int32 + - name: documentTemplateId + in: path + description: Document template identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiRequest" + responses: + "200": + description: Returns the organization document created + content: + application/json: + schema: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiDTO" + /v2/organization/documents: + get: + tags: + - Organization Documents + summary: List all organization documents with field values + description: List all organization documents with field values + operationId: getClientDocumentsWithAttributeValues + parameters: + - name: groupBy + in: query + schema: + type: string + enum: + - TEMPLATE + - ORGANIZATION + - name: organizationIds + in: query + schema: + type: string + - name: templateIds + in: query + schema: + type: string + - name: templateName + in: query + schema: + type: string + - name: documentName + in: query + schema: + type: string + responses: + "200": + description: Returns a list of all organization documents with field values + grouped by organization identifier + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiDTO" + post: + tags: + - Organization Documents + summary: Create organization documents + description: Creates organization documents and returns the documents created + operationId: createOrganizationDocuments + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesBulkCreatePublicApiRequest" + responses: + "200": + description: Returns a list of created organization documents with field + values + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiDTO" + patch: + tags: + - Organization Documents + summary: Update organization documents + description: Updates organization documents and returns the documents updated + operationId: updateOrganizationDocuments + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesBulkUpdatePublicApiRequest" + responses: + "200": + description: Returns a list of updated organization documents with field + values + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ClientDocumentWithUpdatedAttributeValuesPublicApiDTO" + /v2/organization/document/{clientDocumentId}: + delete: + tags: + - Organization Documents + summary: Delete an archived organization document + description: Deletes an archived organization document by id + operationId: deleteClientDocument + parameters: + - name: clientDocumentId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/organization/document/{clientDocumentId}/signed-urls: + get: + tags: + - Organization Documents + summary: Get organization document signed urls + description: Get organization document signed urls + operationId: getClientDocumentSignedUrls + parameters: + - name: clientDocumentId + 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/{organizationId}/documents: + get: + tags: + - Organization Documents + summary: List organization documents with field values + description: List organization documents with field values + operationId: getOrganizationDocuments + parameters: + - name: organizationId + in: path + description: Organization identifier + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: Returns a list of organization documents with field values + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiDTO" + /v2/organization/document/{clientDocumentId}/restore: + post: + tags: + - Organization Documents + summary: Restore an organization document + description: Restores an organization document by id + operationId: restoreClientDocument + parameters: + - name: clientDocumentId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: Returns the organization document restored + content: + application/json: + schema: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiDTO" + /v2/organization/documents/restore: + post: + tags: + - Organization Documents + summary: Restore multiple multi page organization documents + description: Restores multiple organization documents by id + operationId: restoreMultiPageClientDocuments + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "200": + description: Returns a list of restored organization documents + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiDTO" + /v2/organization/{organizationId}/document/{clientDocumentId}: + post: + tags: + - Organization Documents + summary: Update organization document + description: Updates an organization document and returns the updated version + operationId: updateOrganizationDocument + parameters: + - name: organizationId + in: path + description: Organization identifier + required: true + schema: + type: integer + format: int32 + - name: clientDocumentId + in: path + description: Organization document identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ClientDocumentWithAttributeValuesPublicApiRequest" + responses: + "200": + description: Returns the organization document updated + content: + application/json: + schema: + $ref: "#/components/schemas/ClientDocumentWithUpdatedAttributeValuesPublicApiDTO" + /v2/document-templates/{documentTemplateId}/archive: + post: + tags: + - Document Templates + summary: Archive a document template + description: Archives a document template by id + operationId: archiveDocumentTemplate + parameters: + - name: documentTemplateId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/document-templates/archive: + post: + tags: + - Document Templates + summary: Archive multiple document templates + description: Archives multiple document template by ids + operationId: archiveDocumentTemplates + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/document-templates: + get: + tags: + - Document Templates + summary: List document templates with fields + description: List document templates with fields + operationId: getDocumentTemplatesWithAttributes + parameters: + - name: templateName + in: query + schema: + type: string + - name: includeTechnicianRoles + in: query + description: Includes allowed technician roles. + schema: + type: boolean + default: false + responses: + "200": + description: Returns a list of all document templates with fields + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/DocumentTemplatePublicApiDTO" + post: + tags: + - Document Templates + summary: Create document template + description: Create document template + operationId: createDocumentTemplate + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NewDocumentTemplatePublicApiRequest" + responses: + "200": + description: Returns the document template created + content: + application/json: + schema: + $ref: "#/components/schemas/DocumentTemplatePublicApiDTO" + /v2/document-templates/{documentTemplateId}: + get: + tags: + - Document Templates + summary: Get document template + description: Get document template + operationId: getDocumentTemplate + parameters: + - name: documentTemplateId + in: path + required: true + schema: + type: integer + format: int32 + - name: includeTechnicianRoles + in: query + description: Includes allowed technician roles. + schema: + type: boolean + default: false + responses: + "200": + description: Returns a document template + content: + application/json: + schema: + $ref: "#/components/schemas/DocumentTemplatePublicApiDTO" + put: + tags: + - Document Templates + summary: Update document template + description: Updates a document template by id + operationId: updateDocumentTemplate + parameters: + - name: documentTemplateId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateDocumentTemplatePublicApiRequest" + responses: + "200": + description: Returns the document template updated + content: + application/json: + schema: + $ref: "#/components/schemas/DocumentTemplatePublicApiDTO" + delete: + tags: + - Document Templates + summary: Delete a document template + description: Deletes a document template by id + operationId: deleteDocumentTemplate + parameters: + - name: documentTemplateId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/document-templates/{documentTemplateId}/restore: + post: + tags: + - Document Templates + summary: Restore a document template + description: Restores a document template by id + operationId: restoreDocumentTemplate + parameters: + - name: documentTemplateId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: Returns the document template restored + content: + application/json: + schema: + $ref: "#/components/schemas/DocumentTemplatePublicApiDTO" + /v2/document-templates/restore: + post: + tags: + - Document Templates + summary: Restore a document template + description: Restores a document template by id + operationId: restoreDocumentTemplates + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "200": + description: Returns the document template restored + content: + application/json: + schema: + $ref: "#/components/schemas/DocumentTemplatePublicApiDTO" + /v2/tag/{assetType}: + post: + tags: + - Asset Tags + summary: Batch tag assets + description: Update tags for the supplied assetIds. Tags will be added and removed + as specified + operationId: batchUpdateTags + parameters: + - name: assetType + in: path + required: true + schema: + type: string + enum: + - device + requestBody: + description: "Payload supplying the asset ids to modify, as well as tags to\ + \ add/remove from those assets" + content: + application/json: + schema: + $ref: "#/components/schemas/ItamManageAssetRequestPublicApiDTO" + responses: + default: + description: default response + content: + application/json: {} + /v2/tag: + get: + tags: + - Asset Tags + summary: Get Asset Tags + description: Get a list of created Asset Tags + operationId: getTags + responses: + "200": + description: Returns a list of tags + content: + application/json: + schema: + $ref: "#/components/schemas/GetItamTagsResponse" + post: + tags: + - Asset Tags + summary: Create an Asset Tag + description: Create an Asset Tag with the provided name and description + operationId: createTag + requestBody: + description: The Asset Tag to be created + content: + application/json: + schema: + $ref: "#/components/schemas/CreateItamTagRequest" + responses: + "200": + description: The Asset Tag that was created + content: + application/json: + schema: + $ref: "#/components/schemas/ItamTagPublicApiDTO" + /v2/tag/{tagId}: + put: + tags: + - Asset Tags + summary: Update an Asset Tag + description: Update an Asset Tag with the provided metadata + operationId: updateTag + parameters: + - name: tagId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + description: Updated Asset Tag data + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateItamTagRequest" + responses: + "200": + description: The Asset Tag that was updated + content: + application/json: + schema: + $ref: "#/components/schemas/ItamTagPublicApiDTO" + delete: + tags: + - Asset Tags + summary: Delete an Asset Tag + description: Delete the Asset Tag with the provided id + operationId: deleteTag + parameters: + - name: tagId + in: path + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: {} + /v2/tag/delete: + post: + tags: + - Asset Tags + summary: Delete several Asset Tags + description: Delete Asset Tags having the provided ids + operationId: deleteTags + requestBody: + description: Array of Asset Tag Ids to delete + content: + application/json: + schema: + type: array + items: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: {} + /v2/tag/merge: + post: + tags: + - Asset Tags + summary: Merge existing tags + description: Merges tags. Can merge into an existing or new tag depending on + the input parameters + operationId: mergeTags + requestBody: + description: "Payload specifying the tags to merge, as well as whether they\ + \ should be merge to a new or existing tag" + content: + application/json: + schema: + $ref: "#/components/schemas/MergeItamTagsPublicApiRequest" + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/ItamTagPublicApiDTO" + /v2/tag/{assetType}/{assetId}: + put: + tags: + - Asset Tags + description: Set the tags for an asset to exactly the supplied values + operationId: setTagsForAsset + parameters: + - name: assetType + in: path + required: true + schema: + type: string + enum: + - device + - name: assetId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + description: Array of Asset Tags to assign to the asset. Existing tags on + the asset will be removed. + content: + application/json: + schema: + $ref: "#/components/schemas/ItamSetAssetTagsRequestPublicApiDTO" + responses: + default: + description: default response + content: + application/json: {} + /v2/knowledgebase/articles/archive: + post: + tags: + - Knowledge Base Articles + summary: Archive knowledge base articles + description: Archive knowledge base articles + operationId: archiveKnowledgeBaseArticles + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/knowledgebase/folders/archive: + post: + tags: + - Knowledge Base Articles + summary: Archive knowledge base folders + description: Archive knowledge base folders + operationId: archiveKnowledgeBaseFolders + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/knowledgebase/articles: + post: + tags: + - Knowledge Base Articles + summary: Create knowledge base articles + description: Create knowledge base articles + operationId: createKnowledgeBaseArticles + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KnowledgeBaseArticleBulkCreatePublicApiRequest" + responses: + "200": + description: Returns a list of created knowledge base articles + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KnowledgeBaseArticlePublicApiDTO" + patch: + tags: + - Knowledge Base Articles + summary: Update knowledge base articles + description: Update knowledge base articles + operationId: updateKnowledgeBaseArticles + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KnowledgeBaseArticleBulkUpdatePublicApiRequest" + responses: + "200": + description: Returns a list of updated knowledge base articles + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KnowledgeBaseArticlePublicApiDTO" + /v2/knowledgebase/articles/delete: + post: + tags: + - Knowledge Base Articles + summary: Delete knowledge base articles + description: Delete knowledge base articles + operationId: deleteKnowledgeBaseArticles + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/knowledgebase/folders/delete: + post: + tags: + - Knowledge Base Articles + summary: Delete knowledge base folders + description: Delete knowledge base folders + operationId: deleteKnowledgeBaseFolders + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/knowledgebase/article/{articleId}/download: + get: + tags: + - Knowledge Base Articles + summary: Download knowledge base article + description: Download knowledge base article + operationId: downloadKnowledgeBaseArticle + parameters: + - name: articleId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/knowledgebase/organization/articles: + get: + tags: + - Knowledge Base Articles + summary: Lists organization knowledge base articles + description: Lists organization knowledge base articles + operationId: getClientKnowledgeBaseArticles + parameters: + - name: organizationIds + in: query + schema: + type: string + - name: articleName + in: query + schema: + type: string + - name: includeArchived + in: query + schema: + type: boolean + responses: + "200": + description: Returns a list of organization knowledge base articles + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KnowledgeBaseArticlePublicApiDTO" + /v2/knowledgebase/global/articles: + get: + tags: + - Knowledge Base Articles + summary: Lists global knowledge base articles + description: Lists global knowledge base articles + operationId: getGlobalKnowledgeBaseArticles + parameters: + - name: articleName + in: query + schema: + type: string + - name: includeArchived + in: query + schema: + type: boolean + responses: + "200": + description: Returns a list of global knowledge base articles + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KnowledgeBaseArticlePublicApiDTO" + /v2/knowledgebase/article/{articleId}/signed-urls: + get: + tags: + - Knowledge Base Articles + summary: Get knowledge base article signed urls + description: Get knowledge base article signed urls + operationId: getKnowledgeBaseArticleSignedUrls + parameters: + - name: articleId + 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/knowledgebase/folder/{folderId}: + get: + tags: + - Knowledge Base Articles + summary: Returns knowledge base folder + description: Returns knowledge base folder and its content + operationId: getKnowledgeBaseFolderContent + parameters: + - name: folderId + in: path + required: true + schema: + type: integer + format: int32 + - name: includeArchived + in: query + schema: + type: boolean + responses: + "200": + description: Returns knowledge base folder and its content + content: + application/json: + schema: + $ref: "#/components/schemas/KnowledgeBaseFolderPublicApiDTO" + /v2/knowledgebase/folder: + get: + tags: + - Knowledge Base Articles + summary: Returns knowledge base folder + description: Returns knowledge base folder and its content + operationId: getKnowledgeBaseFolderPathContent + parameters: + - name: folderPath + in: query + schema: + type: string + - name: folderId + in: query + schema: + type: integer + format: int32 + - name: organizationId + in: query + schema: + type: integer + format: int32 + responses: + "200": + description: Returns knowledge base folder and its content + content: + application/json: + schema: + $ref: "#/components/schemas/KnowledgeBaseFolderPublicApiDTO" + /v2/knowledgebase/folders/move: + patch: + tags: + - Knowledge Base Articles + summary: Move knowledge base items + description: Move knowledge base folders and documents to another knowledge + base folder + operationId: move + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MovePublicApiRequest" + responses: + "204": + description: No content + /v2/knowledgebase/articles/restore: + post: + tags: + - Knowledge Base Articles + summary: Restore archive knowledge base articles + description: Restore archived knowledge base articles + operationId: restoreKnowledgeBaseArticles + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/knowledgebase/folders/restore: + post: + tags: + - Knowledge Base Articles + summary: Restore archived knowledge base folders + description: Restore archived knowledge base folders + operationId: restoreKnowledgeBaseFolders + requestBody: + content: + application/json: + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "204": + description: No Content + /v2/knowledgebase/articles/upload: + post: + tags: + - Knowledge Base Articles + summary: Upload knowledge base articles + description: Upload knowledge base articles + operationId: uploadKnowledgeBaseArticles + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + organizationId: + type: integer + format: int32 + folderId: + type: integer + format: int32 + folderPath: + type: string + files: + type: array + items: + $ref: "#/components/schemas/FormDataBodyPart" + responses: + "200": + description: Returns a list of created knowledge base articles + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/KnowledgeBaseArticlePublicApiDTO" + /v2/custom-fields/entity-type/{entityType}/{entityId}/signed-urls: + get: + tags: + - Custom Fields + summary: Get custom field signed urls + description: Get custom field signed urls + operationId: getNodeAttributeSignedUrls + parameters: + - name: entityType + in: path + required: true + schema: + type: string + enum: + - NODE + - END_USER + - LOCATION + - ORGANIZATION + - name: entityId + 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/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/{relatedItemId}/attachment/download: + get: + tags: + - Knowledge Base Articles + summary: Download related item attachment + description: Download related item attachment + operationId: downloadRelatedItemAttachment + parameters: + - name: relatedItemId + 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}/attachments/signed-urls: + get: + tags: + - Knowledge Base Articles + summary: Get related item attachments signed urls + description: Get related item attachments signed urls for an entity + operationId: getRelatedItemAttachmentsSignedUrls + 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 + responses: + "200": + description: Returns a map of content ids and their corresponding signed + urls + content: + application/json: + schema: + type: string + /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" + /v2/itam/unmanaged-device: + post: + tags: + - Unmanaged Devices + summary: Create an Unmanaged Device + description: Create an Unmanaged Device with the provided details + operationId: createUnmanagedDevicePublicApi + requestBody: + description: The Unmanaged Device to be created + content: + application/json: + schema: + $ref: "#/components/schemas/CreateUnmanagedDevicePublicApiRequest" + responses: + "200": + description: The id of the Unmanaged Device that was created + content: + application/json: + schema: + $ref: "#/components/schemas/CreateUnmanagedDevicePublicApiResponseDTO" + /v2/itam/unmanaged-device/{nodeId}: + put: + tags: + - Unmanaged Devices + summary: Update an Unmanaged Device + description: Update an Unmanaged Device with the provided details + operationId: updateUnmanagedDevicePublicApi + parameters: + - name: nodeId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + description: Details of the Unmanaged Device to be updated + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateUnmanagedDevicePublicApiRequest" + responses: + "202": + description: The Unmanaged Device was successfully updated + "404": + description: An Unmanaged Device with the provided nodeId was not found + delete: + tags: + - Unmanaged Devices + summary: Delete an Unmanaged Device + description: Delete an Unmanaged Device with the provided id + operationId: deleteUnmanagedDevicePublicApi + parameters: + - name: nodeId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: The Unmanaged Device was successfully deleted + "404": + description: An Unmanaged Device with the provided nodeId was not found + /v2/backup/integrity-check-jobs: + get: + tags: + - Backup + summary: Integrity check jobs. + description: Returns a list of integrity check jobs. + operationId: getIntegrityCheckJobs + parameters: + - name: df + in: query + description: Device filter. + schema: + type: string + - name: ddf + in: query + description: Deleted device filter. + schema: + type: string + - name: sf + in: query + description: Backup job status filter. + schema: + type: string + - name: ptf + in: query + description: Backup job planType filter. + schema: + type: string + - name: stf + in: query + description: Backup job startTime filter. + schema: + type: string + - name: include + in: query + description: Which devices include (active|deleted|all) default value active. + schema: + type: string + default: active + - name: cursor + in: query + description: Cursor name. + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page. + schema: + maximum: 10000 + minimum: 1 + type: integer + format: int32 + default: 10000 + responses: + "200": + description: The integrity check job report. + content: + application/json: + schema: + $ref: "#/components/schemas/BackupJobReport" + post: + tags: + - Backup + summary: Create an integrity check job + description: Creates an integrity check job + operationId: submitIntegrityCheckJob + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LockhartIntegrityCheckJobCreationRequest" + responses: + "200": + description: "Returns SUCCESS if the job was saved correctly, FAILURE otherwise." + content: + application/json: + schema: + $ref: "#/components/schemas/LockhartIntegrityCheckJobCreationResponse" + /v2/tab: + post: + tags: + - Custom Tabs + summary: Create a new Custom Tab + description: Create a Custom Tab with the provided details + operationId: createCustomTabPublicApi + requestBody: + description: The Custom Tab to be created + content: + application/json: + schema: + $ref: "#/components/schemas/NewCustomTabPublicApiRequest" + responses: + "200": + description: The Custom Tab that was created + content: + application/json: + schema: + $ref: "#/components/schemas/CustomTabPublicApiDTO" + /v2/tab/{tabId}: + get: + tags: + - Custom Tabs + summary: Retrieve a Custom Tab + description: "Gets a custom tab. NOTE: This will _not_ fetch tab extensions.\ + \ You must use the GET tab/{tabId}/role/{roleId} for that" + operationId: getCustomTabPublicApi + parameters: + - name: tabId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: The Custom Tab that was requested + content: + application/json: + schema: + $ref: "#/components/schemas/CustomTabPublicApiDTO" + "404": + description: No custom tab could be found with that ID + delete: + tags: + - Custom Tabs + summary: Delete a Custom Tab + description: Delete a Custom Tab + operationId: deleteUnmanagedDevicePublicApi_1 + parameters: + - name: tabId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: The Custom Tab was successfully deleted + "404": + description: The Custom Tab could not be found + patch: + tags: + - Custom Tabs + summary: Update a Custom Tab + description: "Update a Custom Tab. This API can be used to either update existing\ + \ tabs, or create tab 'role extensions' for existing tabs" + operationId: updateCustomTabPublicApi + parameters: + - name: tabId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + description: Details of the Custom Tab to be updated + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateCustomTabPublicApiRequest" + responses: + "200": + description: The Custom Tab was successfully updated + "404": + description: The Custom Tab could not be found + /v2/tab/{tabId}/end-user: + get: + tags: + - Custom Tabs + summary: Retrieve the requested tab along with any extensions for end-user tabs + description: Retrieve the requested tab along with any extensions for end-user + tabs + operationId: getTabHierarchyForEndUser + parameters: + - name: tabId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: The Custom Tabs and extensions as viewed by end-user tabs + "404": + description: The Custom Tab could not be found + /v2/tab/{tabId}/organization: + get: + tags: + - Custom Tabs + summary: Retrieve the requested tab along with any extensions for organization + and location tabs + description: Retrieve the requested tab along with any extensions for organization + and location tabs + operationId: getTabHierarchyForOrganization + parameters: + - name: tabId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: The Custom Tabs and extensions as viewed by organization and + location tabs + "404": + description: The Custom Tab could not be found + /v2/tab/{tabId}/role/{roleId}: + get: + tags: + - Custom Tabs + summary: Retrieve the requested tab along with any extensions based on the supplied + roleId + description: Retrieve the requested tab along with any extensions based on the + supplied roleId + operationId: getTabHierarchyForRole + parameters: + - name: tabId + in: path + required: true + schema: + type: integer + format: int32 + - name: roleId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: The Custom Tabs and extensions as viewed by the specified role + "404": + description: The Custom Tab or Role could not be found + /v2/tab/summary/end-user: + get: + tags: + - Custom Tabs + summary: Retrieve all of the custom tabs available to end user views + description: Retrieve a summary of the tabs available to end user views + operationId: getTabSummaryForEndUser + responses: + "200": + description: Returns a list of the available custom tabs available to end + user views + /v2/tab/summary/organization: + get: + tags: + - Custom Tabs + summary: Retrieve all of the custom tabs available to organizations and locations + description: Retrieve a summary of the tabs available to organizations and locations + operationId: getTabSummaryForOrganization + responses: + "200": + description: Returns a list of the available custom tabs available to organizations + and locations + /v2/tab/summary/role/{roleId}: + get: + tags: + - Custom Tabs + summary: Retrieve all of the custom tabs that would appear for the given role + description: Retrieve a summary of the tabs available to a given role + operationId: getTabSummaryForRole + parameters: + - name: roleId + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: "Returns a list of the available custom tabs for the specified\ + \ role, and the role hierarchy (used for sorting, if desired)" + "404": + description: The RoleId could not be found + /v2/tab/rename: + patch: + tags: + - Custom Tabs + summary: Rename a Custom Tab + description: Renames a Custom Tab + operationId: renameCustomTabPublicApi + requestBody: + description: Tab id and new name for the tab + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateTabNamePublicApiRequest" + responses: + "200": + description: The Custom Tab was successfully rename + "404": + description: The Custom Tab could not be found + /v2/tab/role/{roleId}/visibility: + patch: + tags: + - Custom Tabs + summary: Set the tab visibility of the specified tab + description: Using this API it is possible to configure tabs to be hidden for + roles and their children + operationId: updateCustomTabsDisplay + parameters: + - name: roleId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + description: Payload specifying the tab visibility changes + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/CustomTabsVisibilityPublicApiDTO" + responses: + "200": + description: Returns a list of the affected tabs (as CustomTabLabelPublicApiDTO) + with updated visibility data + /v2/tab/end-user/order: + patch: + tags: + - Custom Tabs + summary: Update the order of custom tabs for end-user tabs + description: "Update the order of custom tabs for end-user tabs. NOTE: All tabs\ + \ defined for end-users must be specified in the payload" + operationId: updateEndUserCustomTabsOrder + requestBody: + description: Payload specifying the tab ordering + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/CustomTabsOrderPublicApiDTO" + responses: + "200": + description: Returns a list of the affected tabs (as CustomTabLabelPublicApiDTO) + with updated order data + /v2/tab/organization/order: + patch: + tags: + - Custom Tabs + summary: Update the order of custom tabs for organizations and locations + description: "Update the order of custom tabs for organizations and locations.\ + \ NOTE: All tabs defined for organizations must be specified in the payload" + operationId: updateOrganizationCustomTabsOrder + requestBody: + description: Payload specifying the tab ordering + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/CustomTabsOrderPublicApiDTO" + responses: + "200": + description: Returns a list of the affected tabs (as CustomTabLabelPublicApiDTO) + with updated order data + /v2/tab/role/{roleId}/order: + patch: + tags: + - Custom Tabs + summary: Update the order of custom tabs for a specific role + description: "Update the order of custom tabs for a specific role. NOTE: Only\ + \ tabs created on this role can be ordered. All tabs defined on the role must\ + \ be specified in the payload" + operationId: updateRoleCustomTabsOrder + parameters: + - name: roleId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + description: Payload specifying the tab ordering + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/CustomTabsOrderPublicApiDTO" + responses: + "200": + description: Returns a list of the affected tabs (as CustomTabLabelPublicApiDTO) + with updated order data + /v2/ticketing/ticket: + post: + tags: + - ticketing + summary: Create ticket + description: "Create a new ticket, does not accept files" + operationId: create + requestBody: + description: NewTicket object that needs to be added to the store + content: + application/json: + schema: + $ref: "#/components/schemas/NewTicket" + required: true + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/TicketDTO" + /v2/ticketing/ticket/{ticketId}/comment: + post: + tags: + - ticketing + summary: Add comment to ticket + description: "Add a new comment to a ticket, allows files" + operationId: createComment + parameters: + - name: ticketId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + comment: + $ref: "#/components/schemas/NewTicketLogEntry" + files: + type: array + items: + type: string + format: binary + nullable: true + responses: + default: + description: default response + content: + application/json: {} + /v2/ticketing/ticket/{ticketId}: + get: + tags: + - ticketing + summary: Ticket + description: Returns a ticket + operationId: getTicketById + parameters: + - name: ticketId + in: path + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/TicketDTO" + put: + tags: + - ticketing + summary: Update ticket + description: Change ticket fields. Does not accept comments + operationId: update + parameters: + - name: ticketId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + description: UpdateTicket object that needs to be updated to the store + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateTicket" + required: true + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/TicketDTO" + /v2/ticketing/ticket/{ticketId}/log-entry: + get: + tags: + - ticketing + summary: List ticket log entries + description: Returns list of the ticket log entries for a ticket + operationId: getTicketLogEntriesByTicketId + parameters: + - name: ticketId + in: path + required: true + schema: + type: integer + format: int32 + - name: type + in: query + schema: + type: string + enum: + - DESCRIPTION + - COMMENT + - CONDITION + - SAVE + - DELETE + - PRODUCT + - name: createTime + in: query + schema: + type: string + - name: anchorId + in: query + schema: + type: integer + format: int32 + - name: pageSize + in: query + schema: + type: integer + format: int32 + default: 500 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TicketLogEntryPublicApiDTO" + /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 + /v2/device/{id}/maintenance: + put: + tags: + - management + summary: Schedule maintenance + description: Schedule maintenance window for device + operationId: updateDeviceMaintenance + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MaintenanceSettings" + responses: + default: + description: default response + content: + "*/*": {} + delete: + tags: + - management + summary: Cancel maintenance + description: Cancel pending or active maintenance for device + operationId: cancelDeviceMaintenance + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: {} + /v2/device/{id}/windows-service/{serviceId}/control: + post: + tags: + - management + summary: Windows service control + description: Start/Stop/Restart Windows Service on a device + operationId: controlWindowsService + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: serviceId + in: path + description: Service identifier + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WindowsServiceControlRequest" + responses: + default: + description: default response + content: + "*/*": {} + /v2/device/{id}: + get: + tags: + - devices + summary: Device details + description: Returns device details + operationId: getDevice + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: Device information + content: + application/json: + schema: + $ref: "#/components/schemas/Device" + patch: + tags: + - management + summary: Update device information + description: "Change device friendly name, user data, etc." + operationId: updateDevice + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceMutableProperties" + responses: + default: + description: default response + content: + "*/*": {} + security: + - oauth2: + - management + /v2/device/{id}/jobs: + get: + tags: + - devices + summary: Device currently running (active) jobs + description: Returns currently running jobs for device + operationId: getDeviceActiveJobs + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: lang + in: query + schema: + type: string + description: Language tag + - name: tz + in: query + description: Time Zone + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Job" + /v2/device/{id}/activities: + get: + tags: + - devices + summary: Device activities + description: Returns activity log for device + operationId: getDeviceActivities + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: olderThan + in: query + description: Return activities recorded that are newer than specified activity + ID + schema: + type: integer + format: int32 + - name: newerThan + in: query + description: Return activities recorded that are older than specified activity + ID + schema: + type: integer + format: int32 + - name: activityType + in: query + description: Return activities of type + schema: + type: string + - name: status + in: query + description: Return activities with status(es) + schema: + type: string + - name: seriesUid + in: query + description: Return activities related to alert (series) + schema: + type: string + - name: pageSize + in: query + description: Limit number of activities to return + schema: + maximum: 1000 + minimum: 10 + type: integer + format: int32 + default: 200 + - name: lang + in: query + description: Language tag + schema: + type: string + - name: tz + in: query + description: Time Zone + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/NodeActivitiesResponse" + /v2/device/{id}/alerts: + get: + tags: + - devices + summary: Device alerts (triggered conditions) + description: Returns list of active alerts (triggered conditions) for device + operationId: getDeviceAlerts + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: lang + in: query + schema: + type: string + description: Language tag + - name: tz + in: query + description: Time Zone + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Alert" + /v2/device/{id}/disks: + get: + tags: + - devices + summary: Device disk drives + description: Returns device disks' details + operationId: getDeviceDiskDrives + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/DiskDrive" + /v2/device/{id}/os-patch-installs: + get: + tags: + - devices + summary: OS Patch installation report for device + description: Returns patch installation history records (successful and failed) + for device + operationId: getDeviceInstalledOSPatches + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: status + in: query + description: "Patch Status filter (FAILED, INSTALLED)" + schema: + type: string + - name: installedBefore + in: query + description: Include patches installed before specified date + schema: + type: string + - name: installedAfter + in: query + description: Include patches installed after specified date + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/OSPatch" + /v2/device/{id}/software-patch-installs: + get: + tags: + - devices + summary: Software Patch history for device + description: Returns 3rd party software patch installation history records for + device (successful and failed) + operationId: getDeviceInstalledSoftwarePatches + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: type + in: query + description: Patch Type filter + schema: + type: string + - name: impact + in: query + description: Patch Impact filter + schema: + type: string + - name: status + in: query + description: Patch Status filter + schema: + type: string + - name: productIdentifier + in: query + description: Product Identifier + schema: + type: string + - name: installedBefore + in: query + description: Include patches installed before specified date + schema: + type: string + - name: installedAfter + in: query + description: Include patches installed after specified date + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/SoftwarePatch" + /v2/device/{id}/last-logged-on-user: + get: + tags: + - devices + summary: Last logged-on user information + description: Returns username that was last to login to device + operationId: getDeviceLastLoggedOnUser + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/LoggedOnUser" + security: + - oauth2: + - monitoring + /v2/device/{id}/dashboard-url: + get: + tags: + - management + summary: Device link + description: Returns link to device + operationId: getDeviceLink + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: redirect + in: query + description: Return redirect response + schema: + type: boolean + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceLink" + /v2/device/{id}/network-interfaces: + get: + tags: + - devices + summary: Device network interfaces + description: Returns device network interfaces' details + operationId: getDeviceNetworkInterfaces + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/NetworkInterface" + /v2/device/{id}/os-patches: + get: + tags: + - devices + summary: OS Patches + description: Returns list of pending/rejected/approved OS patches for device + operationId: getDevicePendingFailedRejectedOSPatches + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: status + in: query + description: Patch Status filter + schema: + type: string + - name: type + in: query + description: Patch Type filter + schema: + type: string + - name: severity + in: query + description: Patch Severity filter + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/OSPatch" + /v2/device/{id}/software-patches: + get: + tags: + - devices + summary: "Pending, Failed and Rejected Software patches for device" + description: Returns list of 3rd party Software patches for a device (for which + there were no installation attempts) + operationId: getDevicePendingFailedRejectedSoftwarePatches + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: status + in: query + description: Patch Status filter + schema: + type: string + - name: productIdentifier + in: query + description: Product Identifier + schema: + type: string + - name: type + in: query + description: Patch Type filter + schema: + type: string + - name: impact + in: query + description: Patch Impact filter + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/SoftwarePatch" + /v2/device/{id}/processors: + get: + tags: + - devices + summary: Device processors + description: Returns list of device Processor details + operationId: getDeviceProcessors + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Processor" + /v2/device/{id}/windows-services: + get: + tags: + - devices + summary: Windows services + description: Returns list of Windows Services and their statuses + operationId: getDeviceServices + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Service name + schema: + type: string + - name: state + in: query + description: Service state + schema: + type: string + enum: + - UNKNOWN + - STOPPED + - START_PENDING + - RUNNING + - STOP_PENDING + - PAUSE_PENDING + - PAUSED + - CONTINUE_PENDING + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/WindowsService" + /v2/device/{id}/software: + get: + tags: + - devices + summary: Device software inventory + description: Returns list of software installed on device + operationId: getDeviceSoftware + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Application" + /v2/device/{id}/volumes: + get: + tags: + - devices + summary: Device storage volumes + description: Returns device volumes' details + operationId: getDeviceVolumes + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: include + in: query + description: Additional information to include (bl - BitLocker status) + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Volume" + /v2/device/{id}/custom-fields: + get: + tags: + - devices + summary: Device custom fields + description: Returns list of device custom fields + operationId: getNodeCustomFields + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: withInheritance + in: query + description: Retrieve values using definition scope hierarchy + schema: + type: boolean + responses: + default: + description: default response + content: + application/json: + schema: + type: object + additionalProperties: + type: object + patch: + tags: + - devices + summary: Update Field Values + description: Update device custom field values + operationId: updateNodeAttributeValues + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: object + responses: + default: + description: default response + content: + "*/*": {} + /v2/device/{id}/policy/overrides: + get: + tags: + - devices + summary: Get summary of device policy overrides + description: Returns list of overridden policy sections + operationId: getPolicyOverrides + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyOverrides" + delete: + tags: + - management + summary: Reset device policy overrides + description: Submit request to remove device policy overrides + operationId: resetPolicyOverrides + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: {} + /v2/device/{id}/reboot/{mode}: + post: + tags: + - management + summary: Reboot device + description: Sends a command to restart the computer + operationId: rebootDevices + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: mode + in: path + description: Reboot mode + required: true + schema: + type: string + enum: + - NORMAL + - FORCED + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RebootRequest" + responses: + default: + description: default response + content: + "*/*": {} + /v2/device/{id}/owner: + delete: + tags: + - management + summary: Remove device owner + description: Removes the owner of the device. + operationId: removeDeviceOwner + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + "*/*": {} + security: + - oauth2: + - management + /v2/device/{id}/scripting/options: + get: + tags: + - management + summary: Device scripting options + description: "Returns scripting options (built-in actions, custom scripts) available\ + \ for device" + operationId: requestScriptingOptions + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: lang + in: query + description: Language + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceScriptingOptions" + /v2/device/{id}/script/run: + post: + tags: + - management + summary: Run script or built-in action + description: Run script or built-in action on a device + operationId: runScriptOnDevice + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RunScriptRequest" + responses: + default: + description: default response + content: + "*/*": {} + /v2/device/{id}/owner/{ownerUid}: + post: + tags: + - management + summary: Set device owner + description: Sets the owner of the device. + operationId: setDeviceOwner + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: ownerUid + in: path + description: Device owner identifier + required: true + schema: + type: string + format: uuid + responses: + default: + description: default response + content: + "*/*": {} + security: + - oauth2: + - management + /v2/device/{id}/windows-service/{serviceId}/configure: + post: + tags: + - management + summary: Modify Windows Service configuration + description: Configures Windows Service startup settings + operationId: setWindowsServiceConfiguration + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + - name: serviceId + in: path + description: Service identifier + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WindowsServiceConfiguration" + responses: + default: + description: default response + content: + "*/*": {} + /v2/device/{id}/patch/os/apply: + post: + tags: + - management + summary: Run OS patch apply + description: Submit a job to start a device OS patch apply + operationId: submitOSPatchApply + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + "400": + description: Device is not applicable for os apply. + /v2/device/{id}/patch/os/scan: + post: + tags: + - management + summary: Run OS patch scan + description: Submit a job to start a device OS patch scan + operationId: submitOSPatchScan + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + "400": + description: Device is not applicable for os scan. + /v2/device/{id}/patch/software/apply: + post: + tags: + - management + summary: Run Software patch apply + description: Submit a job to start a device software patch apply + operationId: submitSoftwarePatchApply + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + "400": + description: Device is not applicable for software apply. + /v2/device/{id}/patch/software/scan: + post: + tags: + - management + summary: Run Software patch scan + description: Submit a job to start a device software patch scan + operationId: submitSoftwarePatchScan + parameters: + - name: id + in: path + description: Device identifier + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + "400": + description: Device is not applicable for software scan. + /v2/group/{id}/device-ids: + get: + tags: + - groups + summary: Group members + description: Returns list of device identifiers that match group criteria + operationId: getGroupDeviceIds + parameters: + - name: id + in: path + description: Group identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + type: integer + format: int32 + /v2/organization/{id}/locations: + get: + tags: + - organization + summary: Organization locations + description: Returns list of locations for organization + operationId: getOrganizationLocations + parameters: + - name: id + in: path + description: Organization identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Location" + post: + tags: + - management + summary: Add new location to organization + description: Creates new location for organization + operationId: createLocationForOrganization + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LocationModel" + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/Location" + /v2/organization/{id}/end-users: + get: + tags: + - organization + summary: List users + description: Returns list of end-users for organization + operationId: getEndUsers + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + - name: includeRoles + in: query + description: Includes user role information + schema: + type: boolean + default: false + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/User" + /v2/organization/generate-installer: + post: + tags: + - management + summary: Generate installer + description: Generates and returns URL for installer with specified settings + operationId: getInstaller + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GenerateInstallerRequestDto" + examples: + example with nodeRole param auto: + description: example with nodeRole param auto + value: + organizationId: 1 + locationId: 1 + installerType: WINDOWS_MSI + content: + nodeRoleId: auto + example with nodeRole param integer: + description: example with nodeRole param integer + value: + organizationId: 1 + locationId: 1 + installerType: WINDOWS_MSI + content: + nodeRoleId: "201" + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/Link" + /v2/organization/{id}/location/{location_id}/installer/{installer_type}: + get: + tags: + - management + summary: Generate installer + description: Generates and returns URL for installer for specified organization/location + operationId: getInstallerForLocation + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + - name: location_id + in: path + required: true + schema: + type: integer + format: int32 + - name: installer_type + in: path + required: true + schema: + type: string + enum: + - WINDOWS_MSI + - MAC_DMG + - MAC_PKG + - LINUX_DEB + - LINUX_RPM + - LINUX_ARM64_DEB + - LINUX_ARMV7A_DEB + - LINUX_ARM64_RPM + - LINUX_ARMV7A_RPM + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/Link" + /v2/organization/{id}/locations/{locationId}/backup/usage: + get: + tags: + - organization + summary: Organization location backup usage + description: Returns a location backup usage + operationId: getLocationUsage + parameters: + - name: id + in: path + description: Organization identifier + required: true + schema: + type: integer + format: int32 + - name: locationId + in: path + description: Location identifier + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: Returns a location backup usage + content: + application/json: + schema: + $ref: "#/components/schemas/LocationBackupUsageSummary" + /v2/organization/{id}/custom-fields: + get: + tags: + - organization + summary: Organization custom fields + description: Returns list of organization custom fields + operationId: getNodeCustomFields_1 + parameters: + - name: id + in: path + description: Organization identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: object + additionalProperties: + type: object + patch: + tags: + - organization + summary: Update Field Values + description: Update organization custom field values + operationId: updateNodeAttributeValues_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: object + responses: + default: + description: default response + content: + "*/*": {} + /v2/organization/{id}/location/{locationId}/custom-fields: + get: + tags: + - Location + summary: Location custom fields + description: Returns list of location custom fields + operationId: getNodeCustomFields_2 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + - name: locationId + in: path + required: true + schema: + type: integer + format: int32 + - name: withInheritance + in: query + description: Retrieve values using definition scope hierarchy + schema: + type: boolean + responses: + default: + description: default response + content: + application/json: + schema: + type: object + additionalProperties: + type: object + patch: + tags: + - Location + summary: Update Field Values + description: Update location custom field values + operationId: updateNodeAttributeValues_2 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + - name: locationId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: object + responses: + default: + description: default response + content: + "*/*": {} + /v2/organization/{id}: + get: + tags: + - organization + summary: Organization information + description: "Returns organization details (policy mappings, locations)" + operationId: getOrganization + parameters: + - name: id + in: path + description: Organization identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/OrganizationDetailed" + patch: + tags: + - management + summary: Update organization + description: "Change organization name, description and policy mappings" + operationId: updateOrganization + parameters: + - name: id + in: path + description: Organization identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OrganizationModel" + responses: + default: + description: default response + content: + "*/*": {} + /v2/organization/{id}/devices: + get: + tags: + - organization + summary: Organization devices + description: Returns list of devices for organization + operationId: getOrganizationDevices + parameters: + - name: id + in: path + description: Organization identifier + required: true + schema: + type: integer + format: int32 + - name: pageSize + in: query + description: Limit number of devices to return + schema: + type: integer + format: int32 + - name: after + in: query + description: Last Node ID from previous page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/NodeWithDetailedReferences" + /v2/organization/{id}/locations/backup/usage: + get: + tags: + - organization + summary: Organization locations backup usage + description: Returns a list of locations backup usage + operationId: getOrganizationLocationUsage + parameters: + - name: id + in: path + description: Organization identifier + required: true + schema: + type: string + responses: + "200": + description: Returns list of locations backup usage + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/LocationBackupUsageSummary" + /v2/organization/{id}/locations/{locationId}: + patch: + tags: + - management + summary: Update location + description: "Change location name, address, description, custom data" + operationId: updateLocation + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + - name: locationId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LocationModel" + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/Location" + /v2/organization/{id}/policies: + put: + tags: + - management + summary: Change organization policy mappings + description: Update policy assignment for node role(s). Returns list of affected + device IDs + operationId: updateNodeRolePolicyAssignmentForOrganization + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/NodeRolePolicyAssignment" + responses: + default: + description: default response + content: + "*/*": + schema: + type: array + items: + type: integer + format: int32 + /v2/queries/antivirus-status: + get: + tags: + - queries + summary: Antivirus status report + description: Returns list of statues of antivirus software installed on devices + operationId: getAntivirusStatusReport + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: productState + in: query + description: Product State filter + schema: + type: string + - name: productName + in: query + description: Product Name filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/AntivirusStatusReport" + /v2/queries/antivirus-threats: + get: + tags: + - queries + summary: Antivirus threats report + description: Returns list of antivirus threats + operationId: getAntivirusThreats + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/AntivirusThreatsReport" + /v2/queries/computer-systems: + get: + tags: + - queries + summary: Computer systems report + description: Returns computer systems information for devices + operationId: getComputerSystems + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/ComputerSystemsReport" + /v2/queries/custom-fields-detailed: + get: + tags: + - queries + summary: Custom fields detailed report + description: Returns Custom Fields report with additional information about + each field + operationId: getCustomFieldsDetailedReport + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + maximum: 10000 + minimum: 10 + type: integer + format: int32 + default: 1000 + - name: updatedAfter + in: query + description: Custom fields updated after specified date + schema: + type: string + - name: fields + in: query + description: Comma-separated list of fields + schema: + type: string + - name: showSecureValues + in: query + description: Flag to indicate if secure values should be returned as plain + text without encryption + schema: + type: boolean + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/NodeAttributesDetailedReport" + /v2/queries/custom-fields: + get: + tags: + - queries + summary: Custom fields report + description: Returns Custom Fields report + operationId: getCustomFieldsReport + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + maximum: 10000 + minimum: 10 + type: integer + format: int32 + default: 1000 + - name: updatedAfter + in: query + description: Custom fields updated after specified date + schema: + type: string + - name: fields + in: query + description: Comma-separated list of fields + schema: + type: string + - name: showSecureValues + in: query + description: Flag to indicate if secure values should be returned as plain + text without encryption + schema: + type: boolean + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/NodeAttributesReport" + /v2/queries/device-health: + get: + tags: + - queries + summary: Device health report + description: Returns list of device health summary records + operationId: getDeviceHealthReport + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: health + in: query + description: Health status filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceHealthReport" + /v2/queries/backup/usage: + get: + tags: + - queries + summary: Device backup usage + description: Returns the backup usage by device + operationId: getDeviceUsage + parameters: + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + - name: includeDeletedDevices + in: query + description: Whether or not include deleted devices + schema: + type: boolean + responses: + "200": + description: Returns a device backup usage report + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceUsageReport" + /v2/queries/disks: + get: + tags: + - queries + summary: Disk drives report + description: Returns list of physical disks + operationId: getDiskDrives + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/DiskDriveReport" + /v2/queries/os-patch-installs: + get: + tags: + - queries + summary: OS Patch installation report + description: Returns patch installation history records (successful and failed) + operationId: getInstalledOSPatches + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: status + in: query + description: "Patch Status filter (FAILED, INSTALLED)" + schema: + type: string + - name: installedBefore + in: query + description: Include patches installed before specified date + schema: + type: string + - name: installedAfter + in: query + description: Include patches installed after specified date + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/OSPatchReport" + /v2/queries/software-patch-installs: + get: + tags: + - queries + summary: Software Patch history report + description: Returns 3rd party software patch installation history records (successful + and failed) + operationId: getInstalledSoftwarePatches + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: type + in: query + description: Patch Type filter + schema: + type: string + - name: impact + in: query + description: Patch Impact filter + schema: + type: string + - name: status + in: query + description: Patch Status filter + schema: + type: string + - name: productIdentifier + in: query + description: Product Identifier + schema: + type: string + - name: installedBefore + in: query + description: Include patches installed before specified date + schema: + type: string + - name: installedAfter + in: query + description: Include patches installed after specified date + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/SoftwarePatchReport" + /v2/queries/logged-on-users: + get: + tags: + - queries + summary: Last logged-on user report + description: "Returns usernames and logon times " + operationId: getLastLoggedOnUsersReport + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + maximum: 10000 + minimum: 10 + type: integer + format: int32 + default: 1000 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/LoggedOnUsersReport" + /v2/queries/network-interfaces: + get: + tags: + - queries + summary: List Network Interfaces + description: Returns list of Network Interfaces for each device + operationId: getNetworkInterfaces + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + schema: + type: integer + description: Limit number of devices to return + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkInterfacesReport" + /v2/queries/operating-systems: + get: + tags: + - queries + summary: Operating systems report + description: Returns operating systems' for devices + operationId: getOperatingSystems + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/OperatingSystemsReport" + /v2/queries/os-patches: + get: + tags: + - queries + summary: "Pending, Failed and Rejected OS patches report" + description: Returns list of OS patches for which there were no installation + attempts + operationId: getPendingFailedRejectedOSPatches + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: status + in: query + description: Patch Status filter + schema: + type: string + - name: type + in: query + description: Patch Type filter + schema: + type: string + - name: severity + in: query + description: Patch Severity filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/OSPatchReport" + /v2/queries/software-patches: + get: + tags: + - queries + summary: "Pending, Failed and Rejected Software patches report" + description: Returns list of 3rd party Software patches for which there were + no installation attempts + operationId: getPendingFailedRejectedSoftwarePatches + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: status + in: query + description: Patch Status filter + schema: + type: string + - name: productIdentifier + in: query + description: Product Identifier + schema: + type: string + - name: type + in: query + description: Patch Type filter + schema: + type: string + - name: impact + in: query + description: Patch Impact filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/SoftwarePatchReport" + /v2/queries/policy-overrides: + get: + tags: + - queries + summary: Get summary of device policy overrides + description: Returns list of overridden policy sections for each device + operationId: getPolicyOverrides_1 + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + maximum: 10000 + minimum: 10 + type: integer + format: int32 + default: 1000 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyOverridesReport" + /v2/queries/processors: + get: + tags: + - queries + summary: Processor report + description: Returns list of processors + operationId: getProcessors + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/ProcessorReport" + /v2/queries/raid-controllers: + get: + tags: + - queries + summary: RAID controller report + description: Returns list of RAID controllers + operationId: getRAIDControllerReport + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/RAIDControllerReport" + /v2/queries/raid-drives: + get: + tags: + - queries + summary: RAID drive report + description: Returns list of drives connected to RAID controllers + operationId: getRAIDDriveReport + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/RAIDDriveReport" + /v2/queries/scoped-custom-fields-detailed: + get: + tags: + - queries + summary: Scoped custom fields detailed report + description: "Returns report for Custom Fields defined at different scopes (device,\ + \ location, organization) with additional information about each field" + operationId: getScopedCustomFieldsDetailedReport + parameters: + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + maximum: 10000 + minimum: 10 + type: integer + format: int32 + default: 1000 + - name: updatedAfter + in: query + description: Custom fields updated after specified date + schema: + type: string + - name: fields + in: query + description: Comma-separated list of fields + schema: + type: string + - name: scopes + in: query + description: Comma-separated list of scopes + schema: + type: string + default: all + - name: showSecureValues + in: query + description: Flag to indicate if secure values should be returned as plain + text without encryption + schema: + type: boolean + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/ScopedAttributesDetailedReport" + /v2/queries/scoped-custom-fields: + get: + tags: + - queries + summary: Scoped custom fields report + description: "Returns report for Custom Fields defined at different scopes (device,\ + \ location, organization)" + operationId: getScopedCustomFieldsReport + parameters: + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + maximum: 10000 + minimum: 10 + type: integer + format: int32 + default: 1000 + - name: updatedAfter + in: query + description: Custom fields updated after specified date + schema: + type: string + - name: fields + in: query + description: Comma-separated list of fields + schema: + type: string + - name: scopes + in: query + description: Comma-separated list of scopes + schema: + type: string + default: all + - name: showSecureValues + in: query + description: Flag to indicate if secure values should be returned as plain + text without encryption + schema: + type: boolean + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/ScopedAttributesReport" + /v2/queries/software: + get: + tags: + - queries + summary: Software inventory + description: Returns list software installed on devices + operationId: getSoftware + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + - name: installedBefore + in: query + description: Include software installed before specified date + schema: + type: string + - name: installedAfter + in: query + description: Include software installed after specified date + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/SoftwareReport" + /v2/queries/volumes: + get: + tags: + - queries + summary: Disk volumes report + description: Returns list of disk volumes + operationId: getVolumes + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ts + in: query + description: Monitoring timestamp filter + schema: + type: string + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + - name: include + in: query + description: Additional information to include (bl - BitLocker status) + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/VolumesReport" + /v2/queries/windows-services: + get: + tags: + - queries + summary: Windows services report + description: Returns list of Windows Services and their statuses + operationId: getWindowsServicesReport + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: name + in: query + description: Service name + schema: + type: string + - name: state + in: query + description: Service state + schema: + type: string + enum: + - UNKNOWN + - STOPPED + - START_PENDING + - RUNNING + - STOP_PENDING + - PAUSE_PENDING + - PAUSED + - CONTINUE_PENDING + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + maximum: 10000 + minimum: 10 + type: integer + format: int32 + default: 1000 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/WindowsServiceReport" + /v2/policies: + get: + tags: + - system + summary: List policies + description: Returns list of policies + operationId: getPolicies + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Policy" + post: + tags: + - management + summary: Creates new Policy + description: "Creates new policy using (New Root, Child, Copy)" + operationId: createPolicy + parameters: + - name: mode + in: query + description: Policy creation mode + schema: + type: string + enum: + - NEW + - CHILD + - COPY + - name: templatePolicyId + in: query + description: Template Policy identifier + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyInfo" + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/Policy" + /v2/jobs: + get: + tags: + - system + summary: List active jobs + description: Returns list of running jobs + operationId: getActiveJobs + parameters: + - name: jobType + in: query + description: Job Type filter + schema: + type: string + - name: df + in: query + description: Device filter + schema: + type: string + - name: lang + in: query + description: Language tag + schema: + type: string + - name: tz + in: query + description: Time Zone + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Job" + /v2/activities: + get: + tags: + - system + summary: List activities + description: Returns activity log in reverse chronological order + operationId: getActivities + parameters: + - name: class + in: query + description: Activity Class (System/Device) filter + schema: + type: string + default: ALL + enum: + - SYSTEM + - DEVICE + - USER + - ALL + - name: before + in: query + description: Return activities recorded prior to specified date + schema: + type: string + - name: after + in: query + description: Return activities recorded after to specified date + schema: + type: string + - name: olderThan + in: query + description: Return activities recorded that are newer than specified activity + ID + schema: + type: integer + format: int64 + - name: newerThan + in: query + description: Return activities recorded that are older than specified activity + ID + schema: + type: integer + format: int64 + - name: type + in: query + description: Return activities of type + schema: + type: string + - name: status + in: query + description: Return activities with status(es) + schema: + type: string + - name: user + in: query + description: Return activities for user(s) + schema: + type: string + - name: seriesUid + in: query + description: Return activities related to alert (series) + schema: + type: string + - name: df + in: query + description: Device filter + schema: + type: string + - name: pageSize + in: query + description: Limit number of activities to return + schema: + maximum: 1000 + minimum: 10 + type: integer + format: int32 + default: 200 + - name: lang + in: query + description: Language tag + schema: + type: string + - name: tz + in: query + description: Time Zone + schema: + type: string + - name: sourceConfigUid + in: query + description: Allows users to make a request directed to a specific script + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/ActivitiesResponse" + /v2/alerts: + get: + tags: + - system + summary: List active alerts (triggered conditions) + description: Returns list of active alerts/triggered conditions + operationId: getAlerts + parameters: + - name: sourceType + in: query + schema: + type: string + description: Alert Source filter + - name: df + in: query + description: Device filter + schema: + type: string + - name: lang + in: query + description: Language tag + schema: + type: string + - name: tz + in: query + description: Time Zone + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Alert" + /v2/automation/scripts: + get: + tags: + - system + summary: List all available automation scripts + description: Returns list of all available automation scripts + operationId: getAutomationScripts + parameters: + - name: lang + in: query + description: Language + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/AutomationScript" + /v2/device-custom-fields: + get: + tags: + - system + summary: Device Custom Fields + description: Returns list of all custom fields + operationId: getDeviceGlobalCustomFields + parameters: + - name: scopes + in: query + description: Comma-separated list of scopes + schema: + type: string + enum: + - "all,node,location,organization" + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/AttributePublicApiDTO" + /v2/devices: + get: + tags: + - system + summary: List devices + description: Returns list of devices (basic node information) + operationId: getDevices + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: pageSize + in: query + description: Limit number of devices to return + schema: + type: integer + format: int32 + - name: after + in: query + description: Last Node ID from previous page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/NodeWithDetailedReferences" + /v2/devices-detailed: + get: + tags: + - system + summary: List devices (detailed) + description: Returns list of devices with additional information + operationId: getDevicesDetailed + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: pageSize + in: query + schema: + type: integer + description: Limit number of devices to return + format: int32 + - name: after + in: query + schema: + type: integer + description: Last Node ID from previous page + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Device" + /v2/notification-channels/enabled: + get: + tags: + - system + summary: List enabled notification channels + description: Returns list of enabled notification channels + operationId: getEnabledNotificationChannels + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/NotificationChannel" + /v2/groups: + get: + tags: + - system + summary: List groups (saved searches) + description: Returns list of groups + operationId: getGroups + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Group" + /v2/locations: + get: + tags: + - system + summary: List locations + description: Returns flat list of all locations for all organizations + operationId: getLocations + parameters: + - name: pageSize + in: query + description: Limit number of locations to return + schema: + type: integer + format: int32 + - name: after + in: query + description: Last Location Identifier from previous page + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/LocationWithOrganizationRef" + /v2/roles: + get: + tags: + - system + summary: List device roles + description: Returns list of device roles + operationId: getNodeRoles + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/NodeRole" + /v2/notification-channels: + get: + tags: + - system + summary: List notification channels + description: Returns list of notification channels + operationId: getNotificationChannels + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/NotificationChannel" + /v2/organizations-detailed: + get: + tags: + - system + summary: List organizations (Detailed) + description: Returns list of organizations with locations and policy mappings + operationId: getOrganizationsDetailed + 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/OrganizationDetailed" + /v2/tasks: + get: + tags: + - system + summary: List scheduled tasks + description: Returns list of registered scheduled tasks + operationId: getScheduledTasks + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ScheduledTask" + /v2/software-products: + get: + tags: + - system + summary: List supported 3rd party software + description: Returns available software products (3rd party patching) + operationId: getSoftwareProducts + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/SoftwareProduct" + /v2/users: + get: + tags: + - system + summary: List users + description: Returns list of users + operationId: getUsers + parameters: + - name: userType + in: query + description: User type filter + schema: + type: string + enum: + - TECHNICIAN + - END_USER + - name: includeRoles + in: query + description: Includes user role information + schema: + type: boolean + default: false + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/User" + /v2/devices/search: + get: + tags: + - system + summary: Find devices + description: Returns list of entities matching search term + operationId: search + parameters: + - name: q + in: query + description: "Search query (name, logged on user name, IP address, etc.)" + schema: + type: string + - name: limit + in: query + description: Limit number of devices to return + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceSearchResults" + /v2/backup/jobs: + get: + tags: + - Backup + summary: Backup jobs + description: Returns list of backup jobs + operationId: getBackupJobs + parameters: + - name: df + in: query + description: Device filter + schema: + type: string + - name: ddf + in: query + description: Deleted device filter + schema: + type: string + - name: sf + in: query + description: Backup job status filter + schema: + type: string + - name: ptf + in: query + description: Backup job planType filter + schema: + type: string + - name: stf + in: query + description: Backup job startTime filter + schema: + type: string + - name: include + in: query + description: Which devices include (active|deleted|all) default value active + schema: + type: string + default: active + - name: cursor + in: query + description: Cursor name + schema: + type: string + - name: pageSize + in: query + description: Limit number of records per page + schema: + maximum: 10000 + minimum: 1 + type: integer + format: int32 + default: 10000 + responses: + "200": + description: Returns a backup job report + content: + application/json: + schema: + $ref: "#/components/schemas/BackupJobReport" + /v2/ticketing/attributes: + get: + tags: + - ticketing + summary: List ticket attributes + description: Returns list of the ticket attributes + operationId: getTicketAttributes + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TicketingAttributePublicApiDTO" + /v2/ticketing/contact/contacts: + get: + tags: + - ticketing + summary: List contacts + description: Returns list of contacts + operationId: getContacts_1 + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ContactResponseDTO" + /v2/ticketing/ticket-form/{id}: + get: + tags: + - ticketing + summary: Ticket form + description: "Returns a ticket form with fields " + operationId: getTicketFormById + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/TicketFormPublicApiDTO" + /v2/ticketing/ticket-form: + get: + tags: + - ticketing + summary: List ticket forms + description: Returns list of ticket forms with their fields + operationId: getTicketForms + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TicketFormPublicApiDTO" + /v2/ticketing/statuses: + get: + tags: + - ticketing + summary: Get list of ticket status + description: "Get list of ticket status " + operationId: getAllStatuses + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TicketStatusPublicApiDTO" + /v2/ticketing/trigger/boards: + get: + tags: + - ticketing + summary: List boards + description: Returns list of ticketing boards + operationId: getBoards + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TicketingBoardPublicApiDTO" + /v2/ticketing/trigger/board/{boardId}/run: + post: + tags: + - ticketing + summary: List of tickets for board + description: Run a board. Returns list of tickets matching the board condition + and filters. Allows pagination + operationId: getTicketsByBoard + parameters: + - name: boardId + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TicketBoardScrollingRequestDTO" + responses: + default: + description: default response + content: + application/json: + schema: + $ref: "#/components/schemas/TicketDashboardPublicApiDTO" + /v2/ticketing/app-user-contact: + get: + tags: + - ticketing + summary: List of users by user type + description: "Returns list of users (contacts, end-user, technician)" + operationId: getAllUserAndContacts + parameters: + - name: pageSize + in: query + description: Limit number of records per page + schema: + type: integer + format: int32 + default: 50 + - name: anchorNaturalId + in: query + description: Last User Identifier from previous page + schema: + type: integer + format: int32 + default: 0 + - name: searchCriteria + in: query + description: "Search by first name, last name or email address" + schema: + type: string + - name: userType + in: query + description: User Type + schema: + type: string + enum: + - TECHNICIAN + - END_USER + - CONTACT + - name: clientId + in: query + description: Organization identifier + schema: + type: integer + format: int32 + responses: + "200": + description: Returns a list of all users and contacts + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/AppUserAndContactPublicApiDTO" + /v2/user/end-users: + get: + tags: + - system + summary: End user list + description: Get all end users + operationId: getEndUsers_1 + responses: + "200": + description: End user + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/EndUser" + "401": + description: Unauthorized + "403": + description: Forbidden + post: + tags: + - management + summary: Create end user + description: Create an end user + operationId: createEndUser + parameters: + - name: sendInvitation + in: query + description: Whether to send invitation to end user during creation + schema: + type: boolean + default: false + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateEndUserRequest" + responses: + "200": + description: Created end user + content: + application/json: + schema: + $ref: "#/components/schemas/EndUser" + "400": + description: Several possible validation errors + "401": + description: Unauthorized + "403": + description: Forbidden + /v2/user/end-user/{id}: + get: + tags: + - Users + summary: End user details + description: Get details for a specific end user identifier + operationId: getEndUser + parameters: + - name: id + in: path + description: End user identifier + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: End user + content: + application/json: + schema: + $ref: "#/components/schemas/EndUser" + "404": + description: User not found + "400": + description: Bad request or invalid user type + "401": + description: Unauthorized + "403": + description: Forbidden + delete: + tags: + - management + summary: Delete end user + description: Delete an end user + operationId: deleteEndUser + parameters: + - name: id + in: path + description: End user identifier + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: Deleted end user + "400": + description: Several possible validation errors + "401": + description: Unauthorized + "403": + description: Forbidden + "404": + description: User not found + patch: + tags: + - management + summary: Update a specific end user + description: Update a specific end user by their ID + operationId: patchEndUser + parameters: + - name: id + in: path + description: End user identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EndUserPatchRequest" + responses: + "200": + description: End user updated + content: + application/json: + schema: + $ref: "#/components/schemas/EndUser" + "404": + description: User not found + "400": + description: Bad request or invalid user type + "403": + description: Forbidden + "401": + description: Unauthorized + /v2/user/end-user/{id}/custom-fields: + get: + tags: + - Users + summary: End user custom fields + description: Returns list of end user custom fields + operationId: getNodeCustomFields_3 + parameters: + - name: id + in: path + description: End user identifier + required: true + schema: + type: integer + format: int32 + responses: + default: + description: default response + content: + application/json: + schema: + type: object + additionalProperties: + type: object + patch: + tags: + - Users + summary: Update Field Values + description: Update end user custom field values + operationId: updateNodeAttributeValues_3 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: object + responses: + default: + description: default response + content: + "*/*": {} + /v2/user/technicians: + get: + tags: + - system + summary: Technicians list + description: Get all technicians + operationId: getTechnicians + responses: + "200": + description: Technician + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Technician" + "401": + description: Unauthorized + "403": + description: Forbidden + post: + tags: + - management + summary: Create a technician + description: Create a new technician + operationId: createTechnician + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTechnicianRequest" + responses: + "200": + description: Created technician + content: + application/json: + schema: + $ref: "#/components/schemas/Technician" + "400": + description: Several possible validation errors + "401": + description: Unauthorized + "403": + description: Must be a System Administrator + /v2/user/technician/{id}: + get: + tags: + - Users + summary: Technician details + description: Get details for a specific technician identifier + operationId: getTechnician + parameters: + - name: id + in: path + description: Technician identifier + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: Technician + content: + application/json: + schema: + $ref: "#/components/schemas/Technician" + "404": + description: Technician not found + "400": + description: Bad request or invalid user type + "401": + description: Unauthorized + "403": + description: Forbidden + delete: + tags: + - management + summary: Delete a technician + description: Delete a technician by their ID + operationId: deleteTechnician + parameters: + - name: id + in: path + description: Technician identifier + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: Deleted technician + "400": + description: Several possible validation errors + "404": + description: Technician was not found + "401": + description: Unauthorized + "403": + description: Must be a System Administrator + patch: + tags: + - management + summary: Update a technician + description: Update technician by their ID + operationId: updateTechnician + parameters: + - name: id + in: path + description: Technician identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateTechnicianRequest" + responses: + "200": + description: Updated technician + "400": + description: Several possible validation errors + "404": + description: Technician was not found + "401": + description: Unauthorized + "403": + description: Must be a System Administrator + /v2/user/role/{roleId}/add-members: + patch: + tags: + - management + summary: Add user role members + description: Add members to user role + operationId: addUserRoleMembers + parameters: + - name: roleId + in: path + description: Role identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + "*/*": + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "200": + description: User role + content: + application/json: + schema: + $ref: "#/components/schemas/UserRole" + "400": + description: Several possible validation errors + "401": + description: Unauthorized + "403": + description: Forbidden + "404": + description: Role or members not found + /v2/user/roles: + get: + tags: + - system + summary: Get user roles + description: Get list of user roles + operationId: getUserRoles + parameters: + - name: roleType + in: query + description: User role type filter + schema: + type: string + enum: + - TECHNICIAN + - END_USER + responses: + "200": + description: User roles + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/UserRole" + "401": + description: Unauthorized + /v2/user/role/{roleId}/remove-members: + patch: + tags: + - management + summary: Remove users from user role + description: "Remove users from user role " + operationId: removeUserRoleMembers + parameters: + - name: roleId + in: path + description: Role identifier + required: true + schema: + type: integer + format: int32 + requestBody: + content: + "*/*": + schema: + uniqueItems: true + type: array + items: + type: integer + format: int32 + responses: + "200": + description: User role + content: + application/json: + schema: + $ref: "#/components/schemas/UserRole" + "400": + description: Several possible validation errors + "401": + description: Unauthorized + "403": + description: Forbidden + "404": + description: Role or members not found +components: + schemas: + Contact: + type: object + properties: + id: + type: integer + format: int32 + organizationId: + type: integer + format: int32 + uid: + type: string + format: uuid + firstName: + type: string + lastName: + type: string + email: + type: string + phone: + type: string + jobTitle: + type: string + CreateContactRequest: + type: object + properties: + organizationId: + type: integer + description: Organization identifier + format: int32 + firstName: + maxLength: 150 + minLength: 1 + type: string + description: First name should be between 1 and 150 characters + lastName: + maxLength: 150 + minLength: 1 + type: string + description: First name should be between 1 and 150 characters + email: + type: string + description: Email address + phone: + type: string + description: Contact Phone number + jobTitle: + maxLength: 150 + type: string + description: Job title should be between 0 and 150 characters + description: Create contact request payload + ContactPatchRequest: + type: object + properties: + firstName: + maxLength: 150 + type: string + description: First name should be between 0 and 150 characters + lastName: + maxLength: 150 + type: string + description: Last name should be between 0 and 150 characters + email: + type: string + description: Email address + jobTitle: + maxLength: 150 + type: string + description: Job title should be between 0 and 150 characters + organizationId: + type: integer + description: Organization identifier + format: int32 + phone: + type: string + description: Phone number + description: Patch contact request payload + CustomFieldPolicyConditionResponse: + type: object + properties: + id: + type: string + description: Policy condition id + conditionName: + type: string + description: Policy condition name + displayName: + type: string + description: Policy condition display name + enabled: + type: boolean + description: Policy condition enabled + severity: + type: string + description: Policy condition severity + enum: + - NONE + - MINOR + - MODERATE + - MAJOR + - CRITICAL + priority: + type: string + description: Policy condition priority + enum: + - NONE + - LOW + - MEDIUM + - HIGH + channels: + uniqueItems: true + type: array + description: Policy condition notification channels + items: + type: integer + description: Policy condition notification channels + format: int32 + scripts: + type: array + description: Policy condition scripts + items: + $ref: "#/components/schemas/PolicyConditionScript" + notificationAction: + type: string + description: Policy condition notification action + enum: + - NONE + - SEND + notifyOnReset: + type: boolean + description: Policy condition notify on reset + resetThreshold: + type: integer + description: Policy condition reset threshold (seconds) + format: int32 + inheritance: + $ref: "#/components/schemas/PolicyConditionInheritanceStatus" + matchAll: + type: array + description: Custom field value must meet all conditions + items: + $ref: "#/components/schemas/PolicyConditionCustomField" + matchAny: + type: array + description: Custom field value must meet any conditions + items: + $ref: "#/components/schemas/PolicyConditionCustomField" + description: Custom fields policy condition response payload + PolicyConditionCustomField: + required: + - fieldName + - operator + - value + type: object + properties: + fieldName: + maxLength: 250 + minLength: 0 + type: string + description: Custom field name + operator: + type: string + description: Custom field operator + enum: + - EQUALS + - NOT_EQUALS + - LESS_THAN + - LESS_OR_EQUAL_THAN + - GREATER_THAN + - GREATER_OR_EQUAL_THAN + - IS_NOT_NULL + - CONTAINS + - CONTAINS_NONE + - CONTAINS_ANY + value: + maxLength: 65535 + minLength: 0 + type: string + description: Custom field value + description: Policy condition custom field + PolicyConditionInheritanceStatus: + type: object + properties: + inherited: + type: boolean + description: Is policy condition inherited + overridden: + type: boolean + description: Is policy condition overridden + sourcePolicyId: + type: integer + description: Parent policy Id + format: int32 + description: Policy condition inheritance status + PolicyConditionScript: + type: object + properties: + scriptId: + type: integer + description: Policy condition script id + format: int32 + runAs: + type: string + description: Policy condition script runAs + default: SYSTEM + enum: + - SYSTEM + - LOGGED_ON_USER + - LOCAL_ADMIN + - DOMAIN_ADMIN + - PREFERRED_CREDENTIAL_MAC + - PREFERRED_CREDENTIAL_LINUX + scriptParam: + type: string + description: Policy condition script parameter + scriptVariables: + maxItems: 20 + minItems: 0 + type: array + description: Policy condition script variables + items: + $ref: "#/components/schemas/PolicyConditionScriptVariable" + description: Policy condition script + PolicyConditionScriptVariable: + type: object + properties: + id: + type: string + description: Policy condition script variable Id + value: + maxLength: 65535 + minLength: 0 + type: string + description: Policy condition script variable value + description: Policy condition script variable + CustomFieldsPolicyConditionCreateRequest: + type: object + properties: + enabled: + type: boolean + description: Policy condition enabled + default: true + displayName: + maxLength: 255 + minLength: 0 + type: string + description: Policy condition display name + severity: + type: string + description: Policy condition severity + default: NONE + enum: + - NONE + - MINOR + - MODERATE + - MAJOR + - CRITICAL + priority: + type: string + description: Policy condition priority + default: NONE + enum: + - NONE + - LOW + - MEDIUM + - HIGH + channels: + maxItems: 20 + minItems: 0 + uniqueItems: true + type: array + description: Policy condition notification channels + items: + type: integer + description: Policy condition notification channels + format: int32 + scripts: + maxItems: 20 + minItems: 0 + type: array + description: Policy condition scripts + items: + $ref: "#/components/schemas/PolicyConditionScript" + notificationAction: + type: string + description: Policy condition notification action + default: NONE + enum: + - NONE + - SEND + notifyOnReset: + type: boolean + description: Policy condition notify on reset + default: false + resetThreshold: + type: integer + description: Policy condition reset threshold (seconds) + format: int32 + default: 14400 + matchAll: + maxItems: 10 + minItems: 0 + type: array + description: Custom field value must meet all conditions + items: + $ref: "#/components/schemas/PolicyConditionCustomField" + matchAny: + maxItems: 10 + minItems: 0 + type: array + description: Custom field value must meet any conditions + items: + $ref: "#/components/schemas/PolicyConditionCustomField" + description: Custom fields policy condition create request payload + WindowsEventPolicyConditionOccurrence: + type: object + properties: + enabled: + type: boolean + description: Occurrence enabled + default: false + threshold: + type: integer + description: Occurrence threshold + format: int32 + default: 2 + duration: + type: integer + description: Occurrence duration + format: int32 + default: 5 + description: Windows event policy condition occurrence + WindowsEventPolicyConditionResponse: + type: object + properties: + id: + type: string + description: Policy condition id + conditionName: + type: string + description: Policy condition name + displayName: + type: string + description: Policy condition display name + enabled: + type: boolean + description: Policy condition enabled + severity: + type: string + description: Policy condition severity + enum: + - NONE + - MINOR + - MODERATE + - MAJOR + - CRITICAL + priority: + type: string + description: Policy condition priority + enum: + - NONE + - LOW + - MEDIUM + - HIGH + channels: + uniqueItems: true + type: array + description: Policy condition notification channels + items: + type: integer + description: Policy condition notification channels + format: int32 + scripts: + type: array + description: Policy condition scripts + items: + $ref: "#/components/schemas/PolicyConditionScript" + notificationAction: + type: string + description: Policy condition notification action + enum: + - NONE + - SEND + notifyOnReset: + type: boolean + description: Policy condition notify on reset + resetThreshold: + type: integer + description: Policy condition reset threshold (seconds) + format: int32 + inheritance: + $ref: "#/components/schemas/PolicyConditionInheritanceStatus" + source: + type: string + description: Event Source + eventIds: + uniqueItems: true + type: array + description: Event IDs + items: + type: integer + description: Event IDs + format: int32 + text: + $ref: "#/components/schemas/WindowsEventPolicyConditionText" + occurrence: + $ref: "#/components/schemas/WindowsEventPolicyConditionOccurrence" + description: Windows event policy condition response payload + WindowsEventPolicyConditionText: + type: object + properties: + values: + maxItems: 20 + minItems: 0 + uniqueItems: true + type: array + description: Text values + items: + type: string + description: Text values + condition: + type: string + description: Text condition + default: CONTAINS + enum: + - CONTAINS + - NOT_CONTAINS + include: + type: string + description: Text include + default: ALL + enum: + - ALL + - ANY + description: Windows event policy condition text + WindowsEventPolicyConditionCreateRequest: + required: + - eventIds + - source + type: object + properties: + enabled: + type: boolean + description: Policy condition enabled + default: true + displayName: + maxLength: 255 + minLength: 0 + type: string + description: Policy condition display name + severity: + type: string + description: Policy condition severity + default: NONE + enum: + - NONE + - MINOR + - MODERATE + - MAJOR + - CRITICAL + priority: + type: string + description: Policy condition priority + default: NONE + enum: + - NONE + - LOW + - MEDIUM + - HIGH + channels: + maxItems: 20 + minItems: 0 + uniqueItems: true + type: array + description: Policy condition notification channels + items: + type: integer + description: Policy condition notification channels + format: int32 + scripts: + maxItems: 20 + minItems: 0 + type: array + description: Policy condition scripts + items: + $ref: "#/components/schemas/PolicyConditionScript" + notificationAction: + type: string + description: Policy condition notification action + default: NONE + enum: + - NONE + - SEND + notifyOnReset: + type: boolean + description: Policy condition notify on reset + default: false + resetThreshold: + type: integer + description: Policy condition reset threshold (seconds) + format: int32 + default: 14400 + source: + maxLength: 255 + minLength: 0 + type: string + description: Event Source + eventIds: + maxItems: 20 + minItems: 0 + uniqueItems: true + type: array + description: Event IDs + items: + type: integer + description: Event IDs + format: int32 + text: + $ref: "#/components/schemas/WindowsEventPolicyConditionText" + occurrence: + $ref: "#/components/schemas/WindowsEventPolicyConditionOccurrence" + description: Windows event policy condition create request payload + HTTPHeader: + type: object + properties: + name: + type: string + description: Header name + value: + type: string + description: Header value + description: Custom HTTP Headers (i.e. Authorization) + WebhookConfiguration: + type: object + properties: + url: + type: string + description: Callback (WebHook) URL for activity notifications + activities: + type: object + additionalProperties: + type: array + description: Activity filter + items: + type: string + description: Activity filter + description: Activity filter + expand: + type: array + description: Which references to expand in payloads + items: + type: string + description: Which references to expand in payloads + headers: + type: array + description: Custom HTTP Headers (i.e. Authorization) + items: + $ref: "#/components/schemas/HTTPHeader" + organizationIds: + uniqueItems: true + type: array + description: List of organization id to be filtered + items: + type: integer + description: List of organization id to be filtered + format: int32 + FeatureSettings: + type: object + properties: + product: + type: string + description: Configured product code + enabled: + type: boolean + description: Is enabled + targets: + type: array + description: Feature deployment targets + items: + type: string + description: Feature deployment targets + options: + type: object + additionalProperties: + type: object + description: Feature options + description: Feature options + description: Feature/product/integration configuration settings + Location: + type: object + properties: + name: + type: string + description: Location name + address: + type: string + description: Address + description: + type: string + description: Description + userData: + type: object + additionalProperties: true + description: Custom attributes + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + id: + type: integer + description: Location identifier + format: int32 + description: Location + NodeRolePolicyAssignment: + type: object + properties: + nodeRoleId: + type: integer + description: Node Role Identifier + format: int32 + policyId: + type: integer + description: Policy Identifier + format: int32 + description: Node role policy assignments + OrganizationDetailed: + type: object + properties: + name: + type: string + description: Organization full name + description: + type: string + description: Organization Description + userData: + type: object + additionalProperties: true + description: Custom attributes + nodeApprovalMode: + type: string + description: Device Approval Mode + enum: + - AUTOMATIC + - MANUAL + - REJECT + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + id: + type: integer + description: Organization identifier + format: int32 + locations: + type: array + description: List of locations + items: + $ref: "#/components/schemas/Location" + policies: + type: array + description: Node role policy assignments + items: + $ref: "#/components/schemas/NodeRolePolicyAssignment" + settings: + $ref: "#/components/schemas/OrganizationSettings" + OrganizationSettings: + type: object + properties: + trayicon: + $ref: "#/components/schemas/FeatureSettings" + splashtop: + $ref: "#/components/schemas/FeatureSettings" + teamviewer: + $ref: "#/components/schemas/FeatureSettings" + backup: + $ref: "#/components/schemas/FeatureSettings" + psa: + $ref: "#/components/schemas/FeatureSettings" + description: Organization settings + LocationModel: + type: object + properties: + name: + type: string + description: Location name + address: + type: string + description: Address + description: + type: string + description: Description + userData: + type: object + additionalProperties: true + description: Custom attributes + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + OrganizationWithLocationsAndPolicyAssignmentsModel: + type: object + properties: + name: + type: string + description: Organization full name + description: + type: string + description: Organization Description + userData: + type: object + additionalProperties: true + description: Custom attributes + nodeApprovalMode: + type: string + description: Device Approval Mode + enum: + - AUTOMATIC + - MANUAL + - REJECT + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + locations: + type: array + description: List of locations + items: + $ref: "#/components/schemas/LocationModel" + policies: + type: array + description: Node role policy assignments + items: + $ref: "#/components/schemas/NodeRolePolicyAssignment" + DeviceIDList: + type: object + properties: + devices: + type: array + items: + type: integer + format: int32 + AttachmentMetadataPublicApiDTO: + type: object + properties: + name: + type: string + description: name + mimeType: + type: string + description: Mime type + size: + type: string + description: Size in bytes + extension: + type: string + description: File extension + contentId: + type: string + description: Content identifier + 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" + 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 + 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" + 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 + MessageBodyWorkers: + type: object + 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" + ParameterizedHeader: + type: object + properties: + value: + type: string + parameters: + type: object + additionalProperties: + type: string + ChecklistDescription: + type: object + properties: + text: + type: string + html: + type: string + description: Task description + ChecklistTemplatePublicApiDTO: + type: object + properties: + id: + type: integer + description: Identifier + format: int32 + name: + type: string + description: Checklist template name (must be unique) + description: + $ref: "#/components/schemas/ChecklistDescription" + tasks: + type: array + description: Checklist template tasks + items: + $ref: "#/components/schemas/ChecklistTemplateTaskPublicApiDTO" + required: + type: boolean + description: Indicates if the checklist completion is required + lastUpdatedOn: + type: number + description: Last updated on + format: double + lastUpdatedBy: + $ref: "#/components/schemas/ChecklistUserResponseDTO" + archived: + type: boolean + description: Indicates if the checklist template is archived + archivedBy: + $ref: "#/components/schemas/ChecklistUserResponseDTO" + archiveTime: + type: number + description: Archive time + format: double + ChecklistTemplateTaskPublicApiDTO: + type: object + properties: + position: + type: integer + description: Position of the task + format: int32 + name: + type: string + description: Task name + description: + $ref: "#/components/schemas/ChecklistDescription" + description: Checklist template tasks + ChecklistUserResponseDTO: + type: object + properties: + id: + type: integer + format: int32 + firstName: + type: string + lastName: + type: string + deleted: + type: boolean + description: Archive by user + ArchiveChecklistTemplatesRequest: + type: object + properties: + checklistTemplateIds: + type: array + items: + type: integer + format: int32 + ChecklistTemplateTaskPublicApiRequest: + type: object + properties: + position: + type: integer + description: Position of the task + format: int32 + name: + type: string + description: Task name + description: + $ref: "#/components/schemas/ChecklistDescription" + description: Checklist's tasks + CreateChecklistTemplatePublicApiRequest: + type: object + properties: + name: + type: string + description: Checklist template name (must be unique) + description: + $ref: "#/components/schemas/ChecklistDescription" + tasks: + type: array + description: Checklist's tasks + items: + $ref: "#/components/schemas/ChecklistTemplateTaskPublicApiRequest" + required: + type: boolean + description: Checklist's tasks + RestoreChecklistTemplatesRequest: + type: object + properties: + checklistTemplateIds: + type: array + items: + type: integer + format: int32 + UpdateChecklistTemplatePublicApiRequest: + type: object + properties: + id: + minimum: 1 + type: integer + description: Checklist template identifier + format: int32 + name: + type: string + description: Checklist template name (must be unique) + description: + $ref: "#/components/schemas/ChecklistDescription" + tasks: + type: array + description: Checklist's tasks + items: + $ref: "#/components/schemas/ChecklistTemplateTaskPublicApiRequest" + required: + type: boolean + description: Indicates if the checklist is required + ClientChecklistPublicApiDTO: + type: object + properties: + id: + type: integer + description: Identifier + format: int32 + name: + type: string + description: Checklist name (must be unique) + description: + $ref: "#/components/schemas/ChecklistDescription" + required: + type: boolean + description: Indicates if the checklist completion is required + dueDate: + type: number + description: Due date + format: double + completed: + type: boolean + description: Indicates if the checklist is completed + completedOn: + type: number + description: Date of completion + format: double + assignedTo: + $ref: "#/components/schemas/ChecklistUserResponseDTO" + lastUpdatedOn: + type: number + description: Last updated on + format: double + lastUpdatedBy: + $ref: "#/components/schemas/ChecklistUserResponseDTO" + completedTaskCount: + type: integer + description: Last updated by user + format: int32 + totalTaskCount: + type: integer + description: Checklist's total tasks count + format: int32 + tasks: + type: array + description: Checklist's tasks + items: + $ref: "#/components/schemas/ClientChecklistTaskPublicApiDTO" + organizationId: + type: integer + description: Organization identifier + format: int32 + clientName: + type: string + description: Client name + archived: + type: boolean + description: Indicates if the checklist is archived + archivedBy: + $ref: "#/components/schemas/ChecklistUserResponseDTO" + archiveTime: + type: number + description: Archive time + format: double + ClientChecklistTaskPublicApiDTO: + type: object + properties: + id: + type: integer + description: Identifier + format: int32 + position: + type: integer + description: Position of the task + format: int32 + name: + type: string + description: Task name + description: + $ref: "#/components/schemas/ChecklistDescription" + assignedTo: + $ref: "#/components/schemas/ChecklistUserResponseDTO" + dueDate: + type: number + description: Due date + format: double + completed: + type: boolean + description: Indicates if the checklist is completed + completedOn: + type: number + description: Date of completion + format: double + completedBy: + $ref: "#/components/schemas/ChecklistUserResponseDTO" + description: Checklist's tasks + ArchiveClientChecklistRequest: + type: object + properties: + clientChecklistIds: + type: array + items: + type: integer + format: int32 + ClientChecklistTaskPublicApiRequest: + type: object + properties: + id: + minimum: 1 + type: integer + description: Identifier + format: int32 + position: + type: integer + description: Position of the task + format: int32 + name: + type: string + description: Task name + description: + $ref: "#/components/schemas/ChecklistDescription" + assignedToUserId: + minimum: 1 + type: integer + description: User identifier assigned to the checklist task + format: int32 + dueDate: + type: number + description: Due date + format: double + completed: + type: boolean + description: Indicates if the checklist is completed + description: Checklist tasks + CreateClientChecklistAndTasksPublicApiRequest: + type: object + properties: + name: + type: string + description: Checklist name + description: + $ref: "#/components/schemas/ChecklistDescription" + required: + type: boolean + description: Indicates if the checklist completion is required + dueDate: + type: number + description: Due date + format: double + assignedToUserId: + minimum: 1 + type: integer + description: User identifier assigned to the checklist + format: int32 + organizationId: + minimum: 1 + type: integer + description: Organization identifier + format: int32 + checklistTemplateId: + minimum: 1 + type: integer + description: Checklist template identifier + format: int32 + tasks: + type: array + description: Checklist tasks + items: + $ref: "#/components/schemas/ClientChecklistTaskPublicApiRequest" + PromoteClientChecklistWithNamePublicApiRequest: + type: object + properties: + id: + minimum: 1 + type: integer + description: Identifier + format: int32 + name: + type: string + description: Checklist name + UpdateClientChecklistAndTasksPublicApiRequest: + type: object + properties: + checklistId: + minimum: 1 + type: integer + description: Checklist identifier + format: int32 + name: + type: string + description: Checklist name + description: + $ref: "#/components/schemas/ChecklistDescription" + required: + type: boolean + description: Indicates if the checklist completion is required + dueDate: + type: number + description: Due date + format: double + assignedToUserId: + minimum: 1 + type: integer + description: User identifier assigned to the checklist + format: int32 + tasks: + type: array + description: Checklist tasks + items: + $ref: "#/components/schemas/ClientChecklistTaskPublicApiRequest" + ClientDocumentAttributeWithValuePublicApiDTO: + type: object + properties: + name: + type: string + description: Name + value: + type: object + description: Value + valueUpdateTime: + type: number + description: Value Last Updated + format: double + description: Updated Fields + ClientDocumentWithAttributeValuesPublicApiDTO: + type: object + properties: + documentId: + type: integer + description: Document Identifier + format: int32 + documentName: + type: string + description: Document Name + documentDescription: + type: string + description: Document Description + documentUpdateTime: + type: number + description: Document Last Updated + format: double + fields: + type: array + description: Fields + items: + $ref: "#/components/schemas/ClientDocumentAttributeWithValuePublicApiDTO" + documentTemplateId: + type: integer + description: Document Template Identifier + format: int32 + documentTemplateName: + type: string + description: Document Template Name + organizationId: + type: integer + description: Organization Identifier + format: int32 + ClientDocumentWithAttributeValuesPublicApiRequest: + type: object + properties: + documentName: + type: string + description: Document Name + documentDescription: + type: string + description: Document Description + fields: + type: object + additionalProperties: + type: object + description: Fields + description: Fields + ClientDocumentWithAttributeValuesBulkCreatePublicApiRequest: + type: object + properties: + documentName: + type: string + description: Document Name + documentDescription: + type: string + description: Document Description + fields: + type: object + additionalProperties: + type: object + description: Fields + description: Fields + documentTemplateId: + type: integer + description: Document Template Identifier + format: int32 + organizationId: + type: integer + description: Organization Identifier + format: int32 + ClientDocumentWithUpdatedAttributeValuesPublicApiDTO: + type: object + properties: + documentId: + type: integer + description: Document Identifier + format: int32 + documentName: + type: string + description: Document Name + documentDescription: + type: string + description: Document Description + documentUpdateTime: + type: number + description: Document Last Updated + format: double + updatedFields: + type: array + description: Updated Fields + items: + $ref: "#/components/schemas/ClientDocumentAttributeWithValuePublicApiDTO" + documentTemplateId: + type: integer + description: Document Template Identifier + format: int32 + documentTemplateName: + type: string + description: Document Template Name + organizationId: + type: integer + description: Organization Identifier + format: int32 + ClientDocumentWithAttributeValuesBulkUpdatePublicApiRequest: + type: object + properties: + documentId: + type: integer + description: Document Identifier + format: int32 + documentName: + type: string + description: Document Name + documentDescription: + type: string + description: Document Description + fields: + type: object + additionalProperties: + type: object + description: Fields + description: Fields + ArchiveUserInfo: + type: object + properties: + id: + type: integer + format: int32 + displayName: + type: string + deleted: + type: boolean + description: Indicates who archived the template + AttributeContentAdvancedSettings: + type: object + properties: + fileMaxSize: + type: integer + format: int32 + fileExtensions: + type: array + items: + type: string + dateFilters: + $ref: "#/components/schemas/AttributeContentAdvancedSettingsDateFilters" + maxCharacters: + type: integer + format: int32 + complexityRules: + $ref: "#/components/schemas/AttributeContentAdvancedSettingsComplexityRules" + numericRange: + $ref: "#/components/schemas/AttributeContentAdvancedSettingsNumericRange" + org: + uniqueItems: true + type: array + items: + type: integer + format: int32 + nodeClass: + uniqueItems: true + type: array + items: + type: string + enum: + - WINDOWS_SERVER + - WINDOWS_WORKSTATION + - LINUX_WORKSTATION + - MAC + - ANDROID + - APPLE_IOS + - APPLE_IPADOS + - VMWARE_VM_HOST + - VMWARE_VM_GUEST + - HYPERV_VMM_HOST + - HYPERV_VMM_GUEST + - LINUX_SERVER + - MAC_SERVER + - CLOUD_MONITOR_TARGET + - NMS_SWITCH + - NMS_ROUTER + - NMS_FIREWALL + - NMS_PRIVATE_NETWORK_GATEWAY + - NMS_PRINTER + - NMS_SCANNER + - NMS_DIAL_MANAGER + - NMS_WAP + - NMS_IPSLA + - NMS_COMPUTER + - NMS_VM_HOST + - NMS_APPLIANCE + - NMS_OTHER + - NMS_SERVER + - NMS_PHONE + - NMS_VIRTUAL_MACHINE + - NMS_NETWORK_MANAGEMENT_AGENT + - UNMANAGED_DEVICE + - MANAGED_DEVICE + ipAddressType: + type: string + enum: + - ALL + - IPV4 + - IPV6 + expandLargeValueOnRender: + type: boolean + AttributeContentAdvancedSettingsComplexityRules: + type: object + properties: + mustContainOneInteger: + type: boolean + mustContainOneLowercaseLetter: + type: boolean + mustContainOneUppercaseLetter: + type: boolean + greaterOrEqualThanSixCharacters: + type: boolean + AttributeContentAdvancedSettingsDateFilters: + type: object + properties: + type: + type: string + enum: + - NONE + - INCLUDE + - EXCLUDE + - PAST_DATES_ONLY + - FUTURE_DATES_ONLY + - RANGE + selected: + type: array + items: + type: string + AttributeContentAdvancedSettingsNumericRange: + type: object + properties: + min: + type: number + max: + type: number + DocumentAttributeContentPublicApi: + type: object + properties: + values: + type: array + description: Used for dropdown options + items: + $ref: "#/components/schemas/DocumentAttributeContentValuePublicApi" + required: + type: boolean + description: Indicates if the field is required + footerText: + type: string + description: Footer text + tooltipText: + type: string + description: Tooltip text + advancedSettings: + $ref: "#/components/schemas/AttributeContentAdvancedSettings" + description: Field content + DocumentAttributeContentValuePublicApi: + type: object + properties: + id: + type: string + description: Identifier + format: uuid + name: + type: string + description: Dropdown option name + active: + type: boolean + description: Indicates if a dropdown option is active + description: Used for dropdown options + DocumentItemPublicApiDTO: + type: object + properties: + fieldId: + type: integer + description: Field identifier + format: int32 + fieldLabel: + type: string + description: Field or UI element name + fieldName: + type: string + description: Field name + fieldDescription: + type: string + description: Field description + fieldType: + type: string + description: Field type + enum: + - DROPDOWN + - MULTI_SELECT + - CHECKBOX + - TEXT + - TEXT_MULTILINE + - TEXT_ENCRYPTED + - NUMERIC + - DECIMAL + - DATE + - DATE_TIME + - TIME + - ATTACHMENT + - NODE_DROPDOWN + - NODE_MULTI_SELECT + - CLIENT_DROPDOWN + - CLIENT_MULTI_SELECT + - CLIENT_LOCATION_DROPDOWN + - CLIENT_LOCATION_MULTI_SELECT + - CLIENT_DOCUMENT_DROPDOWN + - CLIENT_DOCUMENT_MULTI_SELECT + - EMAIL + - PHONE + - IP_ADDRESS + - WYSIWYG + - URL + fieldTechnicianPermission: + type: string + description: Field technician permission + enum: + - NONE + - EDITABLE + - READ_ONLY + fieldScriptPermission: + type: string + description: Field script permission + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + fieldApiPermission: + type: string + description: Field public API permission + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + fieldDefaultValue: + type: string + description: Default value + fieldContent: + $ref: "#/components/schemas/DocumentAttributeContentPublicApi" + uiElementUid: + type: string + description: UI element identifier + format: uuid + uiElementName: + type: string + description: UI element name + uiElementType: + type: string + description: UI element type + enum: + - TITLE + - DESCRIPTION + - SEPARATOR + uiElementValue: + type: string + description: UI element value + createdTime: + type: number + description: Creation time + format: double + updatedTime: + type: number + description: Last updated time + format: double + description: Document template fields + DocumentTemplatePublicApiDTO: + type: object + properties: + id: + type: integer + description: Identifier + format: int32 + name: + type: string + description: Name of the template (must be unique) + description: + type: string + description: Description of the template + allowMultiple: + type: boolean + description: Indicates if multiple instances of the document template is + allowed + mandatory: + type: boolean + description: Indicates if the document template is mandatory + createTime: + type: number + description: Creation time + format: double + updateTime: + type: number + description: Last updated time + format: double + fields: + type: array + description: Document template fields + items: + $ref: "#/components/schemas/DocumentItemPublicApiDTO" + availableToAllTechnicians: + type: boolean + description: Indicates if the document template is available to all technicians + allowedTechnicianRoles: + type: array + description: List of allowed technician role ids + items: + type: integer + description: List of allowed technician role ids + format: int32 + archived: + type: boolean + description: Indicates if the document template is archived + archivedTime: + type: number + description: Indicates the time the template was archived + format: double + archivedBy: + $ref: "#/components/schemas/ArchiveUserInfo" + NewDocumentAttributeContentPublicApi: + type: object + properties: + values: + type: array + description: Used for dropdown options + items: + $ref: "#/components/schemas/NewDocumentAttributeContentValuePublicApi" + required: + type: boolean + description: Indicates if the field is required + footerText: + type: string + description: Footer text + tooltipText: + type: string + description: Tooltip text + advancedSettings: + $ref: "#/components/schemas/AttributeContentAdvancedSettings" + description: Field content + NewDocumentAttributeContentValuePublicApi: + type: object + properties: + name: + type: string + description: Dropdown option name + description: Used for dropdown options + NewDocumentItemPublicApiRequest: + required: + - fieldLabel + - fieldName + type: object + properties: + fieldLabel: + type: string + description: Field label + fieldName: + type: string + description: Field name (Immutable value) + fieldDescription: + type: string + description: Field description + fieldType: + type: string + description: Field type (Immutable value) + enum: + - DROPDOWN + - MULTI_SELECT + - CHECKBOX + - TEXT + - TEXT_MULTILINE + - TEXT_ENCRYPTED + - NUMERIC + - DECIMAL + - DATE + - DATE_TIME + - TIME + - ATTACHMENT + - NODE_DROPDOWN + - NODE_MULTI_SELECT + - CLIENT_DROPDOWN + - CLIENT_MULTI_SELECT + - CLIENT_LOCATION_DROPDOWN + - CLIENT_LOCATION_MULTI_SELECT + - CLIENT_DOCUMENT_DROPDOWN + - CLIENT_DOCUMENT_MULTI_SELECT + - EMAIL + - PHONE + - IP_ADDRESS + - WYSIWYG + - URL + fieldTechnicianPermission: + type: string + description: Field technician permission + enum: + - NONE + - EDITABLE + - READ_ONLY + fieldScriptPermission: + type: string + description: Field script permission + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + fieldApiPermission: + type: string + description: Field public API permission + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + fieldDefaultValue: + type: string + description: Default value + fieldContent: + $ref: "#/components/schemas/NewDocumentAttributeContentPublicApi" + uiElementName: + type: string + description: UI element name + uiElementType: + type: string + description: UI element type + enum: + - TITLE + - DESCRIPTION + - SEPARATOR + uiElementValue: + type: string + description: UI element value + description: List of fields and ui elements + NewDocumentTemplatePublicApiRequest: + required: + - name + type: object + properties: + name: + type: string + description: Name of the template (must be unique) + description: + type: string + description: Description of the template + allowMultiple: + type: boolean + description: States if multiple instances of the document template is allowed + mandatory: + type: boolean + description: Indicates if the document template is mandatory + fields: + type: array + description: List of fields and ui elements + items: + $ref: "#/components/schemas/NewDocumentItemPublicApiRequest" + availableToAllTechnicians: + type: boolean + description: States if the document template is available to all technicians + allowedTechnicianRoles: + type: array + description: List of allowed technician role ids + items: + type: integer + description: List of allowed technician role ids + format: int32 + UpdateDocumentItemPublicApiRequest: + type: object + properties: + fieldId: + type: integer + description: Field identifier (Used to identify existing fields) + format: int32 + fieldLabel: + type: string + description: Field or UI element name + fieldName: + type: string + description: Field name (Immutable except for new fields) + fieldDescription: + type: string + description: Field description + fieldType: + type: string + description: Field type (Immutable except for new fields) + enum: + - DROPDOWN + - MULTI_SELECT + - CHECKBOX + - TEXT + - TEXT_MULTILINE + - TEXT_ENCRYPTED + - NUMERIC + - DECIMAL + - DATE + - DATE_TIME + - TIME + - ATTACHMENT + - NODE_DROPDOWN + - NODE_MULTI_SELECT + - CLIENT_DROPDOWN + - CLIENT_MULTI_SELECT + - CLIENT_LOCATION_DROPDOWN + - CLIENT_LOCATION_MULTI_SELECT + - CLIENT_DOCUMENT_DROPDOWN + - CLIENT_DOCUMENT_MULTI_SELECT + - EMAIL + - PHONE + - IP_ADDRESS + - WYSIWYG + - URL + fieldTechnicianPermission: + type: string + description: Field technician permission + enum: + - NONE + - EDITABLE + - READ_ONLY + fieldScriptPermission: + type: string + description: Field script permission + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + fieldApiPermission: + type: string + description: Field public API permission + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + fieldDefaultValue: + type: string + description: Default value + fieldContent: + $ref: "#/components/schemas/DocumentAttributeContentPublicApi" + uiElementUid: + type: string + description: UI element identifier + format: uuid + uiElementName: + type: string + description: UI element name + uiElementType: + type: string + description: UI element type + enum: + - TITLE + - DESCRIPTION + - SEPARATOR + uiElementValue: + type: string + description: UI element value + description: List of fields and ui elements + UpdateDocumentTemplatePublicApiRequest: + type: object + properties: + name: + type: string + description: Name of the template (must be unique) + description: + type: string + description: Description of the template + mandatory: + type: boolean + description: Indicates if the document template is mandatory + fields: + type: array + description: List of fields and ui elements + items: + $ref: "#/components/schemas/UpdateDocumentItemPublicApiRequest" + availableToAllTechnicians: + type: boolean + description: States if the document template is available to all technicians + allowedTechnicianRoles: + type: array + description: List of allowed technician role ids + items: + type: integer + description: List of allowed technician role ids + format: int32 + ItamManageAssetRequestPublicApiDTO: + type: object + properties: + assetIds: + uniqueItems: true + type: array + description: Array of asset IDs to perform bulk operations on (provide the + type of asset with the URL) + items: + type: integer + description: Array of asset IDs to perform bulk operations on (provide + the type of asset with the URL) + format: int32 + tagIdsToAdd: + uniqueItems: true + type: array + description: Array of tag IDs to add to the supplied assets + items: + type: integer + description: Array of tag IDs to add to the supplied assets + format: int32 + tagIdsToRemove: + uniqueItems: true + type: array + description: Array of tag IDs to remove from the supplied assets + items: + type: integer + description: Array of tag IDs to remove from the supplied assets + format: int32 + ItamTagPublicApiDTO: + type: object + properties: + id: + type: integer + description: Tag ID + format: int32 + name: + type: string + description: Tag name + description: + type: string + description: Description of the tag + createTime: + type: number + description: Creation time for the tag in seconds since unix epoch + format: double + updateTime: + type: number + description: Last update time for the tag in seconds since unix epoch + format: double + createdByUserId: + type: integer + description: Id of the user that created the tag + format: int32 + updatedByUserId: + type: integer + description: Id of the user that last updated the the tag + format: int32 + CreateItamTagRequest: + type: object + properties: + name: + maxLength: 40 + minLength: 1 + type: string + description: + maxLength: 250 + minLength: 0 + type: string + GetItamTagsResponse: + type: object + properties: + tags: + type: array + items: + $ref: "#/components/schemas/ItamTagDTO" + ItamTagDTO: + type: object + properties: + id: + type: integer + format: int32 + name: + type: string + description: + type: string + createTime: + type: number + format: double + updateTime: + type: number + format: double + createdByUserId: + type: integer + format: int32 + updatedByUserId: + type: integer + format: int32 + targetsCount: + type: integer + format: int32 + createdBy: + $ref: "#/components/schemas/UserBasicInfo" + updatedBy: + $ref: "#/components/schemas/UserBasicInfo" + UserBasicInfo: + type: object + properties: + id: + type: integer + format: int32 + name: + type: string + email: + type: string + GetItamTagsPublicApiResponse: + type: object + properties: + tags: + type: array + description: List of tag objects + items: + $ref: "#/components/schemas/ItamTagPublicApiDTO" + MergeItamTagsPublicApiRequest: + type: object + properties: + tagIds: + uniqueItems: true + type: array + description: Array of tag ids to merge + items: + type: integer + description: Array of tag ids to merge + format: int32 + mergeMethod: + type: string + description: Method to use - merge into an existing tag or create a new + one + enum: + - MERGE_INTO_EXISTING_TAG + - MERGE_INTO_NEW_TAG + mergeIntoTagId: + type: integer + description: "If merging into an existing tag, you must provide the target\ + \ tag id here" + format: int32 + nullable: true + name: + maxLength: 40 + minLength: 0 + type: string + description: "If creating a new tag, you must supply the new tag name here" + nullable: true + description: + maxLength: 250 + minLength: 0 + type: string + description: "If creating a new tag, you can supply the new tag description\ + \ here" + nullable: true + ItamSetAssetTagsRequestPublicApiDTO: + type: object + properties: + tagIds: + uniqueItems: true + type: array + description: "Array of tag IDS to assign to asset from URL. The tags on\ + \ the asset will be set to exactly these tags, removing existing tags\ + \ if necessary" + items: + type: integer + description: "Array of tag IDS to assign to asset from URL. The tags on\ + \ the asset will be set to exactly these tags, removing existing tags\ + \ if necessary" + format: int32 + UpdateItamTagRequest: + type: object + properties: + name: + maxLength: 40 + minLength: 0 + type: string + description: + maxLength: 250 + minLength: 0 + type: string + AttachmentMetadata: + type: object + properties: + name: + type: string + mimeType: + type: string + size: + type: string + extension: + type: string + contentId: + type: string + inline: + type: boolean + description: Attachment metadata + KnowledgeBaseArticlePublicApiContent: + type: object + properties: + html: + type: string + description: Article content html + text: + type: string + description: Article content text + description: Article content + KnowledgeBaseArticlePublicApiDTO: + type: object + properties: + id: + type: integer + description: Identifier + format: int32 + organizationId: + type: integer + description: Organization identifier + format: int32 + parentFolderId: + type: integer + description: Parent folder identifier + format: int32 + name: + type: string + description: Article name + isNinjaArticle: + type: boolean + description: Indicates if the article was created in ninja + isArchived: + type: boolean + description: Indicates if the article is archived + attachments: + type: array + description: Lists the files associated with the article + items: + $ref: "#/components/schemas/KnowledgeBaseAttachmentPublicApiDTO" + content: + $ref: "#/components/schemas/KnowledgeBaseArticlePublicApiContent" + createTime: + type: number + description: Article created time + format: double + updateTime: + type: number + description: Article last updated time + format: double + archivedTime: + type: number + description: Article archived time + format: double + path: + type: string + description: Article path + KnowledgeBaseAttachmentPublicApiDTO: + type: object + properties: + id: + type: integer + description: Identifier + format: int32 + uploadStatus: + type: string + description: Upload status + enum: + - PROCESSING + - SUCCESS + - FAILURE + - SUSPICIOUS + metadata: + $ref: "#/components/schemas/AttachmentMetadata" + description: Lists the files associated with the article + KnowledgeBaseArticleBulkCreatePublicApiRequest: + type: object + properties: + name: + type: string + description: Article name + organizationId: + type: integer + description: Organization Identifier + format: int32 + destinationFolderId: + type: integer + description: Destination folder identifier + format: int32 + destinationFolderPath: + type: string + description: "Folder path, each folder name separated by '|'" + example: Folder 1|Folder 2|Folder 3|Folder 4 + content: + $ref: "#/components/schemas/KnowledgeBaseArticlePublicApiContent" + KnowledgeBaseFolderItemPublicApiDTO: + type: object + properties: + archived: + type: boolean + folder: + type: boolean + id: + type: integer + description: Identifier + format: int32 + organizationId: + type: integer + description: Organization identifier + format: int32 + parentFolderId: + type: integer + description: Parent folder identifier + format: int32 + isFolder: + type: boolean + description: Indicates if this item is a folder + isArchived: + type: boolean + description: Indicates if this item is archived + name: + type: string + description: Article name (In the case of uploaded articles this will be + the file name) + fileSize: + type: string + description: Article file size (Only for uploaded knowledge base articles) + fileExtension: + type: string + description: Article file extension (For native kb articles the extension + will be 'ninja') + fileUploadStatus: + type: string + description: Article file upload status (Only for uploaded knowledge base + articles) + enum: + - PROCESSING + - SUCCESS + - FAILURE + - SUSPICIOUS + createTime: + type: number + description: Item created time + format: double + updateTime: + type: number + description: Item last updated time + format: double + description: Folder content + KnowledgeBaseFolderPublicApiDTO: + type: object + properties: + id: + type: integer + description: Identifier + format: int32 + organizationId: + type: integer + description: Organization identifier + format: int32 + parentFolderId: + type: integer + description: Parent folder identifier + format: int32 + name: + type: string + description: Article name + isArchived: + type: boolean + description: Indicates if the article is archived + createTime: + type: number + description: Folder created time + format: double + updateTime: + type: number + description: Folder last updated time + format: double + archivedTime: + type: number + description: Folder archived time + format: double + content: + type: array + description: Folder content + items: + $ref: "#/components/schemas/KnowledgeBaseFolderItemPublicApiDTO" + MovePublicApiRequest: + type: object + properties: + folderIds: + type: array + description: Folders to move + items: + type: integer + description: Folders to move + format: int32 + documentIds: + type: array + description: Documents to move + items: + type: integer + description: Documents to move + format: int32 + destinationFolderId: + type: integer + description: Destination folder + format: int32 + destinationOrganizationId: + type: integer + description: Destination client. Use when the root folder of the client + does not exist. + format: int32 + KnowledgeBaseArticleBulkUpdatePublicApiRequest: + type: object + properties: + id: + type: integer + description: Article identifier + format: int32 + name: + type: string + description: Article name + content: + $ref: "#/components/schemas/KnowledgeBaseArticlePublicApiContent" + 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 + 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 + 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 + CreateUnmanagedDevicePublicApiResponseDTO: + type: object + properties: + nodeId: + type: integer + format: int32 + CreateUnmanagedDevicePublicApiRequest: + required: + - locationId + - name + - orgId + - roleId + - serialNumber + type: object + properties: + name: + maxLength: 200 + minLength: 0 + type: string + description: The display name of the device to be created + orgId: + type: integer + description: The id of the organization the device belongs to + format: int32 + locationId: + type: integer + description: The id of the location the device belongs to + format: int32 + roleId: + type: integer + description: "The id of the role to use for this device. Must be a sub-role + of Unmanaged Device " + format: int32 + serialNumber: + type: string + description: The serial number of the device + assignedUserUid: + type: string + description: The UUID of the user this device is assigned to + format: uuid + warrantyStartDate: + type: number + description: "The warranty start date for the device, in unix epoch seconds" + format: double + warrantyEndDate: + type: number + description: "The warranty end date for the device, in unix epoch seconds" + format: double + UpdateUnmanagedDevicePublicApiRequest: + required: + - locationId + - name + - orgId + - serialNumber + type: object + properties: + name: + maxLength: 200 + minLength: 0 + type: string + description: The display name of the device to be updated + orgId: + type: integer + description: The id of the organization the device belongs to + format: int32 + locationId: + type: integer + description: The id of the location the device belongs to + format: int32 + serialNumber: + type: string + description: The serial number of the device + assignedUserUid: + type: string + description: The UUID of the user this device is assigned to + format: uuid + warrantyStartDate: + type: number + description: "The warranty start date for the device, in unix epoch seconds" + format: double + warrantyEndDate: + type: number + description: "The warranty end date for the device, in unix epoch seconds" + format: double + LockhartIntegrityCheckJobCreationResponse: + type: object + properties: + result: + type: string + enum: + - SUCCESS + - FAILURE + - UNSUPPORTED + - UNCOMPLETED + jobUid: + type: string + format: uuid + deviceId: + type: integer + format: int32 + planGuid: + type: string + format: uuid + planName: + type: string + planType: + type: string + description: Response of the Integrity Check Job creation. + LockhartIntegrityCheckJobCreationRequest: + type: object + properties: + deviceId: + type: integer + format: int32 + planUid: + type: string + format: uuid + description: Request of the Integrity Check Job creation. + AttributeContentPublicApiDTO: + type: object + properties: + customizeForEndUser: + type: boolean + description: Whether the attribute should be customized for end users + endUserCustomization: + $ref: "#/components/schemas/EndUserCustomization" + values: + type: array + description: "For multi-select attributes, this is the list of values available" + items: + $ref: "#/components/schemas/AttributeContentValue" + required: + type: boolean + description: Boolean representing whether the attribute is required or not + footerText: + type: string + description: Text to include after rendering the attribute + tooltipText: + type: string + description: Text to use as a tooltip for the attribute + advancedSettings: + $ref: "#/components/schemas/AttributeContentAdvancedSettings" + description: "For multi-select attributes, these are the available content options" + AttributeContentValue: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + active: + type: boolean + system: + type: boolean + AttributeFormContentCommonItemPublicApiDTO: + type: object + properties: + id: + type: integer + description: ID of an attribute + format: int32 + name: + type: string + description: Name of the content item + fieldName: + type: string + description: Field name of the attribute + description: + type: string + description: Description of the content item + entityType: + type: string + description: "If the attribute references a specific entity, its type will\ + \ be specified in this field" + enum: + - USER + - NODE + - TICKET + - DOCUMENT + attributeType: + type: string + description: Type of the attribute + enum: + - DROPDOWN + - MULTI_SELECT + - CHECKBOX + - TEXT + - TEXT_MULTILINE + - TEXT_ENCRYPTED + - NUMERIC + - DECIMAL + - DATE + - DATE_TIME + - TIME + - ATTACHMENT + - NODE_DROPDOWN + - NODE_MULTI_SELECT + - CLIENT_DROPDOWN + - CLIENT_MULTI_SELECT + - CLIENT_LOCATION_DROPDOWN + - CLIENT_LOCATION_MULTI_SELECT + - CLIENT_DOCUMENT_DROPDOWN + - CLIENT_DOCUMENT_MULTI_SELECT + - EMAIL + - PHONE + - IP_ADDRESS + - WYSIWYG + - URL + attributeScope: + type: string + description: "Scope of the attribute. NOTE: This field is being depricated" + enum: + - NODE_GLOBAL + - NODE_ROLE + - NODE_CLASS + definitionScope: + uniqueItems: true + type: array + description: Definition scopes of the attribute + items: + type: string + description: Definition scopes of the attribute + enum: + - NODE + - END_USER + - LOCATION + - ORGANIZATION + technicianPermission: + type: string + description: Type of technician permission on the attribute + enum: + - NONE + - EDITABLE + - READ_ONLY + scriptPermission: + type: string + description: Type of script permission on the attribute + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + apiPermission: + type: string + description: Type of API permission on the attribute + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + defaultValue: + type: string + description: "For multi-select attributes, this is the id of the default\ + \ value" + content: + $ref: "#/components/schemas/AttributeContentPublicApiDTO" + active: + type: boolean + description: Whether the attribute is active or not + createTime: + type: number + description: The time that the attribute was created (unix epoch) + format: double + updateTime: + type: number + description: The time that the attribute was last updated (unix epoch) + format: double + uiElementUid: + type: string + description: "For UI elements, the uuid of the element" + format: uuid + uiElementType: + type: string + description: "For UI elements, type of the element" + enum: + - TITLE + - DESCRIPTION + - SEPARATOR + uiElementValue: + type: string + description: "For UI elements, value of the element" + uiElementCreateTime: + type: number + description: "For UI elements, timestamp of when the element was created\ + \ (unix epoch)" + format: double + uiElementUpdateTime: + type: number + description: "For UI elements, timestamp of when the element was last updated\ + \ (unix epoch)" + format: double + description: "This object represents either an attribute, or a UI Element. The\ + \ available attributes will depend on which type it is" + CustomTabPublicApiDTO: + type: object + properties: + default: + type: boolean + id: + type: integer + description: Tab ID + format: int32 + name: + type: string + description: Display name of tab + entityType: + type: string + description: "The type of object the tab is for (ie, NODE_ROLE, ORGANIZATION,\ + \ END_USER, etc)" + enum: + - NODE_ROLE + - ORGANIZATION + - END_USER + entityId: + type: integer + description: "For entity types that are bound to an ID, this will be the\ + \ id of the object. Otherwise, omitted" + format: int32 + parentTabId: + type: integer + description: "For tab extensions, this will be the id of the tab that was\ + \ extended (ie, the 'root tab')" + format: int32 + items: + type: array + description: The content of the tab + items: + $ref: "#/components/schemas/AttributeFormContentCommonItemPublicApiDTO" + position: + type: integer + description: Integer representing the position of the tab. Used when ordering + multiple tabs + format: int32 + isDefault: + type: boolean + description: "True if this is a default tab, false otherwise" + EndUserCustomization: + type: object + properties: + name: + type: string + description: + type: string + label: + type: string + AttributeFormContentItemPublicApiDTO: + type: object + properties: + itemType: + type: string + description: Specifies whether this item is an ATTRIBUTE or a UI_ELEMENT + enum: + - ATTRIBUTE + - UI_ELEMENT + id: + type: integer + description: "If the content item is an attribute, then this will be the\ + \ id of that attribute otherwise this should be omitted" + format: int32 + name: + type: string + uiElementUid: + type: string + format: uuid + uiElementType: + type: string + enum: + - TITLE + - DESCRIPTION + - SEPARATOR + uiElementValue: + type: string + uiElementCreateTime: + type: number + format: double + uiElementUpdateTime: + type: number + format: double + NewCustomTabPublicApiRequest: + required: + - name + type: object + properties: + name: + type: string + description: The display name to use for the custom tab + entityType: + type: string + description: The type to use for the custom tab. Organizations and Locations + share the same type of tab + enum: + - NODE_ROLE + - ORGANIZATION + - END_USER + entityId: + minimum: 1 + type: integer + description: "For tab types that require an id to create (currently, only\ + \ NODE_ROLE types), this field is the ID of the entity" + format: int32 + items: + type: array + description: The initial list of content items to include in the tab + items: + $ref: "#/components/schemas/AttributeFormContentItemPublicApiDTO" + position: + type: integer + format: int32 + CustomTabHierarchyPublicApiDTO: + type: object + properties: + tabs: + type: array + description: list of objects representing the root tab and any tab extensions + added from the role hierarchy + items: + $ref: "#/components/schemas/CustomTabPublicApiDTO" + description: "When rendering custom tabs with extensions, multiple tab objects\ + \ will be returned. The first will be the root, and the rest will be 'extensions'" + CustomTabLabelPublicApiDTO: + type: object + properties: + id: + type: integer + description: Tab ID + format: int32 + name: + type: string + description: Display name of tab + nodeRoleId: + type: integer + description: "For tabs associated with a role, this will be the roleId the\ + \ tab is associated with" + format: int32 + position: + type: integer + description: "When tabs are ordered, such as when retrieving a tab summary,\ + \ this is the position that the tab should be rendered in" + format: int32 + hiddenForRoles: + type: array + description: Array of roleIds that should not display this custom tab + items: + type: integer + description: Array of roleIds that should not display this custom tab + format: int32 + default: + type: boolean + description: True if this tab is a 'default tab' + description: Simplified view of a tab that omits the content of the tab. Used + when retrieving tab summaries/lists + CustomTabSummaryPublicApiDTO: + type: object + properties: + labels: + type: array + description: Each tab will be returned as a CustomTabLabelPublicApiDTO object. + These will not be sorted. It is the callers responsibility to sort the + tabs if that is desired + items: + $ref: "#/components/schemas/CustomTabLabelPublicApiDTO" + roleHierarchy: + type: array + description: "When retrieving tab summaries for roles, we will return the\ + \ role hierarchy as a list of roleIds in order from the root node to the\ + \ requested roleId. This is useful for sorting tabs, since that is done\ + \ on a per-role basis" + items: + type: integer + description: "When retrieving tab summaries for roles, we will return\ + \ the role hierarchy as a list of roleIds in order from the root node\ + \ to the requested roleId. This is useful for sorting tabs, since that\ + \ is done on a per-role basis" + format: int32 + UpdateTabNamePublicApiRequest: + required: + - name + type: object + properties: + tabId: + minimum: 1 + type: integer + format: int32 + name: + type: string + UpdateCustomTabPublicApiRequest: + type: object + properties: + roleId: + minimum: 1 + type: integer + format: int32 + items: + type: array + items: + $ref: "#/components/schemas/AttributeFormContentItemPublicApiDTO" + position: + type: integer + format: int32 + CustomTabsVisibilityPublicApiDTO: + type: object + properties: + tabId: + type: integer + format: int32 + hidden: + type: boolean + CustomTabsOrderPublicApiDTO: + type: object + properties: + tabId: + type: integer + format: int32 + position: + type: integer + format: int32 + CustomTabLabelDTO: + type: object + properties: + id: + type: integer + format: int32 + name: + type: string + nodeRoleId: + type: integer + format: int32 + position: + type: integer + format: int32 + hiddenForRoles: + type: array + items: + type: integer + format: int32 + default: + type: boolean + CustomTabsOrderDTO: + type: object + properties: + tabId: + type: integer + format: int32 + position: + type: integer + format: int32 + CarbonCopy: + type: object + properties: + uids: + uniqueItems: true + type: array + description: List of user uids to be carbon-copied + nullable: true + example: + - 1fa74a18-a329-40d8-b5b7-0a22624f7800 + - b0558cb6-3c4e-438c-b8fd-5247c648bbbe + items: + type: string + description: List of user uids to be carbon-copied + format: uuid + nullable: true + emails: + uniqueItems: true + type: array + description: emails + nullable: true + example: + - example1@example.com + - example2@example.com + items: + type: string + description: emails + nullable: true + example: '["example1@example.com","example2@example.com"]' + nullable: true + NewTicket: + required: + - clientId + - status + - subject + - ticketFormId + type: object + properties: + clientId: + type: integer + description: Client (Organization) identifier + format: int32 + example: 1 + ticketFormId: + type: integer + description: Ticket form identifier + format: int32 + example: 1 + locationId: + type: integer + description: Location identifier + format: int32 + nullable: true + example: 1 + nodeId: + type: integer + description: Device identifier + format: int32 + nullable: true + example: 1 + subject: + maxLength: 200 + minLength: 0 + type: string + example: CPU with problems + description: + $ref: "#/components/schemas/NewTicketLogEntry" + status: + type: string + default: "1000" + type: + type: string + description: Type of ticket + nullable: true + example: PROBLEM + enum: + - PROBLEM + - QUESTION + - INCIDENT + - TASK + cc: + $ref: "#/components/schemas/CarbonCopy" + assignedAppUserId: + type: integer + format: int32 + nullable: true + requesterUid: + type: string + format: uuid + severity: + type: string + nullable: true + default: NONE + enum: + - NONE + - MINOR + - MODERATE + - MAJOR + - CRITICAL + priority: + type: string + nullable: true + default: NONE + enum: + - NONE + - LOW + - MEDIUM + - HIGH + parentTicketId: + type: integer + description: Ticket parent identifier + format: int32 + nullable: true + example: 1 + tags: + type: array + nullable: true + example: + - tag1 + - tag2 + items: + type: string + nullable: true + example: '["tag1","tag2"]' + attributes: + type: array + nullable: true + items: + $ref: "#/components/schemas/TicketingAttributeValue" + additionalAssignedTechnicianIds: + uniqueItems: true + type: array + description: Additional assigned technician identifiers + nullable: true + example: + - 300 + - 789 + items: + type: integer + description: Additional assigned technician identifiers + format: int32 + nullable: true + NewTicketLogEntry: + required: + - public + type: object + properties: + public: + type: boolean + default: true + body: + type: string + nullable: true + example: new comment + htmlBody: + type: string + nullable: true + example:
new comment
+ timeTracked: + type: integer + description: time in seconds + format: int32 + nullable: true + example: 60 + duplicateInIncidents: + type: boolean + TicketingAttributeValue: + required: + - attributeId + - value + type: object + properties: + id: + type: integer + format: int32 + nullable: true + example: 1 + attributeId: + type: integer + description: Attribute identifier + format: int32 + example: 1 + value: + type: string + description: Attribute value + nullable: true + AttributeValueDTO: + type: object + properties: + id: + type: integer + format: int32 + attributeId: + type: integer + format: int32 + value: + type: object + CcList: + type: object + properties: + uids: + uniqueItems: true + type: array + items: + type: string + format: uuid + emails: + uniqueItems: true + type: array + items: + type: string + TicketDTO: + type: object + properties: + id: + type: integer + format: int32 + version: + type: integer + format: int32 + nodeId: + type: integer + format: int32 + clientId: + type: integer + format: int32 + locationId: + type: integer + format: int32 + assignedAppUserId: + type: integer + format: int32 + requesterUid: + type: string + format: uuid + subject: + type: string + status: + $ref: "#/components/schemas/TicketStatusPublicApiDTO" + type: + type: string + enum: + - PROBLEM + - QUESTION + - INCIDENT + - TASK + priority: + type: string + enum: + - NONE + - LOW + - MEDIUM + - HIGH + severity: + type: string + enum: + - NONE + - MINOR + - MODERATE + - MAJOR + - CRITICAL + ticketFormId: + type: integer + format: int32 + source: + type: string + enum: + - TECHNICIAN + - EMAIL + - WEB_FORM + - HELP_REQUEST + - END_USER + - CONDITION + - SCHEDULED_SCRIPT + - ACTIVITY + tags: + type: array + items: + type: string + ccList: + $ref: "#/components/schemas/CcList" + createTime: + type: number + format: double + deleted: + type: boolean + attributeValues: + type: array + items: + $ref: "#/components/schemas/AttributeValueDTO" + additionalAssignedTechnicianIds: + uniqueItems: true + type: array + items: + type: integer + format: int32 + TicketStatusPublicApiDTO: + type: object + properties: + name: + type: string + displayName: + type: string + parentId: + type: integer + format: int32 + statusId: + type: integer + format: int32 + AgreementDTO: + type: object + properties: + id: + type: integer + format: int32 + name: + type: string + AgreementProductTimeEntryDTO: + type: object + properties: + id: + type: integer + format: int32 + name: + type: string + TechniciansTaggedMetadataDTO: + type: object + properties: + id: + type: integer + format: int32 + email: + type: string + displayName: + type: string + deleted: + type: boolean + permitted: + type: boolean + TicketLogEntryAutomationDTO: + type: object + properties: + id: + type: integer + format: int32 + name: + type: string + system: + type: boolean + type: + type: string + TicketLogEntryPublicApiDTO: + type: object + properties: + id: + type: integer + format: int32 + appUserContactUid: + type: string + format: uuid + appUserContactId: + type: integer + format: int32 + appUserContactType: + type: string + enum: + - TECHNICIAN + - END_USER + - CONTACT + type: + type: string + enum: + - DESCRIPTION + - COMMENT + - CONDITION + - SAVE + - DELETE + - PRODUCT + body: + type: string + htmlBody: + type: string + fullEmailBody: + type: string + publicEntry: + type: boolean + system: + type: boolean + createTime: + type: number + format: double + changeDiff: + type: object + activityId: + type: integer + format: int64 + timeTracked: + type: integer + format: int32 + technicianTagged: + type: array + items: + type: integer + format: int32 + techniciansTaggedMetadata: + type: array + items: + $ref: "#/components/schemas/TechniciansTaggedMetadataDTO" + automation: + $ref: "#/components/schemas/TicketLogEntryAutomationDTO" + blockedByInvoice: + type: boolean + ticketTimeEntry: + $ref: "#/components/schemas/TicketTimeEntryDTO" + emailResponse: + type: boolean + TicketTimeEntryDTO: + type: object + properties: + ticketLogEntryId: + type: integer + format: int32 + invoiceId: + type: integer + format: int32 + startDate: + type: integer + format: int64 + remote: + type: boolean + billing: + type: string + enum: + - BILLABLE + - NOT_BILLABLE + - NO_CHARGE + billingStatus: + type: string + enum: + - BILLED + - PENDING + - NOT_BILLABLE + agreementOriginType: + type: string + enum: + - NONE + - SELF + - TICKET + price: + type: number + timeTracked: + type: integer + format: int32 + agreement: + $ref: "#/components/schemas/AgreementDTO" + agreementProduct: + $ref: "#/components/schemas/AgreementProductTimeEntryDTO" + UpdateTicket: + required: + - clientId + - requesterUid + - status + - subject + - ticketFormId + - version + type: object + properties: + version: + type: integer + description: ticket version + format: int32 + example: 1 + clientId: + type: integer + description: Client (Organization) identifier + format: int32 + example: 1 + ticketFormId: + type: integer + description: Ticket form identifier + format: int32 + example: 1 + locationId: + type: integer + description: Location identifier + format: int32 + nullable: true + example: 1 + nodeId: + type: integer + description: Device identifier + format: int32 + nullable: true + example: 1 + subject: + maxLength: 200 + minLength: 0 + type: string + example: CPU with problems + status: + type: string + default: "1000" + type: + type: string + description: Type of ticket + nullable: true + example: PROBLEM + enum: + - PROBLEM + - QUESTION + - INCIDENT + - TASK + cc: + $ref: "#/components/schemas/CarbonCopy" + assignedAppUserId: + type: integer + format: int32 + nullable: true + requesterUid: + type: string + format: uuid + severity: + type: string + nullable: true + default: NONE + enum: + - NONE + - MINOR + - MODERATE + - MAJOR + - CRITICAL + priority: + type: string + nullable: true + default: NONE + enum: + - NONE + - LOW + - MEDIUM + - HIGH + parentTicketId: + type: integer + description: Ticket parent identifier + format: int32 + nullable: true + example: 1 + tags: + type: array + nullable: true + example: + - tag1 + - tag2 + items: + type: string + nullable: true + example: '["tag1","tag2"]' + attributes: + type: array + nullable: true + items: + $ref: "#/components/schemas/TicketingAttributeValue" + additionalAssignedTechnicianIds: + uniqueItems: true + type: array + description: Additional assigned technician identifiers + nullable: true + example: + - 300 + - 789 + items: + type: integer + description: Additional assigned technician identifiers + format: int32 + nullable: true + 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 + WindowsServiceControlRequest: + type: object + properties: + action: + type: string + description: Action + enum: + - START + - PAUSE + - STOP + - RESTART + AgentDevice: + type: object + allOf: + - $ref: "#/components/schemas/Device" + - type: object + properties: + os: + $ref: "#/components/schemas/OperatingSystem" + system: + $ref: "#/components/schemas/ComputerSystem" + memory: + $ref: "#/components/schemas/Memory" + processors: + type: array + description: Processors + items: + $ref: "#/components/schemas/Processor" + volumes: + type: array + description: Disk Volumes + items: + $ref: "#/components/schemas/Volume" + lastLoggedInUser: + type: string + description: Username that logged in most recently + BackupUsage: + type: object + properties: + revisionsCurrentSize: + type: integer + description: Revisions current size + format: int64 + revisionsPreviousSize: + type: integer + description: Revisions previous size + format: int64 + revisionsDeletedSize: + type: integer + description: Revisions deleted size + format: int64 + localFileFolderSize: + type: integer + description: Revisions local file folder size + format: int64 + localImageSize: + type: integer + description: Revisions local image size + format: int64 + localImageV2Size: + type: integer + description: Revisions local image v2 size + format: int64 + cloudFileFolderSize: + type: integer + description: Revisions cloud file folder size + format: int64 + cloudImageSize: + type: integer + description: Revisions cloud image size + format: int64 + cloudImageV2Size: + type: integer + description: Revisions cloud image v2 size + format: int64 + lastSuccessfulBackupJob: + type: number + description: Last successful job. This is provided when the 'includeLastBackupJobTimes' + query parameter is set to 'true' + format: double + lastFailedBackupJob: + type: number + description: Last failed job. This is provided when the 'includeLastBackupJobTimes' + query parameter is set to 'true' + format: double + revisionsTotalSize: + type: integer + description: Revisions total size + format: int64 + readOnly: true + cloudTotalSize: + type: integer + description: Revisions cloud total size + format: int64 + readOnly: true + localTotalSize: + type: integer + description: Revisions local total size + format: int64 + readOnly: true + description: Device Backup Usage + CloudMonitorDNS: + type: object + allOf: + - $ref: "#/components/schemas/Device" + - type: object + properties: + enabled: + type: boolean + description: Is enabled? + interval: + type: integer + description: Monitoring interval (seconds) + format: int32 + timeout: + type: integer + description: Timeout (seconds) + format: int32 + target: + type: string + description: "Monitoring target (hostname, IP address or URL)" + CloudMonitorEmailServer: + type: object + allOf: + - $ref: "#/components/schemas/Device" + - type: object + properties: + enabled: + type: boolean + description: Is enabled? + interval: + type: integer + description: Monitoring interval (seconds) + format: int32 + timeout: + type: integer + description: Timeout (seconds) + format: int32 + target: + type: string + description: SMTP Host (hostname or IP address) + smtpPort: + type: integer + description: SMTP Port + format: int32 + senderEmail: + type: string + description: Sender's email (FROM) + recipientEmail: + type: string + description: Recipient's email (TO) + CloudMonitorHTTP: + type: object + allOf: + - $ref: "#/components/schemas/Device" + - type: object + properties: + enabled: + type: boolean + description: Is enabled? + interval: + type: integer + description: Monitoring interval (seconds) + format: int32 + timeout: + type: integer + description: Timeout (seconds) + format: int32 + target: + type: string + description: "Monitoring target (hostname, IP address or URL)" + CloudMonitorPing: + type: object + allOf: + - $ref: "#/components/schemas/Device" + - type: object + properties: + enabled: + type: boolean + description: Is enabled? + interval: + type: integer + description: Monitoring interval (seconds) + format: int32 + timeout: + type: integer + description: Timeout (seconds) + format: int32 + target: + type: string + description: "Monitoring target (hostname, IP address or URL)" + CloudMonitorPortScan: + type: object + allOf: + - $ref: "#/components/schemas/Device" + - type: object + properties: + enabled: + type: boolean + description: Is enabled? + interval: + type: integer + description: Monitoring interval (seconds) + format: int32 + timeout: + type: integer + description: Timeout (seconds) + format: int32 + target: + type: string + description: "Monitoring target (hostname, IP address or URL)" + ComputerSystem: + type: object + properties: + name: + type: string + description: Name + manufacturer: + type: string + description: Manufacturer + model: + type: string + description: Model + biosSerialNumber: + type: string + description: Bios Serial Number + serialNumber: + type: string + description: Serial Number + domain: + type: string + domainRole: + type: string + numberOfProcessors: + type: integer + format: int32 + totalPhysicalMemory: + type: integer + format: int64 + virtualMachine: + type: boolean + chassisType: + type: string + description: Computer System (Chassis) + Device: + type: object + properties: + id: + type: integer + description: Node (Device) identifier + format: int32 + uid: + type: string + description: Node (Device) UUID + format: uuid + assignedOwnerUid: + type: string + description: Node (Device) Owner UUID + format: uuid + parentDeviceId: + type: integer + description: Parent Node identifier + format: int32 + organizationId: + type: integer + description: Organization identifier + format: int32 + locationId: + type: integer + description: Location identifier + format: int32 + nodeClass: + type: string + description: Node Class + enum: + - WINDOWS_SERVER + - WINDOWS_WORKSTATION + - LINUX_WORKSTATION + - MAC + - ANDROID + - APPLE_IOS + - APPLE_IPADOS + - VMWARE_VM_HOST + - VMWARE_VM_GUEST + - HYPERV_VMM_HOST + - HYPERV_VMM_GUEST + - LINUX_SERVER + - MAC_SERVER + - CLOUD_MONITOR_TARGET + - NMS_SWITCH + - NMS_ROUTER + - NMS_FIREWALL + - NMS_PRIVATE_NETWORK_GATEWAY + - NMS_PRINTER + - NMS_SCANNER + - NMS_DIAL_MANAGER + - NMS_WAP + - NMS_IPSLA + - NMS_COMPUTER + - NMS_VM_HOST + - NMS_APPLIANCE + - NMS_OTHER + - NMS_SERVER + - NMS_PHONE + - NMS_VIRTUAL_MACHINE + - NMS_NETWORK_MANAGEMENT_AGENT + - UNMANAGED_DEVICE + - MANAGED_DEVICE + nodeRoleId: + type: integer + description: Node Role identifier + format: int32 + rolePolicyId: + type: integer + description: Node Role policy ID based on organization and location Policy + Mapping + format: int32 + policyId: + type: integer + description: Assigned policy ID (overrides organization and location policy + mapping) + format: int32 + approvalStatus: + type: string + description: Approval Status + enum: + - PENDING + - APPROVED + offline: + type: boolean + description: Is Offline? + displayName: + type: string + description: Display Name + systemName: + type: string + description: System Name + dnsName: + type: string + description: DNS Name + netbiosName: + type: string + description: NETBIOS Name + created: + type: number + description: Created + format: double + lastContact: + type: number + description: Last Contact + format: double + lastUpdate: + type: number + description: Last data submission timestamp + format: double + userData: + type: object + additionalProperties: true + description: Custom attributes + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + maintenance: + $ref: "#/components/schemas/Maintenance" + references: + $ref: "#/components/schemas/NodeReferences" + ipAddresses: + type: array + description: Device IP addresses + items: + type: string + description: Device IP addresses + macAddresses: + type: array + description: Device MAC addresses + items: + type: string + description: Device MAC addresses + publicIP: + type: string + description: Device Public IP Address + notes: + type: array + description: Device Notes + items: + $ref: "#/components/schemas/Note" + deviceType: + type: string + discriminator: + propertyName: deviceType + Maintenance: + type: object + properties: + status: + type: string + description: Maintenance mode status + enum: + - PENDING + - IN_MAINTENANCE + - FAILED + start: + type: number + description: Maintenance mode start time + format: double + end: + type: number + description: Maintenance mode end time + format: double + description: Maintenance mode status + MdmDevice: + type: object + allOf: + - $ref: "#/components/schemas/Device" + Memory: + type: object + properties: + capacity: + type: integer + description: Capacity + format: int64 + description: Memory information + NMSServer: + type: object + allOf: + - $ref: "#/components/schemas/Device" + NMSTarget: + type: object + allOf: + - $ref: "#/components/schemas/Device" + NodeReferences: + type: object + properties: + organization: + $ref: "#/components/schemas/Organization" + location: + $ref: "#/components/schemas/Location" + rolePolicy: + $ref: "#/components/schemas/Policy" + policy: + $ref: "#/components/schemas/Policy" + role: + $ref: "#/components/schemas/NodeRole" + backupUsage: + $ref: "#/components/schemas/BackupUsage" + warranty: + $ref: "#/components/schemas/WarrantyDates" + assignedOwner: + $ref: "#/components/schemas/User" + description: Expanded entity references + NodeRole: + type: object + properties: + id: + type: integer + description: Device Role identifier + format: int32 + name: + type: string + description: Name + description: + type: string + description: Description + nodeClass: + type: string + description: Node Class + enum: + - WINDOWS_SERVER + - WINDOWS_WORKSTATION + - LINUX_WORKSTATION + - MAC + - ANDROID + - APPLE_IOS + - APPLE_IPADOS + - VMWARE_VM_HOST + - VMWARE_VM_GUEST + - HYPERV_VMM_HOST + - HYPERV_VMM_GUEST + - LINUX_SERVER + - MAC_SERVER + - CLOUD_MONITOR_TARGET + - NMS_SWITCH + - NMS_ROUTER + - NMS_FIREWALL + - NMS_PRIVATE_NETWORK_GATEWAY + - NMS_PRINTER + - NMS_SCANNER + - NMS_DIAL_MANAGER + - NMS_WAP + - NMS_IPSLA + - NMS_COMPUTER + - NMS_VM_HOST + - NMS_APPLIANCE + - NMS_OTHER + - NMS_SERVER + - NMS_PHONE + - NMS_VIRTUAL_MACHINE + - NMS_NETWORK_MANAGEMENT_AGENT + - UNMANAGED_DEVICE + - MANAGED_DEVICE + custom: + type: boolean + description: Is custom node role? + chassisType: + type: string + description: Chassis Type + enum: + - UNKNOWN + - DESKTOP + - LAPTOP + - MOBILE + created: + type: number + description: Date created + format: double + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + nodeRoleParentId: + type: integer + description: Node Role Parent Id + format: int32 + icon: + type: string + description: Icon + description: Device Role + Note: + type: object + properties: + text: + type: string + description: Note text + description: Device Notes + OperatingSystem: + type: object + properties: + manufacturer: + type: string + description: Manufacturer + name: + type: string + description: Name + architecture: + type: string + description: Architecture + lastBootTime: + type: number + description: Last boot time + format: double + buildNumber: + type: string + description: Build number + releaseId: + type: string + description: Release ID + servicePackMajorVersion: + type: integer + description: Service Pack Major Version + format: int32 + servicePackMinorVersion: + type: integer + description: Service Pack Minor Version + format: int32 + locale: + type: string + description: Locale + language: + type: string + description: Language + needsReboot: + type: boolean + description: Operating system has pending reboot requests + description: Operating System + Organization: + type: object + properties: + name: + type: string + description: Organization full name + description: + type: string + description: Organization Description + userData: + type: object + additionalProperties: true + description: Custom attributes + nodeApprovalMode: + type: string + description: Device Approval Mode + enum: + - AUTOMATIC + - MANUAL + - REJECT + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + id: + type: integer + description: Organization identifier + format: int32 + description: Organization + Policy: + type: object + properties: + id: + type: integer + description: Policy identifier + format: int32 + parentPolicyId: + type: integer + description: Parent Policy identifier + format: int32 + name: + type: string + description: Name + description: + type: string + description: Description + nodeClass: + type: string + description: Node Class + enum: + - WINDOWS_SERVER + - WINDOWS_WORKSTATION + - LINUX_WORKSTATION + - MAC + - ANDROID + - APPLE_IOS + - APPLE_IPADOS + - VMWARE_VM_HOST + - VMWARE_VM_GUEST + - HYPERV_VMM_HOST + - HYPERV_VMM_GUEST + - LINUX_SERVER + - MAC_SERVER + - CLOUD_MONITOR_TARGET + - NMS_SWITCH + - NMS_ROUTER + - NMS_FIREWALL + - NMS_PRIVATE_NETWORK_GATEWAY + - NMS_PRINTER + - NMS_SCANNER + - NMS_DIAL_MANAGER + - NMS_WAP + - NMS_IPSLA + - NMS_COMPUTER + - NMS_VM_HOST + - NMS_APPLIANCE + - NMS_OTHER + - NMS_SERVER + - NMS_PHONE + - NMS_VIRTUAL_MACHINE + - NMS_NETWORK_MANAGEMENT_AGENT + - UNMANAGED_DEVICE + - MANAGED_DEVICE + updated: + type: number + description: Last update timestamp + format: double + nodeClassDefault: + type: boolean + description: Is Default Policy for Node Class + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + description: Assigned policy (overrides organization and location policy mapping) + Processor: + type: object + properties: + architecture: + type: string + description: Architecture + maxClockSpeed: + type: integer + description: Max Clock Speed + format: int64 + clockSpeed: + type: integer + description: Current Clock Speed + format: int64 + name: + type: string + description: Name + numCores: + type: integer + description: Number of Cores + format: int32 + numLogicalCores: + type: integer + description: "Number of Logical Cores]" + format: int32 + description: Processors + UnmanagedDevice: + type: object + allOf: + - $ref: "#/components/schemas/Device" + User: + type: object + properties: + id: + type: integer + description: User identifier + format: int32 + uid: + type: string + description: User universally unique identifier + format: uuid + firstName: + type: string + lastName: + type: string + email: + type: string + phone: + type: string + enabled: + type: boolean + administrator: + type: boolean + permitAllClients: + type: boolean + notifyAllClients: + type: boolean + mustChangePw: + type: boolean + mfaConfigured: + type: boolean + userType: + type: string + enum: + - TECHNICIAN + - END_USER + invitationStatus: + type: string + enum: + - REGISTERED + - PENDING + - EXPIRED + organizationId: + type: integer + description: Identifier of organization for end-users + format: int32 + deviceIds: + type: array + description: Device IDs which end-user is authorized to access + items: + type: integer + description: Device IDs which end-user is authorized to access + format: int32 + assignedDeviceIds: + type: array + description: Device IDs which user is assigned + items: + type: integer + description: Device IDs which user is assigned + format: int32 + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + roles: + type: array + description: A list of role names assigned to the user. This is provided + when the 'includeRoles' query parameter is set to 'true' + items: + type: string + description: A list of role names assigned to the user. This is provided + when the 'includeRoles' query parameter is set to 'true' + description: Assigned device owner + VMGuest: + type: object + allOf: + - $ref: "#/components/schemas/Device" + - type: object + properties: + files: + type: string + description: Guest VM Files + fullName: + type: string + description: Full Name + lastBootTime: + type: number + description: Last VM Boot Time + format: double + memorySize: + type: integer + description: VM Memory size (bytes) + format: int64 + coresPerSocket: + type: integer + description: Number of Cores per Socket + format: int32 + cpuCores: + type: integer + description: Total Number of CPU Cores + format: int32 + powerState: + type: string + description: Current power state + toolsInstallType: + type: string + description: Guest tools installation type + toolStatus: + type: string + description: Guest tools status + toolsVersion: + type: string + description: Guest tools version + guestOSFullName: + type: string + description: Guest OS full name + guestOSFamily: + type: string + description: Guest OS family + guestOSId: + type: string + description: Guest OS identifier + toolsVersionStatus: + type: string + description: Guest tools version status + snapshotCount: + type: integer + description: Number of snapshots + format: int32 + snapshotTotalSize: + type: integer + description: Total snapshot size (bytes) + format: int64 + VMHost: + type: object + allOf: + - $ref: "#/components/schemas/Device" + - type: object + properties: + cpuMhz: + type: integer + description: CPU Frequency + format: int64 + cpuModel: + type: string + description: CPU Model + htActive: + type: boolean + description: Is Hyper-Threading active? + htAvailable: + type: boolean + description: Is Hyper-Threading available? + lastBootTime: + type: number + description: Last toot time + format: double + memorySize: + type: integer + description: Total memory size (bytes) + format: int64 + model: + type: string + description: Model + name: + type: string + description: Name + cpuCores: + type: integer + description: Number of CPU Cores + format: int32 + cpuPackages: + type: integer + description: Number of CPUs + format: int32 + cpuThreads: + type: integer + description: Total number of logical CPU cores + format: int32 + serviceTag: + type: string + description: Service Tag + vendor: + type: string + description: Vendor + releaseName: + type: string + description: Release Name + version: + type: string + description: Version + buildNumber: + type: string + description: Build number + Volume: + type: object + properties: + name: + type: string + description: Name + driveLetter: + type: string + description: Drive Letter + label: + type: string + description: Volume Label + deviceType: + type: string + description: Device Type + fileSystem: + type: string + description: File System Type + autoMount: + type: boolean + description: Automatically Mounted + compressed: + type: boolean + description: Compressed + capacity: + type: integer + description: Capacity (bytes) + format: int64 + freeSpace: + type: integer + description: Free Space (bytes) + format: int64 + serialNumber: + type: string + description: Serial Number + bitLockerStatus: + $ref: "#/components/schemas/VolumeBitLockerStatus" + description: Disk Volumes + VolumeBitLockerStatus: + type: object + properties: + conversionStatus: + type: string + description: Volume encryption or decryption status. + enum: + - FULLY_DECRYPTED + - FULLY_ENCRYPTED + - ENCRYPTION_IN_PROGRESS + - DECRYPTION_IN_PROGRESS + - ENCRYPTION_PAUSED + - DECRYPTION_PAUSED + - UNKNOWN + encryptionMethod: + type: string + description: Indicated the encryption algorithm and key size used on the + volume + enum: + - NONE + - AES_128_WITH_DIFFUSER + - AES_256_WITH_DIFFUSER + - AES_128 + - AES_256 + - HARDWARE_ENCRYPTION + - XTS_AES_128 + - XTS_AES_256 + - UNKNOWN + protectionStatus: + type: string + description: " indicates whether the volume and its encryption key (if any) + are secured." + enum: + - UNPROTECTED + - PROTECTED + - UNKNOWN + - PENDING + lockStatus: + type: string + description: Indicates whether the contents of the volume are accessible + from Windows + enum: + - UNKNOWN + - UNLOCKED + - LOCKED + initializedForProtection: + type: boolean + description: Is initialized for protection + description: BitLocker Status + WarrantyDates: + type: object + properties: + startDate: + type: number + description: Warranty Start Date (Seconds) + format: double + endDate: + type: number + description: Warranty End Date (Seconds) + format: double + manufacturerFulfillmentDate: + type: number + description: Manufacturer Fulfillment Date + format: double + description: Warranty Info + Job: + type: object + properties: + uid: + type: string + description: Task/Job UID (activity series UID) + format: uuid + deviceId: + type: integer + description: Device identifier + format: int32 + message: + type: string + description: Job message + createTime: + type: number + description: Job start timestamp + format: double + updateTime: + type: number + description: Job last updated + format: double + sourceType: + type: string + description: Job origin + enum: + - AGENT_OFFLINE + - CONDITION_AGENT_CPU + - CONDITION_AGENT_MEMORY + - CONDITION_AGENT_NETWORK + - CONDITION_AGENT_DISK_IO + - CONDITION_AGENT_DISK_FREE_SPACE + - CONDITION_AGENT_DISK_USAGE + - CONDITION_AGENT_CVSS_SCORE + - CONDITION_AGENT_PATCH_LAST_INSTALLED + - CONDITION_NMS_CPU + - CONDITION_NMS_MEMORY + - CONDITION_NMS_NETWORK_TRAFFIC_BITS + - CONDITION_NMS_NETWORK_TRAFFIC_PERCENT + - CONDITION_NMS_NETWORK_STATUS + - CONDITION_NMS_NETWORK_STATUS_CHANGE + - CONDITION_NMS_SYSTEM_UPTIME + - CONDITION_PING + - CONDITION_PING_LATENCY + - CONDITION_PING_PACKET_LOSS + - CONDITION_PING_RESPONSE + - CONDITION_SYSTEM_UPTIME + - CONDITION_SMART_STATUS_DEGRATED + - CONDITION_RAID_HEALTH_STATUS + - CONDITION_SCRIPT_RESULT + - CONDITION_HTTP + - CONDITION_HTTP_RESPONSE + - CONDITION_PORT + - CONDITION_PORT_SCAN + - CONDITION_SYSLOG + - CONDITION_CONFIGURATION_FILE + - CONDITION_SNMPTRAP + - CONDITION_CRITICAL_EVENT + - CONDITION_DNS + - CONDITION_EMAIL + - CONDITION_CUSTOM_SNMP + - CONDITION_COMPOUND + - SHADOWPROTECT_BACKUPJOB_CREATE + - SHADOWPROTECT_BACKUPJOB_UPDATE + - SHADOWPROTECT_BACKUPJOB_DELETE + - SHADOWPROTECT_BACKUPJOB_EXECUTE + - IMAGEMANAGER_MANAGEDFOLDER_CREATE + - IMAGEMANAGER_MANAGEDFOLDER_UPDATE + - IMAGEMANAGER_MANAGEDFOLDER_DELETE + - IMAGEMANAGER_MANAGEDFOLDER_EXECUTE + - TEAMVIEWER_CONNECTION + - RETRIEVE_AGENT_LOGS + - SCHEDULED_TASK + - CONDITION_WINDOWS_EVENT_LOG_TRIGGERED + - CONDITION_WINDOWS_SERVICE_STATE_CHANGED + - UI_MESSAGE_ACTION_REBOOT + - UI_MESSAGE_BD_INSTALLATION_ISSUES + - GRAVITYZONE_UI_MESSAGE_INSTALLATION_ISSUES + - AV_QUARANTINE_THREAT + - AV_RESTORE_THREAT + - AV_DELETE_THREAT + - AV_REMOVE_THREAT + - BITDEFENDER_RESTORE_THREAT + - BITDEFENDER_DELETE_THREAT + - CONDITION_BITLOCKER_STATUS + - CONDITION_FILEVAULT_STATUS + - CONDITION_LINUX_PROCESS + - CONDITION_LINUX_Daemon + - CONDITION_LINUX_PROCESS_RESOURCE + - CONDITION_LINUX_PROCESS_RESOURCE_CPU + - CONDITION_LINUX_PROCESS_RESOURCE_MEMORY + - CONDITION_LINUX_DISK_FREE_SPACE + - CONDITION_LINUX_DISK_USAGE + - CONDITION_VM_AGGREGATE_CPU_USAGE + - CONDITION_VM_DISK_USAGE + - CONDITION_VM_HOST_DATASTORE + - CONDITION_VM_HOST_UPTIME + - CONDITION_VM_HOST_DEVICE_DOWN + - CONDITION_VM_HOST_BAD_SENSORS + - CONDITION_VM_HOST_SENSOR_HEALTH + - CONDITION_VM_GUEST_GUEST_OPERATIONAL_MODE + - CONDITION_VM_GUEST_SNAPSHOT_SIZE + - CONDITION_VM_GUEST_SNAPSHOT_LIFESPAN + - CONDITION_VM_GUEST_TOOLS_NOT_RUNNING + - CONDITION_HV_GUEST_CHECKPOINT_SIZE + - CONDITION_HV_GUEST_CHECKPOINT_LIFESPAN + - CONDITION_SOFTWARE + - CONDITION_WINDOWS_PROCESS_STATE + - CONDITION_WINDOWS_PROCESS_RESOURCE_CPU + - CONDITION_WINDOWS_PROCESS_RESOURCE_MEMORY + - CONDITION_MAC_PROCESS_STATE + - CONDITION_MAC_PROCESS_RESOURCE_CPU + - CONDITION_MAC_PROCESS_RESOURCE_MEMORY + - CONDITION_MAC_DEAMON + - CONDITION_CUSTOM_FIELD + - CONDITION_PENDING_REBOOT + sourceConfigUid: + type: string + description: Source configuration/policy element reference + format: uuid + sourceName: + type: string + description: Source configuration/policy element name + subject: + type: string + description: Job subject + userId: + type: integer + description: User identifier + format: int32 + psaTicketId: + type: object + description: Related PSA ticket ID + ticketTemplateId: + type: integer + description: PSA ticket template + format: int32 + data: + type: object + additionalProperties: true + description: Job data + device: + $ref: "#/components/schemas/NodeWithDetailedReferences" + jobStatus: + type: string + description: Job Status + enum: + - START_REQUESTED + - STARTED + - IN_PROCESS + - COMPLETED + - CANCEL_REQUESTED + - CANCELLED + - WAITING_FOR_USER_RESPONSE + - TRIGGERED + - RESET + - ACKNOWLEDGED + - DISABLED + jobResult: + type: string + description: Job result + enum: + - SUCCESS + - FAILURE + - UNSUPPORTED + - UNCOMPLETED + jobType: + type: string + description: Job Type + enum: + - ACTIONSET + - ACTION + - CONDITION + - CONDITION_ACTIONSET + - CONDITION_ACTION + - ANTIVIRUS + - PATCH_MANAGEMENT + - TEAMVIEWER + - MONITOR + - SYSTEM + - COMMENT + - SHADOWPROTECT + - IMAGEMANAGER + - HELP_REQUEST + - SOFTWARE_PATCH_MANAGEMENT + - SPLASHTOP + - CLOUDBERRY + - CLOUDBERRY_BACKUP + - SCHEDULED_TASK + - RDP + - SCRIPTING + - SECURITY + - REMOTE_TOOLS + - VIRTUALIZATION + - PSA + - MDM + - NINJA_REMOTE + - NINJA_QUICK_CONNECT + - NINJA_NETWORK_DISCOVERY + - NINJA_BACKUP + - NINJA_TICKETING + - KNOWLEDGE_BASE + - RELATED_ITEM + - CLIENT_CHECKLIST + - CHECKLIST_TEMPLATE + - DOCUMENTATION + - MICROSOFT_INTUNE + NodeWithDetailedReferences: + type: object + properties: + id: + type: integer + description: Node (Device) identifier + format: int32 + uid: + type: string + description: Node (Device) UUID + format: uuid + assignedOwnerUid: + type: string + description: Node (Device) Owner UUID + format: uuid + parentDeviceId: + type: integer + description: Parent Node identifier + format: int32 + organizationId: + type: integer + description: Organization identifier + format: int32 + locationId: + type: integer + description: Location identifier + format: int32 + nodeClass: + type: string + description: Node Class + enum: + - WINDOWS_SERVER + - WINDOWS_WORKSTATION + - LINUX_WORKSTATION + - MAC + - ANDROID + - APPLE_IOS + - APPLE_IPADOS + - VMWARE_VM_HOST + - VMWARE_VM_GUEST + - HYPERV_VMM_HOST + - HYPERV_VMM_GUEST + - LINUX_SERVER + - MAC_SERVER + - CLOUD_MONITOR_TARGET + - NMS_SWITCH + - NMS_ROUTER + - NMS_FIREWALL + - NMS_PRIVATE_NETWORK_GATEWAY + - NMS_PRINTER + - NMS_SCANNER + - NMS_DIAL_MANAGER + - NMS_WAP + - NMS_IPSLA + - NMS_COMPUTER + - NMS_VM_HOST + - NMS_APPLIANCE + - NMS_OTHER + - NMS_SERVER + - NMS_PHONE + - NMS_VIRTUAL_MACHINE + - NMS_NETWORK_MANAGEMENT_AGENT + - UNMANAGED_DEVICE + - MANAGED_DEVICE + nodeRoleId: + type: integer + description: Node Role identifier + format: int32 + rolePolicyId: + type: integer + description: Node Role policy ID based on organization and location Policy + Mapping + format: int32 + policyId: + type: integer + description: Assigned policy ID (overrides organization and location policy + mapping) + format: int32 + approvalStatus: + type: string + description: Approval Status + enum: + - PENDING + - APPROVED + offline: + type: boolean + description: Is Offline? + displayName: + type: string + description: Display Name + systemName: + type: string + description: System Name + dnsName: + type: string + description: DNS Name + netbiosName: + type: string + description: NETBIOS Name + created: + type: number + description: Created + format: double + lastContact: + type: number + description: Last Contact + format: double + lastUpdate: + type: number + description: Last data submission timestamp + format: double + userData: + type: object + additionalProperties: true + description: Custom attributes + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + maintenance: + $ref: "#/components/schemas/Maintenance" + references: + $ref: "#/components/schemas/NodeReferences" + description: Device information. + Activity: + type: object + properties: + id: + type: integer + description: Activity identifier + format: int64 + activityTime: + type: number + description: Activity timestamp + format: double + deviceId: + type: integer + description: Device identifier + format: int32 + severity: + type: string + description: Severity + enum: + - NONE + - MINOR + - MODERATE + - MAJOR + - CRITICAL + priority: + type: string + description: Priority + enum: + - NONE + - LOW + - MEDIUM + - HIGH + seriesUid: + type: string + description: Activity series UID (job/condition UID) + format: uuid + activityType: + type: string + description: Activity type code + enum: + - ACTIONSET + - ACTION + - CONDITION + - CONDITION_ACTIONSET + - CONDITION_ACTION + - ANTIVIRUS + - PATCH_MANAGEMENT + - TEAMVIEWER + - MONITOR + - SYSTEM + - COMMENT + - SHADOWPROTECT + - IMAGEMANAGER + - HELP_REQUEST + - SOFTWARE_PATCH_MANAGEMENT + - SPLASHTOP + - CLOUDBERRY + - CLOUDBERRY_BACKUP + - SCHEDULED_TASK + - RDP + - SCRIPTING + - SECURITY + - REMOTE_TOOLS + - VIRTUALIZATION + - PSA + - MDM + - NINJA_REMOTE + - NINJA_QUICK_CONNECT + - NINJA_NETWORK_DISCOVERY + - NINJA_BACKUP + - NINJA_TICKETING + - KNOWLEDGE_BASE + - RELATED_ITEM + - CLIENT_CHECKLIST + - CHECKLIST_TEMPLATE + - DOCUMENTATION + - MICROSOFT_INTUNE + statusCode: + type: string + description: Activity status code + enum: + - START_REQUESTED + - STARTED + - IN_PROCESS + - COMPLETED + - CANCEL_REQUESTED + - CANCELLED + - BLOCKED + - TRIGGERED + - RESET + - ACKNOWLEDGED + - DISABLED + - EVALUATION_FAILURE + - CLIENT_CREATED + - CLIENT_UPDATED + - CLIENT_DELETED + - CREDENTIAL_CREATED + - CREDENTIAL_UPDATED + - CREDENTIAL_DELETED + - LOCATION_CREATED + - LOCATION_UPDATED + - LOCATION_DELETED + - POLICY_CREATED + - POLICY_UPDATED + - POLICY_DELETED + - NODE_CREATED + - NODE_UPDATED + - NODE_DELETED + - NODE_RE_ENROLLED + - NODE_ACCESS_GRANTED + - NODE_ACCESS_DENIED + - NODE_REGISTRATION_REJECTED + - NODE_IDENTIFICATION_UPDATED + - NODE_CLONING_DETECTED + - NODE_CLONE_ADVISED_TO_REGISTER + - NODE_MANUALLY_APPROVED + - NODE_AUTOMATICALLY_APPROVED + - NODE_MANUALLY_REJECTED + - NODE_AUTOMATICALLY_REJECTED + - REJECTED_NODE_CLEARED + - REJECTED_NODE_DELETED + - MOBILE_DEVICE_UNREGISTERED + - APP_USER_CREATED + - APP_USER_UPDATED + - APP_USER_DELETED + - APP_USER_LOGGED_IN + - APP_USER_LOGGED_OUT + - APP_USER_MFA_SETUP + - APP_USER_MFA_DELETED + - APP_USER_CRITICAL_ACTION + - APP_USER_AUDIT_FAILED_LOGIN + - END_USER_CREATED + - END_USER_CREATED_API + - END_USER_UPDATED + - END_USER_UPDATED_API + - END_USER_DELETED + - END_USER_DELETED_API + - END_USER_LOGGED_IN + - END_USER_LOGGED_OUT + - END_USER_MFA_SETUP + - END_USER_MFA_DELETED + - END_USER_AUDIT_FAILED_LOGIN + - END_USER_CRITICAL_ACTION + - CONTACT_CREATED + - CONTACT_CREATED_API + - CONTACT_UPDATED + - CONTACT_UPDATED_API + - CONTACT_DELETED + - CONTACT_DELETED_API + - DEVICE_GROUP_CREATED + - DEVICE_GROUP_UPDATED + - DEVICE_GROUP_DELETED + - TICKET_TEMPLATE_CREATED + - TICKET_TEMPLATE_UPDATED + - TICKET_TEMPLATE_DELETED + - CUSTOM_HEALTH_STATUS_CHANGED + - CUSTOM_HEALTH_STATUS_RESET + - PSA_TICKET_CREATION_FAILED + - PSA_TICKET_CREATION_SUCCEEDED + - RESET_BY_PSA_TICKET_CALLBACK + - PSA_TICKET_CREATION_TEST + - PSA_ENABLED + - PSA_DISABLED + - PSA_CREDENTIALS_FAILED + - CONNECTWISE_AGREEMENTS_SYNC_COMPLETED + - CONNECTWISE_AGREEMENTS_SYNC_STARTED + - CONNECTWISE_NODE_SYNC_COMPLETED + - CONNECTWISE_NODE_SYNC_STARTED + - CONNECTWISE_NODE_SYNC_NODE_CREATED + - CONNECTWISE_NODE_SYNC_NODE_UPDATED + - CONNECTWISE_NODE_SYNC_NODE_DELETED + - CONNECTWISE_UPDATED + - CONNECTWISECONTROL_ATTEMPT + - AUTOTASK_NODE_SYNC_STARTED + - AUTOTASK_NODE_SYNC_COMPLETED + - AUTOTASK_NODE_SYNC_NODE_CREATED + - AUTOTASK_NODE_SYNC_NODE_UPDATED + - AUTOTASK_NODE_SYNC_NODE_DELETED + - AUTOTASK_UPDATED + - AUTOTASK_ATTACHMENT_FAILURE + - PSA_TICKET_UPDATED_FAILED + - PSA_TICKET_UPDATED_SUCCEEDED + - REPORT_CREATED + - REPORT_UPDATED + - REPORT_DELETED + - TIME_ZONE_UPDATED + - LANGUAGE_TAG_UPDATED + - NODE_ROLE_CREATED + - NODE_ROLE_UPDATED + - NODE_ROLE_DELETED + - COMMENT + - VIPREAV_INSTALLED + - VIPREAV_INSTALL_FAILED + - VIPREAV_UNINSTALLED + - VIPREAV_UNINSTALL_FAILED + - VIPREAV_SCAN_THREAT_QUARANTINED + - VIPREAV_ACTIVEPROTECTION_THREAT_QUARANTINED + - VIPREAV_USERINITIATED_THREAT_QUARANTINED + - VIPREAV_QUARANTINED_THREAT_REMOVED + - VIPREAV_REBOOT_REQUIRED + - VIPREAV_SCAN_STARTED + - VIPREAV_SCAN_COMPLETED + - VIPREAV_SCAN_ABORTED + - VIPREAV_SCAN_FAILED + - VIPREAV_SCAN_PAUSED + - VIPREAV_DISABLED + - WEBROOT_COMMAND_SUBMITTED + - WEBROOT_THREAT_DETECTED + - WEBROOT_INSTALL_FAILED + - BITDEFENDER_SCAN_STARTED + - BITDEFENDER_SCAN_COMPLETED + - BITDEFENDER_THREAT_DELETE_FROM_QUARANTINE + - BITDEFENDER_THREAT_RESTORE_FROM_QUARANTINE + - BITDEFENDER_SCAN_FAILED + - BITDEFENDER_THREAT_DELETE_FROM_QUARANTINE_FAILED + - BITDEFENDER_THREAT_RESTORE_FROM_QUARANTINE_FAILED + - BITDEFENDER_DOWNLOAD_STARTED + - BITDEFENDER_DOWNLOAD_SUCCEEDED + - BITDEFENDER_DOWNLOAD_FAILED + - BITDEFENDER_INSTALLATION_STARTED + - BITDEFENDER_INSTALLATION_SUCCEEDED + - BITDEFENDER_INSTALLATION_FAILED + - BITDEFENDER_UNINSTALLATION_STARTED + - BITDEFENDER_UNINSTALLATION_SUCCEEDED + - BITDEFENDER_UNINSTALLATION_FAILED + - BITDEFENDER_UNPACKING_FAILED + - BDAS_BITDEFENDER_THREAT_IGNORED + - BDAS_BITDEFENDER_THREAT_PRESENT + - BDAS_BITDEFENDER_THREAT_DELETED + - BDAS_BITDEFENDER_THREAT_BLOCKED + - BDAS_BITDEFENDER_THREAT_QUARANTINED + - BDAS_BITDEFENDER_THREAT_CLEANED + - BDAS_BITDEFENDER_PURGE_QUARANTINE_FAILED + - BDAS_BITDEFENDER_PURGE_QUARANTINE_SUCCESS + - BDAS_BITDEFENDER_THREAT_QUARANTINE_RESTORED + - BDAS_BITDEFENDER_THREAT_QUARANTINE_RESTORED_CUSTOMPATH + - BDAS_BITDEFENDER_THREAT_QUARANTINE_DELETED + - BITDEFENDER_RETRY_INSTALL_COMPLETED + - BITDEFENDER_DISABLED + - BITDEFENDER_EXISTING_PRODUCT_UNINSTALL + - COMPETITOR_EXISTING_PRODUCT_UNINSTALL + - SCHEDULE_INSTALL_OPTION_CHANGED + - SECURITY_CREDENTIAL_ACCESS_GRANTED + - SECURITY_CREDENTIAL_ACCESS_DENIED + - PATCH_MANAGEMENT_SCAN_STARTED + - PATCH_MANAGEMENT_SCAN_COMPLETED + - PATCH_MANAGEMENT_APPLY_PATCH_STARTED + - PATCH_MANAGEMENT_APPLY_PATCH_COMPLETED + - PATCH_MANAGEMENT_INSTALLED + - PATCH_MANAGEMENT_INSTALL_FAILED + - PATCH_MANAGEMENT_MESSAGE + - PATCH_MANAGEMENT_FAILURE + - PATCH_MANAGEMENT_ROLLBACK_PATCH_REQUESTED + - PATCH_MANAGEMENT_ROLLBACK_PATCH_STARTED + - PATCH_MANAGEMENT_ROLLBACK_PATCH_COMPLETED + - PATCH_MANAGEMENT_PATCH_APPROVED + - PATCH_MANAGEMENT_PATCH_REJECTED + - SOFTWARE_PATCH_MANAGEMENT_SCAN_STARTED + - SOFTWARE_PATCH_MANAGEMENT_SCAN_COMPLETED + - SOFTWARE_PATCH_MANAGEMENT_APPLY_PATCH_STARTED + - SOFTWARE_PATCH_MANAGEMENT_APPLY_PATCH_COMPLETED + - SOFTWARE_PATCH_MANAGEMENT_INSTALLED + - SOFTWARE_PATCH_MANAGEMENT_INSTALL_FAILED + - SOFTWARE_PATCH_MANAGEMENT_MESSAGE + - SOFTWARE_PATCH_MANAGEMENT_PATCH_APPROVED + - SOFTWARE_PATCH_MANAGEMENT_PATCH_REJECTED + - TEAMVIEWER_INSTALLED + - TEAMVIEWER_INSTALL_FAILED + - TEAMVIEWER_UNINSTALLED + - TEAMVIEWER_UNINSTALL_FAILED + - TEAMVIEWER_CONNECTION_ESTABLISHED + - TEAMVIEWER_CONNECTION_TERMINATED + - TEAMVIEWER_PERMANENT_PASSWORD_CHANGED + - TEAMVIEWER_ACCOUNTNAME_ADDED + - TEAMVIEWER_ACCOUNTNAME_CHANGED + - TEAMVIEWER_ACCOUNTNAME_REMOVED + - TEAMVIEWER_CONNECTION_CANCELLED + - TEAMVIEWER_CONFIG_CHANGED + - SPLASHTOP_CONNECTION_INITIATED + - SPLASHTOP_CONNECTION_ESTABLISHED + - SPLASHTOP_CONNECTION_TERMINATED + - REMOTE_TOOLS_UPLOAD_FILE_INITIATED + - REMOTE_TOOLS_DOWNLOAD_FILE_INITIATED + - REMOTE_TOOLS_COMPRESS_FILE_INITIATED + - REMOTE_TOOLS_COMPRESS_FILE_SUCCESS + - REMOTE_TOOLS_COMPRESS_FILE_FAILED + - REMOTE_TOOLS_CREATE_DIRECTORY_INITIATED + - REMOTE_TOOLS_RENAME_FILE_INITIATED + - REMOTE_TOOLS_DELETE_FILE_INITIATED + - REMOTE_TOOLS_MODIFY_OBJECT_SUCCESS + - REMOTE_TOOLS_MODIFY_OBJECT_FAILED + - REMOTE_TOOLS_COPY_OBJECT_SUCCESS + - REMOTE_TOOLS_COPY_OBJECT_FAILED + - REMOTE_TOOLS_MOVE_OBJECT_SUCCESS + - REMOTE_TOOLS_MOVE_OBJECT_FAILED + - REMOTE_TOOLS_DELETE_OBJECT_SUCCESS + - REMOTE_TOOLS_DELETE_OBJECT_FAILED + - REMOTE_TOOLS_CREATE_DIRECTORY_SUCCESS + - REMOTE_TOOLS_CREATE_DIRECTORY_FAILED + - REMOTE_TOOLS_FILE_TRANSFER_SUCCESS + - REMOTE_TOOLS_FILE_TRANSFER_FAILED + - REMOTE_TOOLS_SERVICE_CONTROL_INITIATED + - REMOTE_TOOLS_START_SERVICE_SUCCESS + - REMOTE_TOOLS_START_SERVICE_FAILED + - REMOTE_TOOLS_STOP_SERVICE_SUCCESS + - REMOTE_TOOLS_STOP_SERVICE_FAILED + - REMOTE_TOOLS_RESTART_SERVICE_SUCCESS + - REMOTE_TOOLS_RESTART_SERVICE_FAILED + - REMOTE_TOOLS_START_TYPE_CHANGE_SUCCESS + - REMOTE_TOOLS_START_TYPE_CHANGE_FAILED + - REMOTE_TOOLS_PROCESS_CONTROL_INITIATED + - REMOTE_TOOLS_SET_PROCESS_PRIORITY_SUCESS + - REMOTE_TOOLS_SET_PROCESS_PRIORITY_FAILED + - REMOTE_TOOLS_TERMINATE_PROCESS_SUCCESS + - REMOTE_TOOLS_TERMINATE_PROCESS_FAILED + - REMOTE_TOOLS_TERMINATE_PROCESS_TREE_SUCCESS + - REMOTE_TOOLS_TERMINATE_PROCESS_TREE_FAILED + - REMOTE_TOOLS_REGISTRY_CONTROL_INITIATED + - REMOTE_TOOLS_CREATE_KEY_SUCCESS + - REMOTE_TOOLS_CREATE_KEY_FAILED + - REMOTE_TOOLS_RENAME_KEY_SUCCESS + - REMOTE_TOOLS_RENAME_KEY_FAILED + - REMOTE_TOOLS_DELETE_KEY_SUCCESS + - REMOTE_TOOLS_DELETE_KEY_FAILED + - REMOTE_TOOLS_CREATE_PARAMETER_SUCCESS + - REMOTE_TOOLS_CREATE_PARAMETER_FAILED + - REMOTE_TOOLS_RENAME_PARAMETER_SUCCESS + - REMOTE_TOOLS_RENAME_PARAMETER_FAILED + - REMOTE_TOOLS_DELETE_PARAMETER_SUCCESS + - REMOTE_TOOLS_DELETE_PARAMETER_FAILED + - REMOTE_TOOLS_MODIFY_PARAMETER_SUCCESS + - REMOTE_TOOLS_MODIFY_PARAMETER_FAILED + - REMOTE_TOOLS_ACTIVE_DIRECTORY_INITIATED + - ADAPTER_ADDED + - ADAPTER_REMOVED + - ADAPTER_CONFIG_CHANGED + - ADAPTER_STATUS_CHANGED + - CPU_ADDED + - CPU_REMOVED + - MEMORY_ADDED + - MEMORY_REMOVED + - DISK_DRIVE_ADDED + - DISK_DRIVE_REMOVED + - USER_LOGGED_IN + - USER_LOGGED_OUT + - PORT_OPENED + - PORT_CLOSED + - WINDOWS_SERVICE_STARTED + - WINDOWS_SERVICE_STOPPED + - MAC_DAEMON_STARTED + - MAC_DAEMON_STOPPED + - USER_ACCOUNT_ADDED + - USER_ACCOUNT_REMOVED + - PROCESS_STARTED + - PROCESS_STOPPED + - SYSTEM_REBOOTED + - SOFTWARE_ADDED + - SOFTWARE_REMOVED + - SOFTWARE_UPDATED + - SOFTWARE_OS_UPDATED + - DISK_PARTITION_ADDED + - DISK_PARTITION_REMOVED + - DISK_VOLUME_ADDED + - DISK_VOLUME_REMOVED + - CREDENTIALS_CHANGED + - RAID_CONTROLLER_ADDED + - RAID_CONTROLLER_REMOVED + - RAID_PHYSICAL_DRIVE_ADDED + - RAID_PHYSICAL_DRIVE_REMOVED + - RAID_LOGICAL_DISK_ADDED + - RAID_LOGICAL_DISK_REMOVED + - BITLOCKER_ENABLED + - BITLOCKER_DISABLED + - FILEVAULT_ENABLED + - FILEVAULT_DISABLED + - TRUSTED_PLATFORM_MODULE_ENABLED + - TRUSTED_PLATFORM_MODULE_DISABLED + - TRUSTED_PLATFORM_MODULE_INSTALLED + - TRUSTED_PLATFORM_MODULE_UNINSTALLED + - SHADOWPROTECT_INSTALLED + - SHADOWPROTECT_INSTALL_FAILED + - SHADOWPROTECT_UNINSTALLED + - SHADOWPROTECT_UNINSTALL_FAILED + - SHADOWPROTECT_BACKUPJOB_FAILED + - SHADOWPROTECT_BACKUPJOB_ABORTED + - SHADOWPROTECT_LICENSE_PROVISIONED + - SHADOWPROTECT_LICENSE_PROVISION_FAILED + - SHADOWPROTECT_LICENSE_ACTIVATED + - SHADOWPROTECT_LICENSE_ACTIVATION_FAILED + - SHADOWPROTECT_LICENSE_DEACTIVATED + - SHADOWPROTECT_LICENSE_DEACTIVATION_FAILED + - IMAGEMANAGER_INSTALLED + - IMAGEMANAGER_INSTALL_FAILED + - IMAGEMANAGER_UNINSTALLED + - IMAGEMANAGER_UNINSTALL_FAILED + - IMAGEMANAGER_LICENSE_PROVISIONED + - IMAGEMANAGER_LICENSE_PROVISION_FAILED + - IMAGEMANAGER_LICENSE_ACTIVATED + - IMAGEMANAGER_LICENSE_ACTIVATION_FAILED + - IMAGEMANAGER_LICENSE_DEACTIVATED + - IMAGEMANAGER_LICENSE_DEACTIVATION_FAILED + - IMAGEMANAGER_CONSOLIDATION_FAILED + - IMAGEMANAGER_VERIFICATION_FAILED + - HELP_REQUEST_SUBMITTED + - CLOUDBERRY_INSTALLED + - CLOUDBERRY_INSTALL_FAILED + - CLOUDBERRY_UNINSTALLED + - CLOUDBERRY_UNINSTALL_FAILED + - CLOUDBERRY_BACKUPPLAN_CREATED + - CLOUDBERRY_BACKUPPLAN_EDITED + - CLOUDBERRY_BACKUPPLAN_DELETED + - CLOUDBERRY_BACKUPPLAN_CREATION_FAILED + - CLOUDBERRY_BACKUPJOB_STARTED + - CLOUDBERRY_BACKUPJOB_SUCCEEDED + - CLOUDBERRY_BACKUPJOB_FAILED + - CLOUDBERRY_BACKUPJOB_COMPLETED_WITH_WARNING + - CLOUDBERRY_USER_CREATED + - CLOUDBERRY_NETWORK_CREDENTIAL_CREATED + - CLOUDBERRY_NETWORK_CREDENTIAL_CREATION_FAILED + - RDP_CONNECTION_INITIATED + - RDP_CONNECTION_ESTABLISHED + - RDP_CONNECTION_TERMINATED + - RDP_AUTO_PROVISION + - SCHEDULED_TASK_CREATED + - SCHEDULED_TASK_UPDATED + - SCHEDULED_TASK_DELETED + - SCRIPT_CREATED + - SCRIPT_UPDATED + - SCRIPT_DELETED + - NINJA_BACKUP_BACKUPJOB_START_REQUESTED + - NINJA_BACKUP_BACKUPJOB_STARTED + - NINJA_BACKUP_BACKUPJOB_IN_PROCESS + - NINJA_BACKUP_BACKUPJOB_COMPLETED + - NINJA_BACKUP_BACKUPJOB_FAILED + - NINJA_BACKUP_RESTOREJOB_START_REQUESTED + - NINJA_BACKUP_RESTOREJOB_STARTED + - NINJA_BACKUP_RESTOREJOB_IN_PROCESS + - NINJA_BACKUP_RESTOREJOB_COMPLETED + - NINJA_BACKUP_RESTOREJOB_FAILED + - NINJA_BACKUP_BACKUPJOB_COMPLETED_WITH_WARNING + - NINJA_BACKUP_BACKUP_DOWNLOADED + - NINJA_BACKUP_BACKUPPLAN_ADDED + - NINJA_BACKUP_BACKUPPLAN_EDITED + - NINJA_BACKUP_BACKUPPLAN_DELETED + - NINJA_BACKUP_BACKUPJOB_CANCELLED + - NINJA_BACKUP_BACKUPJOB_PROCESSING + - NINJA_BACKUP_INSTALL_FAILED + - NINJA_BACKUP_UNINSTALL_FAILED + - NINJA_BACKUP_INSTALLED + - NINJA_BACKUP_UNINSTALLED + - NINJA_BACKUP_RESTOREJOB_CANCELLED + - NINJA_BACKUP_BACKUPPLAN_CREATION_FAILED + - NINJA_BACKUP_BACKUP_CONFIGURE_FAILED + - NINJA_BACKUP_FILE_DOWNLOAD + - NINJA_BACKUP_FOLDER_DOWNLOAD + - NINJA_BACKUP_UPSYNCJOB_START_REQUESTED + - NINJA_BACKUP_UPSYNCJOB_PROCESSING + - NINJA_BACKUP_UPSYNCJOB_IN_PROCESS + - NINJA_BACKUP_UPSYNCJOB_STARTED + - NINJA_BACKUP_UPSYNCJOB_COMPLETED + - NINJA_BACKUP_UPSYNCJOB_CANCELLED + - NINJA_BACKUP_UPSYNCJOB_FAILED + - NINJA_BACKUP_BACKUP_NAS_ACCESS_FAILED + - NINJA_BACKUP_IMAGE_RESTORE_STARTED + - NINJA_BACKUP_IMAGE_RESTORE_COMPLETED + - NINJA_BACKUP_IMAGE_RESTORE_FAILED + - NINJA_BACKUP_IMAGE_DOWNLOAD_STARTED + - NINJA_BACKUP_IMAGE_DOWNLOAD_COMPLETED + - NINJA_BACKUP_IMAGE_DOWNLOAD_FAILED + - NINJA_BACKUP_IMAGE_DOWNLOAD_FILE_STARTED + - NINJA_BACKUP_IMAGE_DOWNLOAD_FILE_COMPLETED + - NINJA_BACKUP_IMAGE_DOWNLOAD_FILE_FAILED + - NINJA_BACKUP_IMAGE_MOUNT_COMPLETED + - NINJA_BACKUP_IMAGE_MOUNT_FAILED + - NINJA_BACKUP_INTEGRITY_CHECK_START_REQUESTED + - NINJA_BACKUP_INTEGRITY_CHECK_STARTED + - NINJA_BACKUP_INTEGRITY_CHECK_IN_PROCESS + - NINJA_BACKUP_INTEGRITY_CHECK_COMPLETED + - NINJA_BACKUP_INTEGRITY_CHECK_FAILED + - NINJA_BACKUP_INTEGRITY_CHECK_CANCELLED + - NINJA_BACKUP_IMAGE_DOWNLOAD_FOLDER_STARTED + - NINJA_BACKUP_IMAGE_DOWNLOAD_FOLDER_COMPLETED + - NINJA_BACKUP_IMAGE_DOWNLOAD_FOLDER_FAILED + - BACKUP_IMAGE_RESTORE_CANCELED + - BACKUP_IMAGE_DOWNLOAD_CANCELED + - QC_INVITATION_CREATED + - QC_INVITATION_DISABLED + - QC_EXPIRED_INVITATION_BLOCKED + - QC_INVITATION_UPDATED + - QC_DEVICE_DELETED + - QC_DEVICE_AGENT_INSTALL_REQUESTED + - QC_SESSION_STARTED + - QC_SESSION_TERMINATED + - QC_SESSION_REPORT_SUBMITTED + - REMOTE_SUPPORT_CREATED + - REMOTE_SUPPORT_UPDATED + - REMOTE_SUPPORT_DELETED + - MDM_LOCK_DEVICE_STATUS_CREATED + - MDM_REBOOT_DEVICE_STATUS_CREATED + - MDM_RESET_PASSCODE_DEVICE_STATUS_CREATED + - MDM_RELINQUISH_OWNERSHIP_DEVICE_STATUS_CREATED + - MDM_LOCK_DEVICE_STATUS_UPDATED + - MDM_REBOOT_DEVICE_STATUS_UPDATED + - MDM_RESET_PASSCODE_DEVICE_STATUS_UPDATED + - MDM_RELINQUISH_OWNERSHIP_DEVICE_STATUS_UPDATED + - MDM_CLEAR_PASSCODE_STATUS_CREATED + - MDM_CLEAR_PASSCODE_STATUS_UPDATED + - MDM_ERASE_STATUS_CREATED + - MDM_ERASE_STATUS_UPDATED + - MDM_UPDATE_POLICY_STATUS_CREATED + - MDM_UPDATE_POLICY_STATUS_UPDATED + - MDM_ASSIGN_POLICY_STATUS_CREATED + - MDM_ASSIGN_POLICY_STATUS_UPDATED + - MDM_DIVISION_CONFIG_ENABLED + - MDM_DIVISION_CONFIG_DISABLED + - MDM_DIVISION_CONFIG_UPDATED + - MDM_APN_CERTIFICATE_UPLOADED + - MDM_ACTION_DEVICE_STATUS_FAILED + - MDM_DISOWN_STATUS_FORBIDDEN + - MDM_DISOWN_STATUS_COMPLETED + - MDM_ADE_TOKEN_UPLOADED + - MDM_ADE_TOKEN_RENEWED + - MDM_RENEW_ENROLLMENT_PROFILE_STATUS_CREATED + - MDM_RENEW_ENROLLMENT_PROFILE_STATUS_UPDATED + - MDM_INSTALL_APP_STATUS_CREATED + - MDM_APN_CERTIFICATE_RENEWED + - MDM_CONNECTION_ANDROID_ENTERPRISE_RENAME_SUCCESS + - REPORT_TEMPLATE_CREATED + - REPORT_TEMPLATE_UPDATED + - REPORT_TEMPLATE_DELETED + - REPORT_SCHEDULE_CREATED + - REPORT_SCHEDULE_UPDATED + - REPORT_SCHEDULE_DELETED + - REPORT_TEMPLATE_DUPLICATED + - REPORT_SCHEDULE_DUPLICATED + - GRAVITYZONE_ENABLED + - GRAVITYZONE_DISABLED + - GRAVITYZONE_SCAN_STARTED + - GRAVITYZONE_SCAN_COMPLETED + - GRAVITYZONE_SCAN_FAILED + - GRAVITYZONE_THREAT_DELETE_FROM_QUARANTINE + - GRAVITYZONE_THREAT_RESTORE_FROM_QUARANTINE + - GRAVITYZONE_THREAT_DELETE_FROM_QUARANTINE_FAILED + - GRAVITYZONE_THREAT_RESTORE_FROM_QUARANTINE_FAILED + - GRAVITYZONE_INSTALLATION_SUCCEEDED + - GRAVITYZONE_INSTALLATION_FAILED + - GRAVITYZONE_THREAT_IGNORED + - GRAVITYZONE_THREAT_PRESENT + - GRAVITYZONE_THREAT_DELETED + - GRAVITYZONE_THREAT_BLOCKED + - GRAVITYZONE_THREAT_QUARANTINED + - GRAVITYZONE_THREAT_CLEANED + - GRAVITYZONE_PURGE_QUARANTINE_FAILED + - GRAVITYZONE_PURGE_QUARANTINE_SUCCESS + - GRAVITYZONE_THREAT_RESTORE_AND_EXCLUDED_FROM_QUARANTINE + - GRAVITYZONE_THREAT_RESTORE_AND_EXCLUDED_FROM_QUARANTINE_FAILED + - GRAVITYZONE_THREAT_DELETE_FROM_QUARANTINE_COMPLETED + - GRAVITYZONE_THREAT_RESTORE_FROM_QUARANTINE_COMPLETED + - GRAVITYZONE_PROVISION_COMPLETED + - GRAVITYZONE_PROVISION_FAILED + - GRAVITYZONE_RETRY_INSTALL_COMPLETED + - GRAVITYZONE_PARTNER_ASSIST_DISABLED + - GRAVITYZONE_SCAN_ATTEMPT_COMPLETED + - GRAVITYZONE_RESET_INACCESSIBLE_LICENSE_COMPLETED + - GRAVITYZONE_THREAT_DELETE_FROM_QUARANTINE_REQUESTED + - GRAVITYZONE_THREAT_RESTORE_FROM_QUARANTINE_REQUESTED + - GRAVITYZONE_THREAT_RESTORE_AND_EXCLUDED_FROM_QUARANTINE_REQUESTED + - GRAVITYZONE_INSTALLATION_STARTED + - GRAVITYZONE_DOWNLOAD_FAILED + - GRAVITYZONE_INSTALLATION_RETRY_STARTED + - GRAVITYZONE_SCAN_CANCELLED + - GRAVITYZONE_DISABLING_FAILED + - GRAVITYZONE_INSTALLATION_EXISTS_DETECTED + - GRAVITYZONE_THREAT_BLOCKED_FROM_ACTIVE_REQUESTED + - GRAVITYZONE_THREAT_BLOCKED_FROM_ACTIVE_COMPLETED + - GRAVITYZONE_THREAT_BLOCKED_FROM_ACTIVE_FAILED + - GRAVITYZONE_DEVICE_MANAGED + - GRAVITYZONE_DEVICE_UNMANAGED + - GRAVITYZONE_COMPANY_CANNOT_BE_ACCESSED + - GRAVITYZONE_QUARANTINED_THREAT_DELETED_OR_RESTORED + - ATTACHMENT_FILE_SUSPICIOUS + - SMTP_SEND_ERROR + - TECHNICIAN_ROLE_CREATED + - TECHNICIAN_ROLE_UPDATED + - TECHNICIAN_ROLE_DELETED + - TECHNICIAN_ROLE_ASSIGNMENT_CHANGED + - TECHNICIAN_PERMISSIONS_CHANGED + - END_USER_ROLE_CREATED + - END_USER_ROLE_UPDATED + - END_USER_ROLE_DELETED + - END_USER_ROLE_ASSIGNMENT_CHANGED + - END_USER_PERMISSIONS_CHANGED + - SENTINEL_ONE_AGENT_ENABLED + - SENTINEL_ONE_AGENT_DISABLED + - SENTINEL_ONE_AGENT_STARTED + - SENTINEL_ONE_AGENT_UPGRADED + - SENTINEL_ONE_AGENT_SHUT_DOWN + - SENTINEL_ONE_AGENT_INSTALLATION_SUCCEEDED + - SENTINEL_ONE_AGENT_INSTALLATION_FAILED + - SENTINEL_ONE_POLICY_CHANGED + - SENTINEL_ONE_LOCAL_CONFIG_CHANGE_FAILED + - SENTINEL_ONE_REGISTRATION_SUCCEEDED + - SENTINEL_ONE_REGISTRATION_FAILED + - SENTINEL_ONE_REMEDIATION_SUCCEEDED + - SENTINEL_ONE_REMEDIATION_FAILED + - SENTINEL_ONE_MITIGATION_SUCCEEDED + - SENTINEL_ONE_MITIGATION_FAILED + - SENTINEL_ONE_MITIGATION_REQUIRE_REBOOT + - SENTINEL_ONE_MITIGATION_CANNOT_KILL + - SENTINEL_ONE_MITIGATION_FAILED_TO_KILL + - SENTINEL_ONE_QUARANTINE_SUCCEEDED + - SENTINEL_ONE_QUARANTINE_FAILED + - SENTINEL_ONE_UNQUARANTINE_SUCCEEDED + - SENTINEL_ONE_UNQUARANTINE_FAILED + - SENTINEL_ONE_THREAT_DETECTED + - SENTINEL_ONE_SCAN_STARTED + - SENTINEL_ONE_SCAN_COMPLETED + - SENTINEL_ONE_SCAN_FAILED + - SENTINEL_ONE_SCAN_ABORTED + - SENTINEL_ONE_COMMAND_RECEIVED + - SENTINEL_ONE_COMMAND_FAILED + - OAUTH2_CREATED + - OAUTH2_UPDATED + - OAUTH2_DELETED + - CROWDSTRIKE_SENSOR_ENABLED + - CROWDSTRIKE_SENSOR_DISABLED + - CROWDSTRIKE_SENSOR_STARTED + - CROWDSTRIKE_SENSOR_UPGRADED + - CROWDSTRIKE_SENSOR_SHUT_DOWN + - CROWDSTRIKE_SENSOR_INSTALLATION_SUCCEEDED + - CROWDSTRIKE_SENSOR_INSTALLATION_FAILED + - CROWDSTRIKE_REGISTRATION_SUCCEEDED + - CROWDSTRIKE_REGISTRATION_FAILED + - CROWDSTRIKE_REMEDIATION_SUCCEEDED + - CROWDSTRIKE_REMEDIATION_FAILED + - CROWDSTRIKE_MITIGATION_SUCCEEDED + - CROWDSTRIKE_MITIGATION_FAILED + - CROWDSTRIKE_QUARANTINE_SUCCEEDED + - CROWDSTRIKE_QUARANTINE_FAILED + - CROWDSTRIKE_THREAT_DETECTED + - CROWDSTRIKE_MISSING_PERMISSIONS + - CROWDSTRIKE_CREDENTIAL_INVALID + - SERVICE_NOW_UPDATED + - SERVICE_NOW_CONFIGURATION_ITEM_CLASS_MAPPING_CREATED + - SERVICE_NOW_CONFIGURATION_ITEM_CLASS_MAPPING_UPDATED + - SERVICE_NOW_CONFIGURATION_ITEM_CLASS_MAPPING_DELETED + - SERVICE_NOW_RESET_AUTHENTICATION + - SERVICE_NOW_NODE_SYNC_NODE_CREATED + - SERVICE_NOW_NODE_SYNC_NODE_UPDATED + - SERVICE_NOW_NODE_SYNC_NODE_ERROR + - SERVICE_NOW_NODE_SYNC_BY_CLIENT_STARTED + - SERVICE_NOW_NODE_SYNC_BY_CLIENT_COMPLETED + - SERVICE_NOW_CLIENT_MAPPING_CREATED + - SERVICE_NOW_CLIENT_MAPPING_UPDATED + - SERVICE_NOW_CLIENT_MAPPING_DELETED + - SERVICE_NOW_SYNC_CLIENT_ON_DEMAND + - SERVICE_NOW_CLIENT_MAPPING_STATUS_UPDATED + - ZENDESK_UPDATED + - FRESHSERVICE_UPDATED + - NINJA_TICKETING_CREATION_FAILED + - NINJA_TICKETING_FORM_CREATED + - NINJA_TICKETING_FORM_UPDATED + - NINJA_TICKETING_FORM_ACTIVED + - NINJA_TICKETING_FORM_DEACTIVED + - NINJA_TICKETING_ATTRIBUTE_CREATED + - NINJA_TICKETING_ATTRIBUTE_UPDATED + - NINJA_TICKETING_ATTRIBUTE_ACTIVED + - NINJA_TICKETING_ATTRIBUTE_DEACTIVATED + - NINJA_TICKETING_RULESET_CREATED + - NINJA_TICKETING_RULESET_UPDATED + - NINJA_TICKETING_RULESET_DELETED + - NINJA_TICKETING_EMAIL_ADDRESS_CONFIG_CREATED + - NINJA_TICKETING_EMAIL_ADDRESS_CONFIG_UPDATED + - NINJA_TICKETING_EMAIL_ADDRESS_CONFIG_DELETED + - NINJA_TICKETING_EMAIL_ADDRESS_CONFIG_MAKE_DEFAULT + - NINJA_TICKETING_TRIGGER_CREATED + - NINJA_TICKETING_TRIGGER_UPDATED + - NINJA_TICKETING_TRIGGER_DELETED + - NINJA_TICKETING_TICKET_CREATED + - NINJA_TICKETING_TICKET_DELETED + - NINJA_TICKETING_PENDING_EMAIL_CREATION_APPROVED + - NINJA_TICKETING_PENDING_EMAIL_UPDATE_APPROVED + - NINJA_TICKETING_PENDING_EMAIL_REJECTED + - NINJA_TICKETING_ENABLED + - NINJA_TICKETING_DISABLED + - NINJA_TICKETING_UPDATED + - NINJA_TICKETING_FORM_MAKE_DEFAULT + - NINJA_TICKETING_CONDITION_RULE_MAKE_DEFAULT + - NINJA_TICKETING_SCRIPT_RULE_MAKE_DEFAULT + - NINJA_TICKETING_PENDING_EMAIL_RECEIVED + - NINJA_TICKETING_EMAIL_ALLOWLIST_ITEM_CREATED + - NINJA_TICKETING_EMAIL_ALLOWLIST_ITEM_UPDATED + - NINJA_TICKETING_EMAIL_ALLOWLIST_ITEM_DELETED + - NINJA_TICKETING_EMAIL_BLOCKLIST_ITEM_CREATED + - NINJA_TICKETING_EMAIL_BLOCKLIST_ITEM_UPDATED + - NINJA_TICKETING_EMAIL_BLOCKLIST_ITEM_DELETED + - NINJA_TICKETING_TICKET_REINSTATED + - NINJA_TICKETING_STATUS_CREATED + - NINJA_TICKETING_STATUS_UPDATED + - NINJA_TICKETING_STATUS_DELETED + - NINJA_TICKETING_AGREEMENT_BULK_UPDATED + - KNOWLEDGE_BASE_DOCUMENT_CREATED + - KNOWLEDGE_BASE_DOCUMENT_UPDATED + - KNOWLEDGE_BASE_DOCUMENT_ARCHIVED + - KNOWLEDGE_BASE_DOCUMENT_RESTORED + - KNOWLEDGE_BASE_DOCUMENT_DELETED + - KNOWLEDGE_BASE_FOLDER_CREATED + - KNOWLEDGE_BASE_FOLDER_UPDATED + - KNOWLEDGE_BASE_FOLDER_ARCHIVED + - KNOWLEDGE_BASE_FOLDER_RESTORED + - KNOWLEDGE_BASE_FOLDER_DELETED + - KNOWLEDGE_BASE_PUBLIC_TEMPORARY_TOKEN_CREATED + - KNOWLEDGE_BASE_PUBLIC_LINK_CREATED + - KNOWLEDGE_BASE_PUBLIC_LINK_UPDATED + - KNOWLEDGE_BASE_PUBLIC_LINK_DELETED + - KNOWLEDGE_BASE_FOLDER_MOVED + - KNOWLEDGE_BASE_DOCUMENT_MOVED + - KNOWLEDGE_BASE_FOLDER_SHARED + - KNOWLEDGE_BASE_FOLDER_ACCESS_RESTRICTED + - DOCUMENT_TEMPLATE_CREATED + - DOCUMENT_TEMPLATE_UPDATED + - DOCUMENT_TEMPLATE_ARCHIVED + - DOCUMENT_TEMPLATE_RESTORED + - DOCUMENT_TEMPLATE_DELETED + - CLIENT_DOCUMENT_CREATED + - CLIENT_DOCUMENT_UPDATED + - CLIENT_DOCUMENT_ARCHIVED + - CLIENT_DOCUMENT_RESTORED + - CLIENT_DOCUMENT_DELETED + - CLIENT_DOCUMENT_ATTRIBUTE_VALUE_DECRYPTED + - CLIENT_DOCUMENT_REVISION_DELETED + - CLIENT_DOCUMENTATION_DELEGATE_NODE_RESPONSIBILITY_ADDED + - CLIENT_DOCUMENTATION_DELEGATE_NODE_RESPONSIBILITY_REMOVED + - CLIENT_DOCUMENT_ATTRIBUTE_TEMPORARY_PUBLIC_TOKEN_CREATED + - CLIENT_CHECKLIST_CREATED + - CLIENT_CHECKLIST_UPDATED + - CLIENT_CHECKLIST_DELETED + - CLIENT_CHECKLIST_PROMOTED + - CLIENT_CHECKLIST_TEMPORARY_PUBLIC_TOKEN_CREATED + - CLIENT_CHECKLIST_ARCHIVED + - CLIENT_CHECKLIST_RESTORED + - CHECKLIST_TEMPLATE_CREATED + - CHECKLIST_TEMPLATE_UPDATED + - CHECKLIST_TEMPLATE_DELETED + - CHECKLIST_TEMPLATE_ARCHIVED + - CHECKLIST_TEMPLATE_RESTORED + - RELATED_ITEM_CREATED + - RELATED_ITEM_UPDATED + - RELATED_ITEM_DELETED + - RELATED_ITEM_SECURE_VALUE_DECRYPTED + - RELATED_ITEM_TEMPORARY_PUBLIC_TOKEN_CREATED + status: + type: string + description: Status description + activityResult: + type: string + description: Activity result + enum: + - SUCCESS + - FAILURE + - UNSUPPORTED + - UNCOMPLETED + sourceConfigUid: + type: string + description: Source configuration/policy element reference + format: uuid + sourceName: + type: string + description: Source configuration/policy element name + subject: + type: string + description: Activity subject + userId: + type: integer + description: User identifier + format: int32 + message: + type: string + description: Activity message + type: + type: string + description: Activity type description + data: + type: object + additionalProperties: true + description: Activity data + NodeActivitiesResponse: + type: object + properties: + lastActivityId: + type: integer + description: Last recorded activity ID for account + format: int64 + activities: + type: array + items: + $ref: "#/components/schemas/Activity" + lastNodeActivityId: + type: integer + description: Last recorded activity ID for device + format: int64 + Alert: + type: object + properties: + uid: + type: string + description: Alert UID (activity series UID) + format: uuid + deviceId: + type: integer + description: Device identifier + format: int32 + message: + type: string + description: Alert message + createTime: + type: number + description: Alert creation timestamp + format: double + updateTime: + type: number + description: Alert last updated + format: double + sourceType: + type: string + description: Alert origin + enum: + - AGENT_OFFLINE + - CONDITION_AGENT_CPU + - CONDITION_AGENT_MEMORY + - CONDITION_AGENT_NETWORK + - CONDITION_AGENT_DISK_IO + - CONDITION_AGENT_DISK_FREE_SPACE + - CONDITION_AGENT_DISK_USAGE + - CONDITION_AGENT_CVSS_SCORE + - CONDITION_AGENT_PATCH_LAST_INSTALLED + - CONDITION_NMS_CPU + - CONDITION_NMS_MEMORY + - CONDITION_NMS_NETWORK_TRAFFIC_BITS + - CONDITION_NMS_NETWORK_TRAFFIC_PERCENT + - CONDITION_NMS_NETWORK_STATUS + - CONDITION_NMS_NETWORK_STATUS_CHANGE + - CONDITION_NMS_SYSTEM_UPTIME + - CONDITION_PING + - CONDITION_PING_LATENCY + - CONDITION_PING_PACKET_LOSS + - CONDITION_PING_RESPONSE + - CONDITION_SYSTEM_UPTIME + - CONDITION_SMART_STATUS_DEGRATED + - CONDITION_RAID_HEALTH_STATUS + - CONDITION_SCRIPT_RESULT + - CONDITION_HTTP + - CONDITION_HTTP_RESPONSE + - CONDITION_PORT + - CONDITION_PORT_SCAN + - CONDITION_SYSLOG + - CONDITION_CONFIGURATION_FILE + - CONDITION_SNMPTRAP + - CONDITION_CRITICAL_EVENT + - CONDITION_DNS + - CONDITION_EMAIL + - CONDITION_CUSTOM_SNMP + - CONDITION_COMPOUND + - SHADOWPROTECT_BACKUPJOB_CREATE + - SHADOWPROTECT_BACKUPJOB_UPDATE + - SHADOWPROTECT_BACKUPJOB_DELETE + - SHADOWPROTECT_BACKUPJOB_EXECUTE + - IMAGEMANAGER_MANAGEDFOLDER_CREATE + - IMAGEMANAGER_MANAGEDFOLDER_UPDATE + - IMAGEMANAGER_MANAGEDFOLDER_DELETE + - IMAGEMANAGER_MANAGEDFOLDER_EXECUTE + - TEAMVIEWER_CONNECTION + - RETRIEVE_AGENT_LOGS + - SCHEDULED_TASK + - CONDITION_WINDOWS_EVENT_LOG_TRIGGERED + - CONDITION_WINDOWS_SERVICE_STATE_CHANGED + - UI_MESSAGE_ACTION_REBOOT + - UI_MESSAGE_BD_INSTALLATION_ISSUES + - GRAVITYZONE_UI_MESSAGE_INSTALLATION_ISSUES + - AV_QUARANTINE_THREAT + - AV_RESTORE_THREAT + - AV_DELETE_THREAT + - AV_REMOVE_THREAT + - BITDEFENDER_RESTORE_THREAT + - BITDEFENDER_DELETE_THREAT + - CONDITION_BITLOCKER_STATUS + - CONDITION_FILEVAULT_STATUS + - CONDITION_LINUX_PROCESS + - CONDITION_LINUX_Daemon + - CONDITION_LINUX_PROCESS_RESOURCE + - CONDITION_LINUX_PROCESS_RESOURCE_CPU + - CONDITION_LINUX_PROCESS_RESOURCE_MEMORY + - CONDITION_LINUX_DISK_FREE_SPACE + - CONDITION_LINUX_DISK_USAGE + - CONDITION_VM_AGGREGATE_CPU_USAGE + - CONDITION_VM_DISK_USAGE + - CONDITION_VM_HOST_DATASTORE + - CONDITION_VM_HOST_UPTIME + - CONDITION_VM_HOST_DEVICE_DOWN + - CONDITION_VM_HOST_BAD_SENSORS + - CONDITION_VM_HOST_SENSOR_HEALTH + - CONDITION_VM_GUEST_GUEST_OPERATIONAL_MODE + - CONDITION_VM_GUEST_SNAPSHOT_SIZE + - CONDITION_VM_GUEST_SNAPSHOT_LIFESPAN + - CONDITION_VM_GUEST_TOOLS_NOT_RUNNING + - CONDITION_HV_GUEST_CHECKPOINT_SIZE + - CONDITION_HV_GUEST_CHECKPOINT_LIFESPAN + - CONDITION_SOFTWARE + - CONDITION_WINDOWS_PROCESS_STATE + - CONDITION_WINDOWS_PROCESS_RESOURCE_CPU + - CONDITION_WINDOWS_PROCESS_RESOURCE_MEMORY + - CONDITION_MAC_PROCESS_STATE + - CONDITION_MAC_PROCESS_RESOURCE_CPU + - CONDITION_MAC_PROCESS_RESOURCE_MEMORY + - CONDITION_MAC_DEAMON + - CONDITION_CUSTOM_FIELD + - CONDITION_PENDING_REBOOT + sourceConfigUid: + type: string + description: Source configuration/policy element reference + format: uuid + sourceName: + type: string + description: Source configuration/policy element name + subject: + type: string + description: Alert subject + userId: + type: integer + description: User identifier + format: int32 + psaTicketId: + type: object + description: Related PSA ticket ID + ticketTemplateId: + type: integer + description: PSA ticket template + format: int32 + data: + type: object + additionalProperties: true + description: Alert data + device: + $ref: "#/components/schemas/NodeWithDetailedReferences" + DiskDrive: + type: object + properties: + bytesPerSector: + type: integer + description: Number of bytes per sector + format: int32 + description: + type: string + description: Description + interfaceType: + type: string + description: Interface type + manufacturer: + type: string + description: Manufacturer + mediaType: + type: string + description: Media Type + model: + type: string + description: Model + name: + type: string + description: Name + partitionCount: + type: integer + description: Number of partitions + format: int32 + serialNumber: + type: string + description: Serial number + size: + type: integer + description: Size (Bytes) + format: int64 + smartCapable: + type: boolean + description: Is S.M.A.R.T. capable? + status: + type: string + description: Status + OSPatch: + type: object + properties: + id: + type: string + description: Identifier + format: uuid + name: + type: string + description: Name + severity: + type: string + description: Severity + status: + type: string + description: Status + type: + type: string + description: Type + installedAt: + type: number + description: Installation attempt timestamp + format: double + kbNumber: + type: string + description: KB Number + SoftwarePatch: + type: object + properties: + id: + type: string + description: Identifier + format: uuid + productIdentifier: + type: string + description: Software product identifier + format: uuid + title: + type: string + description: Patch title + impact: + type: string + description: Impact + status: + type: string + description: Status + type: + type: string + description: Patch type + installedAt: + type: number + description: Installation attempt timestamp + format: double + LoggedOnUser: + type: object + properties: + userName: + type: string + description: User name + logonTime: + type: number + description: Time of logon + format: double + DeviceLink: + type: object + properties: + url: + type: string + description: URL + expires: + type: number + description: Link expiration time + format: double + NetworkInterface: + type: object + properties: + adapterName: + type: string + description: Adapter Name + defaultGateway: + type: string + description: Default Gateway + interfaceType: + type: string + description: Interface Type + dnsHostName: + type: string + description: DNS HostName + dnsServers: + type: string + description: DNS Servers + interfaceIndex: + type: string + description: Interface Index + interfaceName: + type: string + description: Interface Name + ipAddress: + type: array + description: IP Address + items: + type: string + description: IP Address + linkSpeed: + type: string + description: Link Speed + macAddress: + type: array + description: MAC Address + items: + type: string + description: MAC Address + mtu: + type: string + description: MTU + status: + type: string + description: Status + subnetMask: + type: string + description: Subnet Mask + WindowsService: + type: object + properties: + name: + type: string + description: Name + displayName: + type: string + description: Display Name + description: + type: string + description: Description + startType: + type: string + description: Start Type + enum: + - AUTO_START + - AUTO_START_DELAYED + - BOOT_START + - DEMAND_START + - DISABLED + - SYSTEM_START + userName: + type: string + description: User Name + state: + type: string + description: State + enum: + - UNKNOWN + - STOPPED + - START_PENDING + - RUNNING + - STOP_PENDING + - PAUSE_PENDING + - PAUSED + - CONTINUE_PENDING + Application: + type: object + properties: + installDate: + type: string + description: Installation Date + format: date-time + location: + type: string + description: Location + name: + type: string + description: Product Name + publisher: + type: string + description: Publisher + size: + type: integer + description: Size on disk + format: int64 + version: + type: string + description: Version + productCode: + type: string + description: Product Code + PolicyOverrides: + type: object + properties: + overrides: + type: array + description: List of policy sections + items: + type: string + description: List of policy sections + RebootRequest: + type: object + properties: + reason: + type: string + description: Stated reboot reason + CredentialReference: + type: object + properties: + id: + type: integer + format: int32 + name: + type: string + type: + type: string + enum: + - SNMPV12C + - SNMPV3 + - TELNET_SSH + - NETWORK_LOCATION + - ENCRYPTION_KEY + - BASIC + - SNMPV1 + - SNMPV2 + DeviceCredentialOptions: + type: object + properties: + roles: + type: array + items: + type: string + credentials: + type: array + items: + $ref: "#/components/schemas/CredentialReference" + DeviceScriptingOptions: + type: object + properties: + categories: + type: array + items: + $ref: "#/components/schemas/ScriptCategory" + scripts: + type: array + items: + $ref: "#/components/schemas/Script" + credentials: + $ref: "#/components/schemas/DeviceCredentialOptions" + Script: + type: object + properties: + type: + type: string + description: Type of script/action + enum: + - ACTION + - SCRIPT + id: + type: integer + description: Custom script identifier (Scripts) + format: int32 + uid: + type: string + description: Built-in action identifier (Actions) + format: uuid + name: + type: string + description: Name + language: + type: string + description: Script language + description: + type: string + description: Description + architecture: + uniqueItems: true + type: array + description: Applicable architectures + items: + type: string + description: Applicable architectures + categoryId: + type: integer + description: Script Category identifier + format: int32 + ScriptCategory: + type: object + properties: + id: + type: integer + format: int32 + name: + type: string + internal: + type: boolean + RunScriptRequest: + type: object + properties: + type: + type: string + description: Type + enum: + - ACTION + - SCRIPT + id: + type: integer + description: Script identifier + format: int32 + uid: + type: string + description: Built-in action identifier + format: uuid + parameters: + type: string + description: Action/Script parameters + runAs: + type: string + description: Credential role/identifier + WindowsServiceConfiguration: + type: object + properties: + startType: + type: string + description: Start Type + enum: + - AUTO_START + - AUTO_START_DELAYED + - BOOT_START + - DEMAND_START + - DISABLED + - SYSTEM_START + userName: + type: string + description: Username + DeviceMutableProperties: + type: object + properties: + displayName: + type: string + description: Display name (User assigned) + userData: + type: object + additionalProperties: true + description: Custom attributes + nodeRoleId: + type: integer + description: Node Role identifier + format: int32 + policyId: + type: integer + description: "Assigned policy ID (overrides organization policy mapping,\ + \ or reverts to organization policy if Null)" + format: int32 + organizationId: + type: integer + description: Organization identifier + format: int32 + locationId: + type: integer + description: Location identifier + format: int32 + warranty: + $ref: "#/components/schemas/WarrantyDates" + MaintenanceSettings: + type: object + properties: + disabledFeatures: + type: array + description: List of features that will be disabled during maintenance + items: + type: string + description: List of features that will be disabled during maintenance + enum: + - ALERTS + - PATCHING + - AVSCANS + - TASKS + start: + type: number + description: "Maintenance window start (optional, defaults to now)" + format: double + end: + type: number + description: Maintenance window end + format: double + Link: + type: object + properties: + url: + type: string + description: URL + GenerateInstallerRequestDto: + type: object + properties: + organizationId: + type: integer + description: Organization identifier + format: int32 + locationId: + type: integer + description: Location identifier + format: int32 + installerType: + type: string + description: Agent installer type + enum: + - WINDOWS_MSI + - MAC_DMG + - MAC_PKG + - LINUX_DEB + - LINUX_RPM + - LINUX_ARM64_DEB + - LINUX_ARMV7A_DEB + - LINUX_ARM64_RPM + - LINUX_ARMV7A_RPM + usageLimit: + type: integer + description: Usage limit + format: int32 + readOnly: true + content: + $ref: "#/components/schemas/InstallerContent" + InstallerContent: + type: object + properties: + nodeRoleId: + type: string + description: "Identifier for the nodeRole target of this installer. Acceptable\ + \ values include integers, 'auto', or an empty string. If the value is\ + \ omitted, or an empty string, it defaults to 'auto'." + default: auto + description: content + LocationBackupUsageSummary: + type: object + properties: + locationId: + type: integer + description: Device location id + format: int32 + locationName: + type: string + description: Device location name + locationDescription: + type: string + description: Device location description + revisionsCurrentSize: + type: integer + format: int64 + revisionsPreviousSize: + type: integer + format: int64 + revisionsDeletedSize: + type: integer + format: int64 + localFileFolderSize: + type: integer + format: int64 + localImageSize: + type: integer + format: int64 + localImageV2Size: + type: integer + format: int64 + cloudFileFolderSize: + type: integer + format: int64 + cloudImageSize: + type: integer + format: int64 + cloudImageV2Size: + type: integer + format: int64 + lastSuccessfulBackupJob: + type: number + format: double + lastFailedBackupJob: + type: number + format: double + organizationId: + type: integer + format: int32 + organizationName: + type: string + revisionsTotalSize: + type: integer + description: Revisions total size + format: int64 + readOnly: true + cloudTotalSize: + type: integer + description: Revisions cloud total size + format: int64 + readOnly: true + localTotalSize: + type: integer + description: Revisions local total size + format: int64 + readOnly: true + OrganizationModel: + type: object + properties: + name: + type: string + description: Organization full name + description: + type: string + description: Organization Description + userData: + type: object + additionalProperties: true + description: Custom attributes + nodeApprovalMode: + type: string + description: Device Approval Mode + enum: + - AUTOMATIC + - MANUAL + - REJECT + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + AntivirusStatusReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceAntivirusStatus" + Cursor: + type: object + properties: + name: + type: string + offset: + type: integer + format: int32 + count: + type: integer + format: int32 + expires: + type: number + format: double + DeviceAntivirusStatus: + type: object + properties: + productName: + type: string + description: Product name + productState: + type: string + description: Product state + definitionStatus: + type: string + description: Definition Status + version: + type: string + description: Product Version + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + AntivirusThreatsReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceAntivirusThreat" + DeviceAntivirusThreat: + type: object + properties: + name: + type: string + description: Threat name + productCode: + type: string + description: AntiVirus vendor product code + quarantineId: + type: string + description: Threat Quarantine ID + status: + type: string + description: Threat Status (vendor specific) + type: + type: string + description: Type of Threat + threatId: + type: integer + description: Threat ID + format: int64 + category: + type: string + description: Threat Category + level: + type: string + description: Threat Level + detectionSource: + type: string + description: Detection source + traceList: + type: string + description: "Trace list (Files, Cookies, etc. Vendor specific)" + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + ComputerSystemsReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceComputerSystem" + DeviceComputerSystem: + type: object + properties: + name: + type: string + description: Name + manufacturer: + type: string + description: Manufacturer + model: + type: string + description: Model + biosSerialNumber: + type: string + description: Bios Serial Number + serialNumber: + type: string + description: Serial Number + domain: + type: string + domainRole: + type: string + numberOfProcessors: + type: integer + format: int32 + totalPhysicalMemory: + type: integer + format: int64 + virtualMachine: + type: boolean + chassisType: + type: string + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + AttributeValueUpdatedByInfo: + type: object + properties: + source: + type: string + enum: + - API + - USER + - SCRIPT + user: + $ref: "#/components/schemas/UserBasicInfo" + description: Value source (who/what updated the value) + NodeAttributeInfo: + type: object + properties: + name: + type: string + description: Field name + value: + type: object + description: Field Value + updated: + type: number + description: Last field update timestamp + format: double + writeOnly: true + updatedBy: + $ref: "#/components/schemas/AttributeValueUpdatedByInfo" + updateTime: + type: number + format: double + description: Field values + NodeAttributesDetailed: + type: object + properties: + deviceId: + type: integer + description: Entity identifier + format: int32 + writeOnly: true + entityType: + type: string + description: Entity type + enum: + - NODE + - END_USER + - LOCATION + - ORGANIZATION + fields: + type: array + description: Field values + items: + $ref: "#/components/schemas/NodeAttributeInfo" + entityId: + type: integer + format: int32 + NodeAttributesDetailedReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/NodeAttributesDetailed" + NodeAttributes: + type: object + properties: + deviceId: + type: integer + description: Device identifier + format: int32 + fields: + type: object + additionalProperties: + type: object + description: Field values + description: Field values + NodeAttributesReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/NodeAttributes" + DeviceHealthReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceHealthSummary" + DeviceHealthSummary: + type: object + properties: + activeThreatsCount: + type: integer + description: Active AV threats count + format: int32 + quarantinedThreatsCount: + type: integer + description: Quarantined AV threats count + format: int32 + blockedThreatsCount: + type: integer + description: Blocked AV threats count + format: int32 + failedOSPatchesCount: + type: integer + description: Number of failed OS patches + format: int32 + pendingOSPatchesCount: + type: integer + description: Number of pending OS patches + format: int32 + alertCount: + type: integer + description: Alerts count + format: int32 + activeJobCount: + type: integer + description: Alerts job count + format: int32 + failedSoftwarePatchesCount: + type: integer + description: Number of failed software patches + format: int32 + pendingSoftwarePatchesCount: + type: integer + description: Number of pending software patches + format: int32 + pendingRebootReason: + type: string + description: Pending reboot reasons + avInstallStatus: + type: string + description: Antivirus installation status + enum: + - REQUESTED + - DOWNLOAD_STARTED + - DOWNLOADED + - DOWNLOAD_FAILED + - INSTALL_STARTED + - INSTALLED + - INSTALL_FAILED + - UNINSTALL_REQUESTED + - UNINSTALL_FAILED + - UNINSTALLED + productsInstallationStatuses: + type: object + additionalProperties: + type: string + description: Integrated products' installation statuses + enum: + - REQUESTED + - DOWNLOAD_STARTED + - DOWNLOADED + - DOWNLOAD_FAILED + - INSTALL_STARTED + - INSTALLED + - INSTALL_FAILED + - UNINSTALL_REQUESTED + - UNINSTALL_FAILED + - UNINSTALLED + description: Integrated products' installation statuses + offline: + type: boolean + description: Is device offline? + parentDeviceId: + type: integer + description: Parent device identifier + format: int32 + parentOffline: + type: boolean + description: Is parent device offline + healthStatus: + type: string + description: Health status + enum: + - UNKNOWN + - HEALTHY + - NEEDS_ATTENTION + - UNHEALTHY + installationIssuesCount: + type: integer + format: int32 + deviceId: + type: integer + description: Device identifier + format: int32 + DeviceUsageReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/NodeWithDetailedReferences" + DeviceDiskDrive: + type: object + properties: + bytesPerSector: + type: integer + description: Number of bytes per sector + format: int32 + description: + type: string + description: Description + interfaceType: + type: string + description: Interface type + manufacturer: + type: string + description: Manufacturer + mediaType: + type: string + description: Media Type + model: + type: string + description: Model + name: + type: string + description: Name + partitionCount: + type: integer + description: Number of partitions + format: int32 + serialNumber: + type: string + description: Serial number + size: + type: integer + description: Size (Bytes) + format: int64 + smartCapable: + type: boolean + description: Is S.M.A.R.T. capable? + status: + type: string + description: Status + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + DiskDriveReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceDiskDrive" + DeviceOSPatch: + type: object + properties: + id: + type: string + description: Identifier + format: uuid + name: + type: string + description: Name + severity: + type: string + description: Severity + status: + type: string + description: Status + type: + type: string + description: Type + installedAt: + type: number + description: Installation attempt timestamp + format: double + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + kbNumber: + type: string + description: KB Number + OSPatchReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceOSPatch" + DeviceSoftwarePatch: + type: object + properties: + id: + type: string + description: Identifier + format: uuid + productIdentifier: + type: string + description: Software product identifier + format: uuid + title: + type: string + description: Patch title + impact: + type: string + description: Impact + status: + type: string + description: Status + type: + type: string + description: Patch type + installedAt: + type: number + description: Installation attempt timestamp + format: double + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + SoftwarePatchReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceSoftwarePatch" + DeviceLoggedOnUser: + type: object + properties: + userName: + type: string + description: User name + logonTime: + type: number + description: Time of logon + format: double + deviceId: + type: integer + description: Device identifier + format: int32 + LoggedOnUsersReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceLoggedOnUser" + DeviceNetworkInterfaces: + type: object + properties: + adapterName: + type: string + description: Adapter Name + defaultGateway: + type: string + description: Default Gateway + interfaceType: + type: string + description: Interface Type + dnsHostName: + type: string + description: DNS HostName + dnsServers: + type: string + description: DNS Servers + interfaceIndex: + type: string + description: Interface Index + interfaceName: + type: string + description: Interface Name + ipAddress: + type: array + description: IP Address + items: + type: string + description: IP Address + linkSpeed: + type: string + description: Link Speed + macAddress: + type: array + description: MAC Address + items: + type: string + description: MAC Address + mtu: + type: string + description: MTU + status: + type: string + description: Status + subnetMask: + type: string + description: Subnet Mask + deviceId: + type: integer + description: Device identifier + format: int32 + NetworkInterfacesReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceNetworkInterfaces" + DeviceOperatingSystem: + type: object + properties: + manufacturer: + type: string + description: Manufacturer + name: + type: string + description: Name + architecture: + type: string + description: Architecture + lastBootTime: + type: number + description: Last boot time + format: double + buildNumber: + type: string + description: Build number + releaseId: + type: string + description: Release ID + servicePackMajorVersion: + type: integer + description: Service Pack Major Version + format: int32 + servicePackMinorVersion: + type: integer + description: Service Pack Minor Version + format: int32 + locale: + type: string + description: Locale + language: + type: string + description: Language + needsReboot: + type: boolean + description: Operating system has pending reboot requests + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + OperatingSystemsReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceOperatingSystem" + DevicePolicyOverrides: + type: object + properties: + overrides: + type: array + description: List of policy sections + items: + type: string + description: List of policy sections + deviceId: + type: integer + description: Device identifier + format: int32 + PolicyOverridesReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DevicePolicyOverrides" + DeviceProcessor: + type: object + properties: + architecture: + type: string + description: Architecture + maxClockSpeed: + type: integer + description: Max Clock Speed + format: int64 + clockSpeed: + type: integer + description: Current Clock Speed + format: int64 + name: + type: string + description: Name + numCores: + type: integer + description: Number of Cores + format: int32 + numLogicalCores: + type: integer + description: "Number of Logical Cores]" + format: int32 + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + ProcessorReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceProcessor" + DeviceRAIDController: + type: object + properties: + backupBatteryStatus: + type: string + description: Backup Battery Status + batteryTemperature: + type: integer + description: Battery Temperature + format: int32 + biosVersion: + type: string + description: BIOS Version + cacheSize: + type: integer + description: Cache size (bytes) + format: int64 + controllerIndex: + type: integer + description: Controller Index + format: int32 + driverName: + type: string + description: Device Driver Name + driverVersion: + type: string + description: Driver Version + family: + type: string + description: Family + firmwareVersion: + type: string + description: Firmware Version + hardwareRevision: + type: string + description: Hardware Revision + manufacturer: + type: string + description: Manufacturer + manufacturingDate: + type: number + description: Manufacturing date + format: double + model: + type: string + description: Model + physicalDriveCount: + type: integer + description: Physical drive count + format: int32 + slot: + type: string + description: Slot + systemHealthStatus: + type: string + description: System Health Status + virtualDriveCount: + type: integer + description: Virtual drive count + format: int32 + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + RAIDControllerReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceRAIDController" + DeviceRAIDDrive: + type: object + properties: + controllerIndex: + type: integer + description: Controller index + format: int32 + driveGroup: + type: string + description: Drive Group + driveId: + type: string + description: Drive Identifier + interfaceType: + type: string + description: Interface type + location: + type: string + description: Location + mediaType: + type: string + description: Media type + model: + type: string + description: Model + protectionInfo: + type: string + description: Protection Information + selfEncrypted: + type: boolean + description: Is self encrypted? + serial: + type: string + description: Serial number + size: + type: integer + description: Size (bytes) + format: int64 + spun: + type: boolean + description: Spun? + status: + type: string + description: Status + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + RAIDDriveReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceRAIDDrive" + ScopedAttributesDetailed: + type: object + properties: + scope: + type: string + description: Value definition scope (entity type) + enum: + - NODE + - END_USER + - LOCATION + - ORGANIZATION + entityId: + type: integer + description: "Entity identifier (device, organization, location)" + format: int32 + fields: + type: array + description: Field values + items: + $ref: "#/components/schemas/NodeAttributeInfo" + ScopedAttributesDetailedReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/ScopedAttributesDetailed" + ScopedAttributes: + type: object + properties: + scope: + type: string + description: Value definition scope (entity type) + enum: + - NODE + - END_USER + - LOCATION + - ORGANIZATION + entityId: + type: integer + description: "Entity identifier (device, organization, location)" + format: int32 + fields: + type: object + additionalProperties: + type: object + description: Field values + description: Field values + ScopedAttributesReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/ScopedAttributes" + DeviceApplication: + type: object + properties: + installDate: + type: string + description: Installation Date + format: date-time + location: + type: string + description: Location + name: + type: string + description: Product Name + publisher: + type: string + description: Publisher + size: + type: integer + description: Size on disk + format: int64 + version: + type: string + description: Version + productCode: + type: string + description: Product Code + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + SoftwareReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceApplication" + DeviceVolume: + type: object + properties: + name: + type: string + description: Name + driveLetter: + type: string + description: Drive Letter + label: + type: string + description: Volume Label + deviceType: + type: string + description: Device Type + fileSystem: + type: string + description: File System Type + autoMount: + type: boolean + description: Automatically Mounted + compressed: + type: boolean + description: Compressed + capacity: + type: integer + description: Capacity (bytes) + format: int64 + freeSpace: + type: integer + description: Free Space (bytes) + format: int64 + serialNumber: + type: string + description: Serial Number + bitLockerStatus: + $ref: "#/components/schemas/VolumeBitLockerStatus" + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + VolumesReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceVolume" + DeviceWindowsService: + type: object + properties: + name: + type: string + description: Name + displayName: + type: string + description: Display Name + description: + type: string + description: Description + startType: + type: string + description: Start Type + enum: + - AUTO_START + - AUTO_START_DELAYED + - BOOT_START + - DEMAND_START + - DISABLED + - SYSTEM_START + userName: + type: string + description: User Name + state: + type: string + description: State + enum: + - UNKNOWN + - STOPPED + - START_PENDING + - RUNNING + - STOP_PENDING + - PAUSE_PENDING + - PAUSED + - CONTINUE_PENDING + deviceId: + type: integer + description: Device identifier + format: int32 + timestamp: + type: number + description: Date/Time when data was collected/updated + format: double + WindowsServiceReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/DeviceWindowsService" + PolicyInfo: + type: object + properties: + parentPolicyId: + type: integer + description: Parent Policy identifier + format: int32 + name: + type: string + description: Name + description: + type: string + description: Description + nodeClass: + type: string + description: Node Class + enum: + - WINDOWS_SERVER + - WINDOWS_WORKSTATION + - LINUX_WORKSTATION + - MAC + - ANDROID + - APPLE_IOS + - APPLE_IPADOS + - VMWARE_VM_HOST + - VMWARE_VM_GUEST + - HYPERV_VMM_HOST + - HYPERV_VMM_GUEST + - LINUX_SERVER + - MAC_SERVER + - CLOUD_MONITOR_TARGET + - NMS_SWITCH + - NMS_ROUTER + - NMS_FIREWALL + - NMS_PRIVATE_NETWORK_GATEWAY + - NMS_PRINTER + - NMS_SCANNER + - NMS_DIAL_MANAGER + - NMS_WAP + - NMS_IPSLA + - NMS_COMPUTER + - NMS_VM_HOST + - NMS_APPLIANCE + - NMS_OTHER + - NMS_SERVER + - NMS_PHONE + - NMS_VIRTUAL_MACHINE + - NMS_NETWORK_MANAGEMENT_AGENT + - UNMANAGED_DEVICE + - MANAGED_DEVICE + enabled: + type: boolean + description: Policy Enabled Flag + default: true + ActivitiesResponse: + type: object + properties: + lastActivityId: + type: integer + description: Last recorded activity ID for account + format: int64 + activities: + type: array + items: + $ref: "#/components/schemas/Activity" + AutomationScript: + type: object + properties: + id: + type: integer + description: Script ID + format: int32 + name: + type: string + description: Script Name + description: + type: string + description: Script Description + active: + type: boolean + description: Script is Active + language: + type: string + description: Script Language + architecture: + uniqueItems: true + type: array + description: Applicable Architectures + items: + type: string + description: Applicable Architectures + operatingSystems: + uniqueItems: true + type: array + description: Applicable Operating Systems + items: + type: string + description: Applicable Operating Systems + scriptParameters: + type: array + description: Script Parameters + items: + type: string + description: Script Parameters + scriptVariables: + type: array + description: Script Variables + items: + $ref: "#/components/schemas/ScriptVariable" + createdBy: + type: string + description: Script Created By + lastUpdatedBy: + type: string + description: Script Last Updated By + createdOn: + type: number + description: Script date of creation + format: double + updatedOn: + type: number + description: Script last updated date + format: double + ScriptVariable: + type: object + properties: + id: + type: string + description: Script Variable ID + name: + type: string + description: Script Variable Name + description: + type: string + description: Script Variable Description + type: + type: string + description: Script Variable Type + enum: + - CHECKBOX + - DATE + - DATETIME + - DECIMAL + - INTEGER + - IPADDRESS + - DROPDOWN + - TEXT + - OTHER + source: + type: string + description: Script Variable Source + enum: + - LITERAL + - OTHER + defaultValue: + type: string + description: Script Variable Default Value + required: + type: boolean + description: Script Variable is Required + valueList: + type: array + description: Script Variable List of Possible Values + items: + type: string + description: Script Variable List of Possible Values + description: Script Variables + AttributeContent: + type: object + properties: + customizeForEndUser: + type: boolean + endUserCustomization: + $ref: "#/components/schemas/EndUserCustomization" + values: + type: array + items: + $ref: "#/components/schemas/AttributeContentValue" + required: + type: boolean + footerText: + type: string + tooltipText: + type: string + advancedSettings: + $ref: "#/components/schemas/AttributeContentAdvancedSettings" + AttributePublicApiDTO: + type: object + properties: + entityType: + type: string + description: Entity Type + enum: + - USER + - NODE + - TICKET + - DOCUMENT + scope: + type: string + description: Scope + enum: + - NODE_GLOBAL + - NODE_ROLE + - NODE_CLASS + definitionScope: + uniqueItems: true + type: array + description: Definition Scope + items: + type: string + description: Definition Scope + enum: + - NODE + - END_USER + - LOCATION + - ORGANIZATION + type: + type: string + description: Type + enum: + - DROPDOWN + - MULTI_SELECT + - CHECKBOX + - TEXT + - TEXT_MULTILINE + - TEXT_ENCRYPTED + - NUMERIC + - DECIMAL + - DATE + - DATE_TIME + - TIME + - ATTACHMENT + - NODE_DROPDOWN + - NODE_MULTI_SELECT + - CLIENT_DROPDOWN + - CLIENT_MULTI_SELECT + - CLIENT_LOCATION_DROPDOWN + - CLIENT_LOCATION_MULTI_SELECT + - CLIENT_DOCUMENT_DROPDOWN + - CLIENT_DOCUMENT_MULTI_SELECT + - EMAIL + - PHONE + - IP_ADDRESS + - WYSIWYG + - URL + label: + type: string + description: Label + description: + type: string + description: Description + name: + type: string + description: Name + defaultValue: + type: string + description: Default Value + endUserPermission: + type: string + description: End User Permission + enum: + - HIDDEN + - EDITABLE_OPTIONAL + - EDITABLE_REQUIRED + - READ_ONLY + technicianPermission: + type: string + description: Technician Permission + enum: + - NONE + - EDITABLE + - READ_ONLY + scriptPermission: + type: string + description: Script Permission + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + apiPermission: + type: string + description: Public API Permission + enum: + - NONE + - READ_ONLY + - WRITE_ONLY + - READ_WRITE + content: + $ref: "#/components/schemas/AttributeContent" + system: + type: boolean + description: System + active: + type: boolean + description: Active + createTime: + type: number + description: Create Time + format: double + updateTime: + type: number + description: Update Time + format: double + NotificationChannel: + type: object + properties: + id: + type: integer + description: Notification Channel ID + format: int32 + name: + type: string + description: Notification Channel Name + description: + type: string + description: Notification Channel Description + enabled: + type: boolean + description: Notification Channel Enabled + type: + type: string + description: Notification Channel Type + enum: + - EMAIL + - META_CHANNEL + - PAGER_DUTY + - SLACK + - SMS + - MICROSOFT_TEAMS + - WEBHOOK + - OTHER + Group: + type: object + properties: + id: + type: integer + description: Group identifier + format: int32 + name: + type: string + description: Group Name + description: + type: string + description: Group description + shared: + type: boolean + description: Group is shared with all users? + created: + type: number + description: Timestamp of group creation + format: double + updated: + type: number + description: Timestamp last update + format: double + deviceCount: + type: integer + description: Estimated/Last known device count. Can be `null` if group + membership has not been evaluated recently + format: int32 + lastEvaluated: + type: number + description: Last evaluation time of group membership for nodes (search) + format: double + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + LocationWithOrganizationRef: + type: object + properties: + name: + type: string + description: Location name + address: + type: string + description: Address + description: + type: string + description: Description + userData: + type: object + additionalProperties: true + description: Custom attributes + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + id: + type: integer + description: Location identifier + format: int32 + organizationId: + type: integer + description: Organization identifier + format: int32 + ScheduledTask: + type: object + properties: + id: + type: integer + description: Scheduled Task identifier + format: int32 + name: + type: string + description: Name + description: + type: string + description: Description + enabled: + type: boolean + description: Is Enabled ? + created: + type: number + description: Timestamp of Scheduled Task creation + format: double + lastRun: + type: number + description: Timestamp of last Scheduled Task run + format: double + runCount: + type: integer + description: Number of times scheduled task ran + format: int32 + SoftwareProduct: + type: object + properties: + id: + type: string + description: Product identifier + format: uuid + vendorName: + type: string + description: Vendor Name + productName: + type: string + description: Product Name + installable: + type: boolean + description: Installable + active: + type: boolean + description: Active + DeviceSearchMatch: + type: object + properties: + id: + type: integer + description: Node (Device) identifier + format: int32 + uid: + type: string + description: Node (Device) UUID + format: uuid + assignedOwnerUid: + type: string + description: Node (Device) Owner UUID + format: uuid + parentDeviceId: + type: integer + description: Parent Node identifier + format: int32 + organizationId: + type: integer + description: Organization identifier + format: int32 + locationId: + type: integer + description: Location identifier + format: int32 + nodeClass: + type: string + description: Node Class + enum: + - WINDOWS_SERVER + - WINDOWS_WORKSTATION + - LINUX_WORKSTATION + - MAC + - ANDROID + - APPLE_IOS + - APPLE_IPADOS + - VMWARE_VM_HOST + - VMWARE_VM_GUEST + - HYPERV_VMM_HOST + - HYPERV_VMM_GUEST + - LINUX_SERVER + - MAC_SERVER + - CLOUD_MONITOR_TARGET + - NMS_SWITCH + - NMS_ROUTER + - NMS_FIREWALL + - NMS_PRIVATE_NETWORK_GATEWAY + - NMS_PRINTER + - NMS_SCANNER + - NMS_DIAL_MANAGER + - NMS_WAP + - NMS_IPSLA + - NMS_COMPUTER + - NMS_VM_HOST + - NMS_APPLIANCE + - NMS_OTHER + - NMS_SERVER + - NMS_PHONE + - NMS_VIRTUAL_MACHINE + - NMS_NETWORK_MANAGEMENT_AGENT + - UNMANAGED_DEVICE + - MANAGED_DEVICE + nodeRoleId: + type: integer + description: Node Role identifier + format: int32 + rolePolicyId: + type: integer + description: Node Role policy ID based on organization and location Policy + Mapping + format: int32 + policyId: + type: integer + description: Assigned policy ID (overrides organization and location policy + mapping) + format: int32 + approvalStatus: + type: string + description: Approval Status + enum: + - PENDING + - APPROVED + offline: + type: boolean + description: Is Offline? + displayName: + type: string + description: Display Name + systemName: + type: string + description: System Name + dnsName: + type: string + description: DNS Name + netbiosName: + type: string + description: NETBIOS Name + created: + type: number + description: Created + format: double + lastContact: + type: number + description: Last Contact + format: double + lastUpdate: + type: number + description: Last data submission timestamp + format: double + userData: + type: object + additionalProperties: true + description: Custom attributes + tags: + type: array + description: Tags + items: + type: string + description: Tags + fields: + type: object + additionalProperties: + type: object + description: Custom Fields + description: Custom Fields + maintenance: + $ref: "#/components/schemas/Maintenance" + references: + $ref: "#/components/schemas/NodeReferences" + score: + type: integer + description: Match score + format: int32 + matchAttr: + type: string + description: Name of the attribute that matched the query + matchAttrValue: + type: string + description: Value of that attribute that matched + description: Devices matching search query + DeviceSearchResults: + type: object + properties: + query: + type: string + description: Search query + devices: + type: array + description: Devices matching search query + items: + $ref: "#/components/schemas/DeviceSearchMatch" + BackupJob: + type: object + properties: + jobId: + type: string + description: Job id + format: uuid + jobStartTime: + type: number + description: Job start time + format: double + jobEndTime: + type: number + description: Job end time + format: double + jobStatus: + type: string + description: Job status + planGuid: + type: string + description: Plan id + format: uuid + planName: + type: string + description: Plan name + planType: + type: string + description: Plan type + totalActualStorageBytes: + type: integer + description: Total bytes + format: int64 + organizationId: + type: integer + description: Organization id + format: int32 + locationId: + type: integer + description: Location id + format: int32 + deviceId: + type: integer + description: Device id + format: int32 + BackupJobReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + items: + $ref: "#/components/schemas/BackupJob" + LockhartIntegrityCheckJob: + type: object + properties: + deviceId: + type: integer + description: Device identifier + format: int32 + device: + $ref: "#/components/schemas/NodeWithDetailedReferences" + jobId: + type: string + description: Job id. + format: uuid + jobStartTime: + type: number + description: Job start time. + format: double + jobEndTime: + type: number + description: Job end time. + format: double + jobStatus: + type: string + description: Job status. + planGuid: + type: string + description: Plan id. + format: uuid + planName: + type: string + description: Plan name. + planType: + type: string + description: Plan type. + totalActualStorageBytes: + type: integer + description: Total bytes + format: int64 + totalActualStorageFiles: + type: integer + description: Total files. + format: int64 + actualBytesChecked: + type: integer + description: Bytes checked. + format: int64 + actualFilesChecked: + type: integer + description: Files checked. + format: int64 + description: The integrity check job information. + LockhartIntegrityCheckJobReport: + type: object + properties: + cursor: + $ref: "#/components/schemas/Cursor" + results: + type: array + description: List of integrity check jobs. + items: + $ref: "#/components/schemas/LockhartIntegrityCheckJob" + description: The integrity check job report. + TicketingAttributePublicApiDTO: + type: object + properties: + id: + type: integer + format: int32 + attributeType: + type: string + name: + type: string + description: + type: string + customizeForEndUser: + type: boolean + nameForEndUser: + type: string + descriptionForEndUser: + type: string + endUserOption: + type: string + technicianOption: + type: string + content: + $ref: "#/components/schemas/AttributeContent" + system: + type: boolean + active: + type: boolean + createTime: + type: number + format: double + updateTime: + type: number + format: double + ContactResponseDTO: + type: object + properties: + id: + type: integer + format: int32 + clientId: + type: integer + format: int32 + clientName: + type: string + uid: + type: string + format: uuid + firstName: + type: string + lastName: + type: string + email: + type: string + phone: + type: string + jobTitle: + type: string + displayName: + type: string + createTime: + type: number + format: double + updateTime: + type: number + format: double + TicketFormContent: + type: object + properties: + fields: + type: array + items: + type: integer + format: int32 + timerSettings: + $ref: "#/components/schemas/TimerSettings" + TicketFormPublicApiDTO: + type: object + properties: + id: + type: integer + format: int32 + name: + type: string + description: + type: string + endUserTitle: + type: string + content: + $ref: "#/components/schemas/TicketFormContent" + active: + type: boolean + createTime: + type: number + format: double + updateTime: + type: number + format: double + fields: + type: array + items: + $ref: "#/components/schemas/TicketingAttributePublicApiDTO" + default: + type: boolean + TimerSettings: + type: object + properties: + enabled: + type: boolean + mode: + type: string + enum: + - MANUAL + - AUTO_START + Condition: + type: object + properties: + any: + uniqueItems: true + type: array + items: + $ref: "#/components/schemas/Rule" + all: + uniqueItems: true + type: array + items: + $ref: "#/components/schemas/Rule" + Rule: + type: object + properties: + field: + type: string + operator: + type: string + value: + type: string + TicketingBoardPublicApiDTO: + type: object + properties: + id: + type: integer + format: int32 + uid: + type: string + format: uuid + name: + type: string + description: + type: string + conditions: + $ref: "#/components/schemas/Condition" + createTime: + type: number + format: double + updateTime: + type: number + format: double + system: + type: boolean + columns: + uniqueItems: true + type: array + items: + type: string + sortBy: + uniqueItems: true + type: array + items: + type: object + additionalProperties: + type: object + ticketCount: + type: integer + format: int32 + AttributeData: + type: object + properties: + name: + type: string + type: + type: string + enum: + - DROPDOWN + - MULTI_SELECT + - CHECKBOX + - TEXT + - TEXT_MULTILINE + - TEXT_ENCRYPTED + - NUMERIC + - DECIMAL + - DATE + - DATE_TIME + - TIME + - ATTACHMENT + - NODE_DROPDOWN + - NODE_MULTI_SELECT + - CLIENT_DROPDOWN + - CLIENT_MULTI_SELECT + - CLIENT_LOCATION_DROPDOWN + - CLIENT_LOCATION_MULTI_SELECT + - CLIENT_DOCUMENT_DROPDOWN + - CLIENT_DOCUMENT_MULTI_SELECT + - EMAIL + - PHONE + - IP_ADDRESS + - WYSIWYG + - URL + SortBy: + type: object + properties: + field: + type: string + direction: + type: string + enum: + - ASC + - DESC + TicketDashboardPublicApiDTO: + type: object + properties: + data: + type: array + items: + type: object + additionalProperties: + type: object + metadata: + $ref: "#/components/schemas/TicketMetadata" + TicketMetadata: + type: object + properties: + columns: + uniqueItems: true + type: array + items: + type: string + sortBy: + type: array + items: + $ref: "#/components/schemas/SortBy" + attributes: + type: object + additionalProperties: + $ref: "#/components/schemas/AttributeData" + filters: + uniqueItems: true + type: array + items: + $ref: "#/components/schemas/Rule" + allRequiredColumns: + uniqueItems: true + type: array + items: + type: string + allColumns: + uniqueItems: true + type: array + items: + type: string + columnNamesForExporting: + uniqueItems: true + type: array + items: + type: string + TicketBoardScrollingRequestDTO: + type: object + properties: + sortBy: + type: array + items: + $ref: "#/components/schemas/SortBy" + filters: + uniqueItems: true + type: array + items: + $ref: "#/components/schemas/Rule" + pageSize: + type: integer + format: int32 + searchCriteria: + maxLength: 512 + minLength: 0 + type: string + includeColumns: + uniqueItems: true + type: array + items: + type: string + lastCursorId: + type: integer + format: int32 + AppUserAndContactPublicApiDTO: + type: object + properties: + uid: + type: string + description: Global identifier for the user + format: uuid + id: + type: integer + description: User identifier + format: int32 + clientId: + type: integer + description: Client identifier + format: int32 + firstName: + type: string + description: The user's first name + lastName: + type: string + description: The user's last name + email: + type: string + description: The user's email address + userType: + type: string + description: System User Type + enum: + - TECHNICIAN + - END_USER + - CONTACT + naturalId: + type: string + description: Last User Identifier + EndUser: + type: object + properties: + id: + type: integer + description: User identifier + format: int32 + uid: + type: string + description: User universally unique identifier + format: uuid + enabled: + type: boolean + description: User access status + firstName: + type: string + description: First name + lastName: + type: string + description: Last name + email: + type: string + description: Email address + phone: + type: string + description: Phone number + organizationId: + type: integer + description: Identifier of organization for end-users + format: int32 + fullPortalAccess: + type: boolean + description: Has full portal access + mustChangePw: + type: boolean + description: Must change password during next login + mfaConfigured: + type: boolean + description: At least one MFA method is configured + scimUser: + type: boolean + description: User created by SCIM + authType: + type: string + description: "Authentication type, NATIVE or SSO" + invitationStatus: + type: string + description: User invitation status + enum: + - REGISTERED + - PENDING + - EXPIRED + assignedDeviceIds: + type: array + description: Device IDs which user is assigned + items: + type: integer + description: Device IDs which user is assigned + format: int32 + accessibleDeviceIds: + type: array + description: Device IDs which user has access to + items: + type: integer + description: Device IDs which user has access to + format: int32 + roles: + type: array + description: A list of role names assigned to the user. This is provided + when the 'includeRoles' query parameter is set to 'true' + items: + type: string + description: A list of role names assigned to the user. This is provided + when the 'includeRoles' query parameter is set to 'true' + CreateEndUserRequest: + type: object + properties: + firstName: + maxLength: 150 + minLength: 1 + type: string + description: First name should be between 1 and 150 characters + lastName: + maxLength: 150 + minLength: 1 + type: string + description: Last name should be between 1 and 150 characters + email: + type: string + description: Email address + phone: + type: string + description: Phone number + organizationId: + type: integer + description: Organization identifier + format: int32 + fullPortalAccess: + type: boolean + description: Gives end user full portal access + description: Create end user request payload + EndUserPatchRequest: + type: object + properties: + firstName: + maxLength: 150 + minLength: 1 + type: string + description: First name should be between 1 and 150 characters + lastName: + maxLength: 150 + minLength: 1 + type: string + description: Last name should be between 1 and 150 characters + organizationId: + type: integer + description: Organization identifier + format: int32 + fullPortalAccess: + type: boolean + description: Gives end user full portal access + description: Patch end user request payload + Technician: + type: object + properties: + id: + type: integer + description: User identifier + format: int32 + uid: + type: string + description: User universally unique identifier + format: uuid + enabled: + type: boolean + description: User access status + firstName: + type: string + description: First name + lastName: + type: string + description: Last name + email: + type: string + description: Email address + phone: + type: string + description: Phone number + mustChangePw: + type: boolean + description: Must change password during next login + mfaConfigured: + type: boolean + description: At least one MFA method is configured + scimUser: + type: boolean + description: User is created by SCIM? + authType: + type: string + description: Native or SSO authentication + userType: + type: string + description: User type + enum: + - TECHNICIAN + - END_USER + invitationStatus: + type: string + description: User invitation status + enum: + - REGISTERED + - PENDING + - EXPIRED + notifyAllClients: + type: boolean + description: Notifications for all clients + administrator: + type: boolean + description: Technician is a System Administrator + assignedDeviceIds: + type: array + description: Device IDs which user is assigned + items: + type: integer + description: Device IDs which user is assigned + format: int32 + roles: + type: array + description: A list of role names assigned to the technician. This is provided + when the 'includeRoles' query parameter is set to 'true' + items: + type: string + description: A list of role names assigned to the technician. This is + provided when the 'includeRoles' query parameter is set to 'true' + CreateTechnicianRequest: + type: object + properties: + firstName: + maxLength: 150 + minLength: 1 + type: string + description: First name should be between 1 and 150 characters + lastName: + maxLength: 150 + minLength: 1 + type: string + description: Last name should be between 1 and 150 characters + email: + type: string + description: Email address + phone: + type: string + description: Phone number + description: Create technician request payload + UpdateTechnicianRequest: + type: object + properties: + firstName: + type: string + description: First name + lastName: + type: string + description: Last name + description: Update technician request payload + RoleMember: + type: object + properties: + id: + type: integer + description: User identifier + format: int32 + email: + type: string + description: User email + name: + type: string + description: User full name + source: + type: string + description: Source of role assignment + description: Role members + UserRole: + type: object + properties: + id: + type: integer + description: Role identifier + format: int32 + name: + type: string + description: Role name + type: + type: string + description: Role type + description: + type: string + description: Role description + members: + type: array + description: Role members + items: + $ref: "#/components/schemas/RoleMember" + securitySchemes: + oauth2: + type: http + scheme: bearer + bearerFormat: bearer + sessionKey: + type: apiKey + name: sessionKey + in: cookie