reporting/Get-ReportType.ps1
function Get-ReportType { Param( [Parameter(Mandatory=$true)] [String] $ReportType, [Parameter(Mandatory=$true)] [String] $Version, [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc', [Parameter(Mandatory=$false)] [string] $Section = 'default', [Parameter(Mandatory=$false)] [string] $AccountSwitchKey ) $Path = "/reporting-api/v1/reports/$ReportType/versions/$Version`?accountSwitchKey=$AccountSwitchKey" try { $Result = Invoke-AkamaiRestMethod -Method GET -Path $Path -EdgeRCFile $EdgeRCFile -Section $Section return $Result } catch { throw $_.Exception } } |