Public/Get-GCUserRoutingSkills.ps1

<#
.SYNOPSIS
    Retrieves the routing skills assigned to a user in Genesys Cloud.

.DESCRIPTION
    Queries the Genesys Cloud API to retrieve a paginated list of routing skills
    assigned to a specific user, including proficiency ratings.
    API Endpoint: GET /api/v2/users/{userId}/routingskills

.PARAMETER UserId
    The unique identifier of the user.

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

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

.EXAMPLE
    Get-GCUserRoutingSkills -UserId '12345678-1234-1234-1234-123456789012'
    Retrieves the first page of routing skills for the specified user.

.EXAMPLE
    Get-GCUserRoutingSkills -UserId '12345678-1234-1234-1234-123456789012' -PageSize 100
    Retrieves routing skills with 100 results per page.

.NOTES
    Genesys Cloud API: GET /api/v2/users/{userId}/routingskills
#>

function Get-GCUserRoutingSkills {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$UserId,

        [Parameter(Mandatory = $false)]
        [int]$PageSize = 25,

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

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

    $endpoint = "users/$UserId/routingskills"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET -QueryParameters $queryParams
}