Public/Get-DattoBcdrClient.ps1

function Get-DattoBcdrClient {
<#
.SYNOPSIS
Returns BCDR clients and their agents.
.DESCRIPTION
Implements GET /v1/bcdr/agent. Results are filtered by any organization restriction applied to the API key.
.PARAMETER Page
The one-based API page number.
.PARAMETER PerPage
The number of records requested per page.
.PARAMETER All
Retrieves every available page.
.PARAMETER RawResponse
Returns the response envelope, including pagination and clients.
.PARAMETER Connection
A connection object, name, or ID.
.EXAMPLE
Get-DattoBcdrClient -All
.EXAMPLE
Get-DattoBcdrClient -Page 1 -PerPage 100 -RawResponse
#>

    [CmdletBinding()]
    param(
        [Parameter()][ValidateRange(1, [int]::MaxValue)][int]$Page = 1,
        [Parameter()][ValidateRange(1, [int]::MaxValue)][int]$PerPage = 25,
        [Parameter()][switch]$All,
        [Parameter()][switch]$RawResponse,
        [Parameter()][AllowNull()][object]$Connection
    )
    Invoke-DattoApiRequest -Path '/v1/bcdr/agent' -Query @{ _page = $Page; _perPage = $PerPage } -All:$All -ResultProperty 'clients' -RawResponse:$RawResponse -Connection $Connection
}