3 Replies Latest reply on Aug 18, 2015 3:50 PM by tdanner

    curl, invoke with parameter


      I'm trying to do preliminary research on leveraging the Json endpoint before I begin coding an integration in java.  I can send GET requests successfully to the endpoint, but I'm having trouble using the post method.


      When invoking the DiscoverInterfacesOnNode verb using the following curl request


      curl -k --tlsv1.0 -v -u user:xxxxxx -H "Content-Type: application/json" -X POST "https://lfkntxxnds/InformationService/v3/Json/Invoke/Orion.NPM.Interfaces.DiscoverInterfacesOnNode" -d "["1100"]"


      I get this error. (in bold below):

      Incidentally, this is an example I saw in thwact.  I would expect to post a name:value, but I've tried numerous iterations with no success.


      *   Trying

      * Connected to lfkntxxa-opm ( port 17778 (#0)

      * TLS 1.0 connection using TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA

      * Server certificate: SolarWinds-Orion

      * Server auth using Basic with user 'swapiuser'

      > POST /SolarWinds/InformationService/v3/Json/Invoke/Orion.NPM.Interfaces.DiscoverInterfacesOnNode HTTP/1.1

      > Host: lfkntxxa-opm:17778

      > Authorization: Basic c3dhcGl1c2VyOnN3NHAxdXMzcg==

      > User-Agent: curl/7.43.0

      > Accept: */*

      > Content-Type: application/json

      > Content-Length: 6


      * upload completely sent off: 6 out of 6 bytes

      < HTTP/1.1 500 Internal Server Error

      < Content-Length: 78

      < Content-Type: application/json

      < Server: Microsoft-HTTPAPI/2.0

      < Date: Mon, 03 Aug 2015 15:18:51 GMT


      * Connection #0 to host lfkntxxa-opm left intact

      "Expecting state 'Element'.. Encountered 'Text'  with name '', namespace ''.