Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. WebAPI Struggles

WebAPI Struggles

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 21.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y
    Y
    Yavor
    wrote on last edited by
    #1

    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:

    C:\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:

    {"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


    Capture 1.PNG

    Capture 2.PNG

    Capture 3.PNG

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi,

      you should turn on both "Basic Auth" and "With Credentials".

      Best regards,
      Victor

      1 Reply Last reply
      0
      • Y
        Y
        Yavor
        wrote on last edited by
        #3

        Silly me! Thanks a lot, Victor.

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups