Public/Get-GCRoutingPredictors.ps1

<#
.SYNOPSIS
    Retrieves a list of routing predictors from Genesys Cloud.

.DESCRIPTION
    Queries the Genesys Cloud API to retrieve a paginated list of routing predictors
    configured in the organization. Predictors use AI to optimize routing decisions.
    API Endpoint: GET /api/v2/routing/predictors

.PARAMETER PageSize
    The number of results per page. Default is 25.

.PARAMETER PageNumber
    The page number to retrieve. Default is 1.

.EXAMPLE
    Get-GCRoutingPredictors
    Retrieves the first page of routing predictors.

.NOTES
    Genesys Cloud API: GET /api/v2/routing/predictors
#>

function Get-GCRoutingPredictors {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $false)]
        [int]$PageSize = 25,

        [Parameter(Mandatory = $false)]
        [int]$PageNumber = 1
    )

    $queryParams = @{
        pageSize   = $PageSize
        pageNumber = $PageNumber
    }

    $endpoint = "routing/predictors"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET -QueryParameters $queryParams
}