I've searched high and low and asked on the product forums, but cannot seem to figure this out.
Using PowerShell 5 I'm attempting to limit my results by using a range header in the way the API documentation indicates. However, I receive the following error when I try to use it.
"The 'RANGE' header must be modified using the appropriate property or method. Parameter name: name"
I've tried:
$headers = @{
SEC= $apiKey
range="items=0-49"
}
$result = Invoke-RestMethod -Method get -Uri $global:URI -ContentType 'application/json' -Header $headers
and...
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add('Accept','Application/Json')
$headers.Add('RANGE','items=0-49')
$headers.Add('SEC',$ApiKey)
$result = Invoke-WebRequest -Uri $global:URI -Headers $headers -Method get
Also, here's the curl example given within the API documentation:
curl -s -X GET -u USERNAME -H 'Range: items=0-49' -H 'Version: 10.0' -H 'Accept: application/json' 'https://product.com/api/s/of'
Really appreciate any pointers on this.
Thanks in advance