Public/Get-PegasusConnectorPersons.ps1

<#
.SYNOPSIS
Gets connector persons from the Pegasus API

.EXAMPLE
Get-PegasusConnectorPersons -ConnectorId "ca29c5b7-ec3a-4efc-8fc7-125a33029471"

#>

function Get-PegasusConnectorPersons {
    [CmdletBinding()]

    Param
    (
        [Parameter(Mandatory = $true)]
        [ValidatePattern("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")]
        [String] $ConnectorId
    )
    
    Process {
        Write-Verbose "Getting persons for connector $ConnectorId"
        Invoke-PegasusRequest -Endpoint "/connectors/$ConnectorId/persons" | ForEach-Object { $_ }
    }
}