Howdy All,
First time posting a question on Thwack. Hope this is the right location for this question.
The following curl command used to work and return information:
curl -v -k -u 'id:pw' oriinfwwwpv01.corp.pvt:17778/.../Query
It returned:
{"results":[{"NodeName":"CHTNWVMK-AS0001","IPAddress":"106.101.9.4"}]}
We have upgraded Orion software a few times recently.
Not sure if this is why, but now the command fails as follows:
...
< HTTP/1.1 405 Method Not Allowed
< Allow: POST
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
< Date: Mon, 11 Sep 2023 12:04:24 GMT
<
* Connection #0 to host oriinfwwwpv01.corp.pvt left intact
So, after upgrades it now wants a POST instead of a GET.
I updated the command to do a POST:
curl -v -k -u 'id:pw' -X POST https://oriinfwwwpv01.corp.pvt:17778/SolarWinds/InformationService/v3/Json/Query?query="SELECT+NodeName+%2C+IPAddress+FROM+Orion.Nodes+WHERE+IPAddress='106.101.9.4'"
It returned:
...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""">www.w3.org/.../strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>
So I added "-H 'Transfer-Encoding: chunked'" and now it says not found:
curl -v -k -u 'id:pw' -H 'Transfer-Encoding: chunked' -X POST oriinfwwwpv01.corp.pvt:17778/.../Query
...
< HTTP/1.1 404 Not Found
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
< Date: Mon, 11 Sep 2023 12:28:32 GMT
<
* Connection #0 to host oriinfwwwpv01.corp.pvt left intact
Why am I getting a 404 on something I know exists?
Any help is greatly appreciated.