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. Web API alarm list for single node

Web API alarm list for single node

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 5.2k 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.
  • S
    S
    Sch.Donat
    wrote on last edited by
    #1

    Hi all!

    I tried out the web API interface (3.4.313 server and 3.4.318 web API version). Getting the full alarm list worked fine, but when I want to query a single node, the request is returned with status code 405 (method not allowed) and with body:

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

    The path used is <ip>/netxms-websvc/alarms/<nodeid>

    Am I using the wrong path?

    Regards

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      Hi!

      The way you tried is not yet implemented. What works is this way:

      /alarms?objectId=123

      /alarms?objectGuid=XXX

      If you need to see alarms for all nodes under a container:
      /alarms?objectId=123&includeChildObjects=true

      1 Reply Last reply
      0
      • S
        S
        Sch.Donat
        wrote on last edited by
        #3

        Hi!

        Thanks, this way it works.
        Is it possible to only query alarms from a given time period, or those that were generated in the last X seconds? Adding the filters from DCI querying doesn't seem to work.

        Best regards

        1 Reply Last reply
        0
        • F
          F
          Filipp Sudanov
          wrote on last edited by
          #4

          Yes, you can use createdBefore, createdAfter, updatedBefore, updatedAfter. Unix timestamp should be provided to these filters.

          Also, you can filter by alarm state, e.g.
          alarm=outstanding
          or
          alarm=outstanding,acknowledged

          And there's a good thing resolveReferences=true, in this case you'll have names of all related objects in the json output.

          There are also filters by user name, you can check in sources for these: src/client/nxapisrv/java/src/main/java/org/netxms/websvc/handlers/Alarms.java

          1 Reply Last reply
          0
          • S
            S
            Sch.Donat
            wrote on last edited by
            #5

            It works great, thank you!

            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