Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

What am I doing wrong querying the SolarWinds API?

$
0
0

I'm trying to hit the Solarwinds API with Powershell and getting "An unexpected error occurred on a receive."

 

This is how I'm trying to do it. I am able to connect with the PowerShell SWIS module, but not with a web request to the URL. I thought it might have something to do with port 17778 only working with HTTPS, but whatever the Powershell module is using also works. Is there an HTTP port for the API? Thanks!

 

$mycreds = Get-Credential

$solar_winds_host = example.contoso.com

 

Invoke-RestMethod -Credential $mycreds -Method 'Get' -uri "http://${solar_winds_host}:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+IPAddress+FROM+Orion.Nodes+WHERE+NodeID=2"


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>