<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Cannot figure out web service DCI]]></title><description><![CDATA[<p dir="auto">Hello all,</p>
<p dir="auto">We are trying to create a DCI that will read an Rest API json response for a value. We set up a web definition called "Test" with the api url, we added the authorization token and application/json headers. I set up the DCI according to the admin guide with "Test:/cellularBandwidth/values/total_usage" but the DCI returns &lt;ERROR&gt;. Here is an example of the json response:</p>
<pre><code>{"cellularRssi":{"unit":"dBm","values":[{"name":"AT\u0026T","data":[{"timestamp":1616719359000,"value":"-27.0"},{"timestamp":1616721157000,"value":"-55.0"},{"timestamp":1616722951000,"value":"-48.0"},{"timestamp":1616724761000,"value":"-36.0"},{"timestamp":1616726556000,"value":"-45.0"},{"timestamp":1616728358000,"value":"-63.0"},{"timestamp":1616730161000,"value":"-52.0"},{"timestamp":1616731961000,"value":"-68.0"},{"timestamp":1616733762000,"value":"-32.0"},{"timestamp":1616735576000,"value":"-39.0"}]}]},"cellularBandwidth":{"unit":"MB","values":[{"name":"AT\u0026T","total_usage":"42.88 MB","data":[{"timestamp":1616722200000,"value":8.62},{"timestamp":1616725800000,"value":9.51},{"timestamp":1616729400000,"value":8.98},{"timestamp":1616733000000,"value":10.82},{"timestamp":1616736600000,"value":4.94}]}]}}
</code></pre>
<p dir="auto">I think it's going to be something simple but I can't seem to find what we are doing wrong. Any help would be appreciated. Thank you!</p>
]]></description><link>https://forum.netxms.org/topic/7000/cannot-figure-out-web-service-dci</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:18:39 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7000.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Mar 2021 16:04:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cannot figure out web service DCI on Mon, 29 Mar 2021 22:16:42 GMT]]></title><description><![CDATA[<p dir="auto">Thank you Filipp, I changed the DCI to request /cellularBandwidth/unit and it immediately pulled the value down in that field so it is the array that is stopping it. I'll go with plan b and create a powershell script that uses nxpush to import the values into the DCIs.</p>
]]></description><link>https://forum.netxms.org/post/29766</link><guid isPermaLink="true">https://forum.netxms.org/post/29766</guid><dc:creator><![CDATA[jds]]></dc:creator><pubDate>Mon, 29 Mar 2021 22:16:42 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot figure out web service DCI on Mon, 29 Mar 2021 21:39:29 GMT]]></title><description><![CDATA[<p dir="auto">Chances are that you are missing EnableWebServiceProxy=yes in config file of the agent (web services are collected via the agent that runs on the machine where the server runs, or via proxies if zoning is used).<br />
Also make sure that "Use text parsing..." checkbox is not set.</p>
<p dir="auto">You can use nxwsget utility to test, e.g.<br />
nxwsget 127.0.0.1 <a href="http://api.open-notify.org/astros.json" rel="nofollow ugc">http://api.open-notify.org/astros.json</a> number</p>
<p dir="auto">Ah, and there's probably the reason - json parser currently does not support arrays (the company that ordered web service functionality did not need this so it was not implemented).<br />
This means that you can request e.g. /cellulareRssi/unit and it should return dBm, but parts in [] are not available for parsing.</p>
]]></description><link>https://forum.netxms.org/post/29765</link><guid isPermaLink="true">https://forum.netxms.org/post/29765</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 29 Mar 2021 21:39:29 GMT</pubDate></item></channel></rss>