Public/Get-GCRoutingSkillGroups.ps1

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

.DESCRIPTION
    Queries the Genesys Cloud API to retrieve a paginated list of routing skill groups.
    API Endpoint: GET /api/v2/routing/skillgroups

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

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

.EXAMPLE
    Get-GCRoutingSkillGroups
    Retrieves the first page of routing skill groups.

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

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

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

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

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