Public/Get-GCUserSuperiors.ps1

<#
.SYNOPSIS
    Retrieves the superiors (managers) of a user in Genesys Cloud.

.DESCRIPTION
    Queries the Genesys Cloud API to retrieve the list of superiors (managers) for a
    specific user in the organizational hierarchy.
    API Endpoint: GET /api/v2/users/{userId}/superiors

.PARAMETER UserId
    The unique identifier of the user.

.EXAMPLE
    Get-GCUserSuperiors -UserId '12345678-1234-1234-1234-123456789012'
    Retrieves the superiors for the specified user.

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

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

    $endpoint = "users/$UserId/superiors"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET
}