Web Service Definiton
-
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
-
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 -
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.
-
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.comSo 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.
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