incidents/Get-CsIncidentInfo.psm1
function Get-CsIncidentInfo { <# .SYNOPSIS Get details on incidents by providing incident IDs .PARAMETER ID One or more incident IDs #> [CmdletBinding()] [OutputType([psobject])] param( [Parameter(Mandatory = $true)] [array] $Id ) process{ $Param = @{ Uri = '/incidents/entities/incidents/GET/v1' Method = 'post' Header = @{ accept = 'application/json' 'content-type' = 'application/json' } Body = @{ ids = $Id } | ConvertTo-Json } switch ($PSBoundParameters.Keys) { 'Verbose' { $Param['Verbose'] = $true } 'Debug' { $Param['Debug'] = $true } } Invoke-CsAPI @Param } } |