Public/Get-GCWfmManagementUnits.ps1
|
<# .SYNOPSIS Retrieves a list of workforce management management units from Genesys Cloud. .DESCRIPTION Queries the Genesys Cloud API to retrieve a paginated list of management units used in workforce management scheduling and configuration. API Endpoint: GET /api/v2/workforcemanagement/managementunits .PARAMETER PageSize The number of results per page. Default is 25. .PARAMETER PageNumber The page number to retrieve. Default is 1. .EXAMPLE Get-GCWfmManagementUnits Retrieves the first page of management units with default page size. .EXAMPLE Get-GCWfmManagementUnits -PageSize 50 -PageNumber 2 Retrieves the second page of management units with 50 results per page. .NOTES Genesys Cloud API: GET /api/v2/workforcemanagement/managementunits #> function Get-GCWfmManagementUnits { [CmdletBinding()] param( [Parameter(Mandatory = $false)] [int]$PageSize = 25, [Parameter(Mandatory = $false)] [int]$PageNumber = 1 ) $queryParams = @{ pageSize = $PageSize pageNumber = $PageNumber } $endpoint = "workforcemanagement/managementunits" return Invoke-GCApiRequest -Endpoint $endpoint -Method GET -QueryParameters $queryParams } |