Public/Get-GCUserDirectReports.ps1
|
<# .SYNOPSIS Retrieves the direct reports of a user in Genesys Cloud. .DESCRIPTION Queries the Genesys Cloud API to retrieve the list of direct reports for a specific user in the organizational hierarchy. API Endpoint: GET /api/v2/users/{userId}/directreports .PARAMETER UserId The unique identifier of the user. .EXAMPLE Get-GCUserDirectReports -UserId '12345678-1234-1234-1234-123456789012' Retrieves the direct reports for the specified user. .NOTES Genesys Cloud API: GET /api/v2/users/{userId}/directreports #> function Get-GCUserDirectReports { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$UserId ) $endpoint = "users/$UserId/directreports" return Invoke-GCApiRequest -Endpoint $endpoint -Method GET } |