In this video, I demonstrate how to use Postman, a free API development and testing tool, to format URL’s and make requests against web endpoints and use those URL’s to get data in PowerShell. I also give a quick walk through of viewing the data in PowerShell.
Referenced Links:
Postman:
https://www.postman.com/
Open Weather:
https://openweathermap.org/api
Oxford Dictionary (Prototype option is limited free)
https://developer.oxforddictionaries.com/?tag=#plans
1 thought on “How to use Postman and PowerShell to Query API Data”
Hi Travis,
I am trying to work with invoke-restmethod for the first time. I have a URL from our HR provider. I know this URL works as I get an output in Postman using the key in the header. However when I use invoke-restmethod in PowerShell I get no out put.
PS C:\WINDOWS\system32> $params
Name Value
—- —–
ContentType application/json
Method GET
Headers {X-SFAPI-AppName, X-SFAPI-RSAKey, X-SFAPI-Account}
Uri https://sfcola1.dataon.com/sfapi/index.cfm?endpoint=/philippinedemo_FULL_SDP_Emp_Info
PS C:\WINDOWS\system32> (Invoke-RestMethod @params).length
0
Can you please help me out what could be wrong or what is causing the no output in the Invoke-RestMethod command?
Thanks
Ivan