Public/Get-GCScriptPage.ps1

<#
.SYNOPSIS
    Retrieves a single page from a script.

.DESCRIPTION
    Returns the details of a specific page within a script from Genesys Cloud.
    Uses the GET /api/v2/scripts/{scriptId}/pages/{pageId} endpoint.

.PARAMETER ScriptId
    The unique identifier of the script.

.PARAMETER PageId
    The unique identifier of the page within the script.

.EXAMPLE
    Get-GCScriptPage -ScriptId 'script-id' -PageId 'page-id'

.NOTES
    Genesys Cloud API: GET /api/v2/scripts/{scriptId}/pages/{pageId}
#>

function Get-GCScriptPage {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$ScriptId,

        [Parameter(Mandatory = $true)]
        [string]$PageId
    )

    $endpoint = "scripts/$ScriptId/pages/$PageId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET
}