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 Service Definiton

Web Service Definiton

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 19.7k 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.
  • E
    E
    Egert143
    wrote on last edited by
    #1

    Hello

    Is it possible to extract data with web service from this sample data (its returned in webpage):

    {"py/object": "detector.api.Snapshot", "time": 1607485618.4846845, "version": "v1.2.3", "detections": [], "antenna_gps": {"py/tuple": [01.12343455, 02.45542]}, "antenna_gps_locked": true, "antenna_temp": -6.816406250000001, "antenna_yaw": 354.90458852191114, "jamming": false, "is_battery_powered": false, "battery_percent": 0, "suspended": false}
    

    if yes, is it enought to fill in only name and url? Also in dci settings what is the correct parameter for example to get version info ?

    Egert

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

      In current version of NetXMS JSON parser is failing on the leading zeroes of 01.12343455, 02.45542

      besides from that the parsert should be able to extract the part you need, e.g. for time the path in document should be just "time".
      So DCI parameter would be looking Name_of_your_web_service_definition:time

      1 Reply Last reply
      0
      • E
        E
        Egert143
        wrote on last edited by
        #3

        Created Web Service Definition with name and url, also checked "verify the peer's SSl certificate" + "verify the certificate's name against host". Then created DCI with parameter "name:version", origin: web service, type: string and result is unsupported. What should i change ?

        Edit: Seems like sometimes the poll is succesful and othertimes it fails.

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

          As per your example above, JSON parser is failing on this part:
          "antenna_gps": {"py/tuple": [01.12343455, 02.45542]}

          You can check the syntax e.g. with this tool
          https://jsonformatter.curiousconcept.com

          So I suppose that the data returned by this web service might change time after time and sometimes the data confirms with what the JSON parser expects.

          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