Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Yavor

#1
General Support / Re: WebAPI Struggles
June 11, 2018, 11:27:31 AM
Silly me! Thanks a lot, Victor.
#2
General Support / WebAPI Struggles
June 08, 2018, 12:26:07 PM
Hi guys,

I'm trying to set up the WebAPI so I can use Grafana with NetXMS but I'm running into some issues. I have the netxms-websvc-2.2.6.war file (renamed to webapi.war) - tried both downloading it and building it myself with Maven, didn't make a difference. I've placed the file in the C:\NetXMS\WebUI\WebUI\webapi directory together with a jetty-web.xml file with the following content:

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="contextPath">/webapi</Set>
  <Set name="war"><SystemProperty name="jetty.home"/>\webapi\webapi.war</Set>
  <Set name="tempDirectory">webapi</Set>
</Configure>


I've added the following line to the Params value under HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\nxWebUI\Parameters\Start:

QuoteC:\NetXMS\WebUI\WebUI\webapi\jetty-web.xml

So far, so good, the problem is that when I open http://localhost:8080/webapi/ in the browser I get this:

Quote{"description":"Internal error","error":46}

When I enter http://172.16.1.70:8080/webapi/ in the Grafana new datasource settings and click on "Save & Test", I get a "HTTP Error Bad Request" error.

Any ideas how to get this working?

Thanks