Public/Get-GCConversationsCalls.ps1

<#
.SYNOPSIS
    Retrieves active call conversations.

.DESCRIPTION
    Gets a paginated list of active call conversations from Genesys Cloud.
    Calls GET /api/v2/conversations/calls.

.PARAMETER PageSize
    The number of results per page. Defaults to 25.

.PARAMETER PageNumber
    The page number to retrieve. Defaults to 1.

.EXAMPLE
    Get-GCConversationsCalls

.EXAMPLE
    Get-GCConversationsCalls -PageSize 50 -PageNumber 2

.NOTES
    Genesys Cloud API: GET /api/v2/conversations/calls
#>

function Get-GCConversationsCalls {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $false)]
        [int]$PageSize = 25,

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

    $endpoint = "conversations/calls"
    $queryParams = @{
        pageSize   = $PageSize
        pageNumber = $PageNumber
    }

    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET -QueryParameters $queryParams
}