Public/Get-GCOrphanRecordings.ps1

<#
.SYNOPSIS
    Retrieves a list of orphan recordings from Genesys Cloud.

.DESCRIPTION
    Queries the Genesys Cloud API to retrieve a paginated list of orphan recordings.
    Orphan recordings are recordings that are not associated with a conversation.
    API Endpoint: GET /api/v2/orphanrecordings

.PARAMETER PageSize
    The number of results per page. Default is 25.

.PARAMETER PageNumber
    The page number to retrieve. Default is 1.

.EXAMPLE
    Get-GCOrphanRecordings
    Retrieves the first page of orphan recordings with default page size.

.EXAMPLE
    Get-GCOrphanRecordings -PageSize 50 -PageNumber 2
    Retrieves the second page of orphan recordings with 50 results per page.

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

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

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

    $queryParams = @{
        pageSize   = $PageSize
        pageNumber = $PageNumber
    }

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