Get multiple page API result in powershell

Posts: 16
406     0

Hi All

I was using the API before without any paging


Now i have added the paging like below


$url = ""

and i am getting next_page_id,  and getting the rest of the records.

I am doing these using postman now manually


But I need help how to do this using powershell


This is the code i am using currently


$url = ""
$lapw = Get-Content "C:\pw.txt" | ConvertTo-SecureString -Key (Get-Content C:\aes.key)
$creds = New-Object System.Management.Automation.PsCredential("ACCOUNT",$lapw)
$Result = Invoke-RestMethod -Uri $url -Method Get -Credential $creds -Headers $headers -ContentType 'application/json'
Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin