<?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[REST API access custom software]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">We are developping an application for a client to fetch some datas on a custom dashboard. We use the REST API to get the data values but we are facing an error:</p>
<p dir="auto"><em>&lt;html&gt;&lt;\n&gt;&lt;head&gt;&lt;\n&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;&lt;\n&gt;&lt;title&gt;Error 406 Not Acceptable&lt;/title&gt;&lt;\n&gt;&lt;/head&gt;&lt;\n&gt;&lt;body&gt;&lt;h2&gt;HTTP ERROR 406&lt;/h2&gt;&lt;\n&gt;&lt;p&gt;Problem accessing /rest/v1/login/admin. Reason:&lt;\n&gt;&lt;pre&gt;    Not Acceptable&lt;/pre&gt;&lt;/p&gt;&lt;hr&gt;&lt;i&gt;&lt;small&gt;Powered by Jetty://&lt;/small&gt;&lt;/i&gt;&lt;hr/&gt;&lt;\n&gt;&lt;\n&gt;&lt;/body&gt;&lt;\n&gt;&lt;/html&gt;&lt;\n&gt;</em></p>
<p dir="auto">we tested to change the headers / application/json , ...</p>
<p dir="auto">We tried with the swagger and all OK / if we're not logged in we receive a 401 error..</p>
<p dir="auto">Is the header the problem or do we need to add the distant ip addresses? In which file?</p>
<p dir="auto">Thanks in advance for your answer</p>
<p dir="auto">Best regards</p>
]]></description><link>https://forum.mango-os.com/topic/1965/rest-api-access-custom-software</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Mar 2026 08:19:54 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1965.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Sep 2015 09:05:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to REST API access custom software on Fri, 30 Oct 2015 22:08:30 GMT]]></title><description><![CDATA[<p dir="auto">Jeremy,</p>
<p dir="auto">Thanks a bunch, once, i figured out the whole CORS thing, and got the server to start back up, it works perfect.  Just a warning for anyone else working on this, make sure don't leave anything in the override-web.xml file thats not xml. if you don't get the syntax right, your mango server won't start back up. It will start, then auto-terminate on a NullPointerException.</p>
]]></description><link>https://forum.mango-os.com/post/10527</link><guid isPermaLink="true">https://forum.mango-os.com/post/10527</guid><dc:creator><![CDATA[bigjaked]]></dc:creator><pubDate>Fri, 30 Oct 2015 22:08:30 GMT</pubDate></item><item><title><![CDATA[Reply to REST API access custom software on Fri, 30 Oct 2015 06:19:23 GMT]]></title><description><![CDATA[<p dir="auto">I have not used the REST API myself yet so this is a bit of a shot in the dark, but are you making the requests from a different server? If so then maybe you need to read this post by terrypacker here: <a href="http://infiniteautomation.com/forum/topic/1944/mango-rest-api-special-key" rel="nofollow ugc">http://infiniteautomation.com/forum/topic/1944/mango-rest-api-special-key</a></p>
]]></description><link>https://forum.mango-os.com/post/10518</link><guid isPermaLink="true">https://forum.mango-os.com/post/10518</guid><dc:creator><![CDATA[jeremyh]]></dc:creator><pubDate>Fri, 30 Oct 2015 06:19:23 GMT</pubDate></item><item><title><![CDATA[Reply to REST API access custom software on Fri, 30 Oct 2015 04:09:44 GMT]]></title><description><![CDATA[<p dir="auto">Hey,</p>
<p dir="auto">Same issue. (maybe others as well)</p>
<p dir="auto">Login issues: ( i'm using the python requests module btw)<br />
The response I'm getting for an invalid login is as follows: ( I replaced dates and stuff with '...' for brevity)<br />
response code 406 {'content-length': '0', 'errors': 'Invalid login', 'set-cookie': '...;Path=/', 'expires': '...', 'messages': '', 'server': 'Jetty(...)', 'date': '...'}</p>
<p dir="auto">Here's what I get for an accepted one: (Well, I think its accepted. )<br />
response code  406 {'date': '...', 'set-cookie': '...Path=/', 'content-length': '0', 'expires': '...', 'server': 'Jetty(...)'}</p>
<p dir="auto">This is what I get when I query a data point when it says 'Invalid login'<br />
response code 401 {'date': '...', 'content-length': '0', 'errors': 'User not logged in', 'messages': '', 'server': 'Jetty(...)'}</p>
<p dir="auto">And this for what I think is accepted:<br />
response code 406 {'date': '...', 'content-length': '0', 'server': 'Jetty(...)'}<br />
no data and still have the 406 (not acceptable error) code.</p>
<p dir="auto">The kicker is, if i login to my mango through the browser, then open up a new tab and paste the url my request library generates, the data pops up on the screen just fine.<br />
here's the link i used<br />
http://.../rest/v1/point-values/DP_363530?from=2015-10-29T00%3A00%3A00.000-10%3A00&amp;timePeriodType=MINUTES&amp;timePeriods=0&amp;useRendered=False&amp;rollup=&amp;to=2015-10-29T23%3A59%3A59.999-10%3A00&amp;unitConversion=False</p>
<p dir="auto">I'm not even sure if this is a login, configuration, or auth type problem. ( ive tried both basic auth and digest the results here are from basic)<br />
What makes it harder to diagnose is that I get the same errors with the swagger docs page. Even when logged in. But if i paste the url   the docs page generates and paste it into the browser , the data pops right up.</p>
<p dir="auto">Any ideas?</p>
]]></description><link>https://forum.mango-os.com/post/10516</link><guid isPermaLink="true">https://forum.mango-os.com/post/10516</guid><dc:creator><![CDATA[bigjaked]]></dc:creator><pubDate>Fri, 30 Oct 2015 04:09:44 GMT</pubDate></item></channel></rss>