There two methods to consume the web API based on Power Shell version.

Power Shell 3.0  and latest:
For this version the method name “Invoke RestMethod” is used to consume the Web API
$apiKey = “SomeKey”
$Response= Invoke-RestMethod -Method Get -Uri $resource -Header @{ “X-ApiKey” = $apiKey }
you can print all the data:
Write-Ouput $Reponse
To change the method type:
use -Method Post
Power Shell 2.0 and earlier version:
$request = [System.Net.WebRequest]::Create(“$url”)
$request.ContentType=’application/json; charset=utf-8′