1 Reply Latest reply on Jun 27, 2017 7:07 PM by Hayton

    ESM API 10.0.0:  qryGetResults()

    askush

      When executing the following, as specified in the rsm help page:

       

      https://<ip_address>/rs/esm/qryGetResults?startPos=0&numRows=0&reverse=false

      Example JSON Content:

      {"resultID": {"value": 1234567890}}

       

      I get the following returned:

      Status Code 500: Error processing request, see server logs for more details (For input string: "{"value":")

       

      I took a look at the catalina logs and it seems to be an internal error:

      27-Jun-2017 14:40:45.723 INFO [ajp-nio-127.0.0.1-8009-exec-4] com.mcafee.siem.api.rs.MCXFServlet.invoke Call to: /esm/qryGetResults

      27-Jun-2017 14:40:46.728 SEVERE [ajp-nio-127.0.0.1-8009-exec-4] com.mcafee.siem.api.rs.MEssApiImpl.handleException Internal exception occurred

      java.lang.NumberFormatException: For input string: "{"value":"

          at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

          at java.lang.Integer.parseInt(Integer.java:580)

          at java.math.BigInteger.<init>(BigInteger.java:470)

          at java.math.BigInteger.<init>(BigInteger.java:606)

          at com.mcafee.siem.api.data.query.EsmQueryResultID.<init>(EsmQueryResultID.java:24 )

          at sun.reflect.GeneratedConstructorAccessor248.newInstance(Unknown Source)

          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:45)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

          at com.mcafee.siem.api.rs.MEssApiImpl.newScalar(MEssApiImpl.java:1051)

          at com.mcafee.siem.api.rs.MEssApiImpl.processJSON(MEssApiImpl.java:932)

          at com.mcafee.siem.api.rs.MEssApiImpl.processRequest(MEssApiImpl.java:857)

          at com.mcafee.siem.api.rs.MEssApiImpl.executePost(MEssApiImpl.java:1294)

      .............................................................

       

      Any idea why this is and if there is a solution?

      Also is there a central store of examples that work for the current api version, because the ones in the rs/esm/help seem pretty inconsistent.

       

      Thanks,

      Adnan