Show data stored on the web

Hi,

I would like to retrieve xml data on iDigi platform in a web page.
Is it possible ? If yes, how can I do this.

Thank you very much.

Hi,

Are you looking to get the XML data pushed up by a device, which shows up in the Storage tab of iDigi?

If so, take a look at this page on the wiki: http://www.digi.com/wiki/developer/index.php/IDigi_Data

Making a call to the /ws/data web service using a standard HTTP Client will allow you to retrieve this data.

Thanks,
Chris

What are you trying to do with the data? I also have some various code (python, .NET) which will do the same thing.

It really depends on the end result that you’re looking to achieve (ASP page with results? Saving locally? etc.), as to what examples we may be able to readily offer!

Just let us know,
Nathan

I also uploaded this code sample which enables CRON on a Linux server to download the XML data to a local server, from where you can process it via any XML parsing method desired:

http://www.digi.com/wiki/developer/index.php/Archiving_Data_Files_from_iDigi

Hi cpopp,

You say “Making a call to the /ws/data web service using a standard HTTP Client will allow you to retrieve this data.”

Could you give a little more precision. Could you give an example, how to integrate this code in a html page?

Thank you very much.

Grigou

Can you post your .NET code for this?

Hi everybody,

Thank you for your responses. I will check the link of cpopp which will certainly give an answer to my question.

Indeed, my goal is to read data in xml and stores it in a database on a webserver. Then I read the database to show results on ASP pages. So I’m interesting by your code nathanf. If you can help me! Thanks.

Grigou

For examples, if you login to developer.idigi.com and navigate to the “Web Services Console” there are a number of them for some of the different web services.

From here you can take an example and modify it to work for you and once you have it as you like it select “Export” and pick a language you would like to have the snippet for to execute the current web service request. Currently only options are Python, Java, Ruby, and Perl so it may not be as helpful if working with .NET languages (perhaps these will be supported soon?).

You will not be able to directly call a web service with javascript from within an html page without special permissions (XMLHTTPRequest has cross domain restrictions, called the same origin security policy). I would suggest having your hosting server act as a web proxy that you can call from within your domain. There are a number of workarounds for this from avoiding the use of XHR (script tags or IFrames instead) to using flash of Java, so if you choose to go this route I would suggest reading up on the topic a little in Google.

Hello, regarding the .NET sampels, I’m afraid that I cannot post the code for this, but if you’re interested, let me know in this thread and I can send you a direct reply with any .NET examples which may help.

I also would like to stress using the iDigi tool that clohfink has pointed out. This has served as an invaluable tool for me when creating any SCI/RCI type client, to help make sure I have the correctly formatted SCI/RCI message.

To use this tool, log into your iDigi account and go to the web services console. Press the “SCI Target” button and add the devices you wish to send the command to from the drop-down list and select “Add” and the “OK” to go back to the main iDigi screen.

When you’re back at the services console screen, you can then click on the “Examples” button and select any of the preconfigured examples on screen. iDigi will then show you the properly formatted message on the left hand side, where you can see what the message looks like and then click “Send” to have the message sent and review the reply.

Let us know if you have any other questions on how to use, etc.
-NathanF.

Hello Nathanf,

I’m very interesting in the samples. Could you send me in direct reply?

In other hand, i will also check iDigi tool.

Thank you very much.

Grigou

Good day
I’m using the lynnl’s python script to download the xml files from the idigi server. Modified Script is doing the job, however, every time that is requesting the file list on the server, this one it is providing the list with the same date of the old ones files that were downloaded already. I´m note that when I use the ESP aplication or the web GUI interface directly I see that the server is showing new dates as expected, but when I use the python script this is not happening. Note that my CPX4 is using the DB presentation with a 20 files cycle; I’m attaching the python file + the address that my pyfile is using : https://developer.idigi.com/ws/data/~/00000000-00000000-00409DFF-FF492A11/test/… User: feagle20 password: susy1801
Dont worry you can use that info + user/pass as you want, it is not sensible or confidential information. I will change it in a few days