Public/ActivityCommentHistories/Get-AspireActivityCommentHistories.ps1
|
<#
.SYNOPSIS Retrieves a list of activity comment histories from the Aspire API. .DESCRIPTION Uses Invoke-AspireRequest to perform a GET request to the /ActivityCommentHistories endpoint with support for OData query parameters. .PARAMETER Filter Optional OData filter query (e.g., "ActivityID eq 123"). .PARAMETER Top Optional number of records to return (integer). .PARAMETER Skip Optional number of records to skip (integer). .PARAMETER Select Optional comma-separated list of fields to include (e.g., "CommentID,CommentText"). .PARAMETER Expand Optional comma-separated list of related entities to expand (e.g., "Activity"). .OUTPUTS The response from the API containing the list of activity comment histories. .EXAMPLE Get-AspireActivityCommentHistories -Filter "ActivityID eq 123" -Top 10 -Skip 5 -Select "CommentID,CommentText" -Expand "Activity" #> function Get-AspireActivityCommentHistories { [CmdletBinding()] param( [parameter(Mandatory=$true)] [int]$ActivityID, [int]$Top = $null, [int]$Skip = $null, [string]$Select = $null, [string]$Expand = $null ) $queryParams = @{ filter = "ActivityID eq $ActivityID" } if ($Top) { $queryParams['$top'] = $Top } if ($Skip) { $queryParams['$skip'] = $Skip } if ($Select) { $queryParams['$select'] = $Select } if ($Expand) { $queryParams['$expand'] = $Expand } return Invoke-AspireRequest -Method GET -Path "/ActivityCommentHistories" -QueryParams $queryParams } |