Public/Get-GCContentManagementWorkspaces.ps1
|
<# .SYNOPSIS Retrieves a list of content management workspaces. .DESCRIPTION Returns a paginated list of content management workspaces from Genesys Cloud. Uses the GET /api/v2/contentmanagement/workspaces endpoint. .PARAMETER PageSize The number of results per page. Defaults to 25. .PARAMETER PageNumber The page number to retrieve. Defaults to 1. .PARAMETER SortBy The field to sort results by. .PARAMETER SortOrder The sort direction: ascending or descending. .EXAMPLE Get-GCContentManagementWorkspaces .NOTES Genesys Cloud API: GET /api/v2/contentmanagement/workspaces #> function Get-GCContentManagementWorkspaces { [CmdletBinding()] param( [Parameter()] [int]$PageSize = 25, [Parameter()] [int]$PageNumber = 1, [Parameter()] [string]$SortBy, [Parameter()] [string]$SortOrder ) $endpoint = "contentmanagement/workspaces" $queryParams = @{ pageSize = $PageSize pageNumber = $PageNumber } if ($SortBy) { $queryParams['sortBy'] = $SortBy } if ($SortOrder) { $queryParams['sortOrder'] = $SortOrder } return Invoke-GCApiRequest -Endpoint $endpoint -Method GET -QueryParameters $queryParams } |