Welcome, Guest. Please login or register.

Author Topic: Nedi and Web services / Get Nedi version  (Read 6690 times)

vongillus

  • Guest
Nedi and Web services / Get Nedi version
« on: January 06, 2012, 09:26:27 AM »
Hi!

Are there any plans to implement some web services in Nedi so that other applications can get information from Nedi?  :)

Is there a way to know on which Nedi version I connect through a script (Like 1.0.6)? I couldn't find it. If not, it would be very nice to have for example this information somewhere in the Nedi login page for the next version. Like this I would be able to know on which version of Nedi I run my scripts.

Thanks!

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2777
    • View Profile
    • NeDi
Re: Nedi and Web services / Get Nedi version
« Reply #1 on: January 06, 2012, 07:53:36 PM »
What kind of interaction are you looking for? For now most other apps access the DB directly. To make this easier I've added the debug mode in the GUI, which shows the queries amongst other information (used to be a cog, now it's the lock).

But this doesn't mean no-go :) I've been asked before and put in some thoughts since. I can see use cases, where you could even tell it to disable the port where the computer "evilhacker" is connected, but only if nonthing else resides on that port and it's not a link or trunk etc.

Guess a first step towards this goal is another idea (and contribution by Gumba) to export lists as excel files. Now withkeeping multiple output formats in mind, I could take care of XLS and CLI output at the same time. Adding a new header mechanism should take care of the input...and voilą

As to the version, it's only in nedi.pl, but accessible in System-NeDi. During the pre-final stage the tarball's # represents the day of year, when I made it...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

vongillus

  • Guest
Re: Nedi and Web services / Get Nedi version
« Reply #2 on: January 09, 2012, 12:26:36 PM »
Thanks for your reply, I was not really clear about my goals! My situation is the following:

The central network department of my company is running Nedi for the whole site.
In my department, we have access to Nedi (limited access), through the web interface. My department is behind an intern firewall.

What I am doing today, is running a script which imports from Nedi web interface informations which I need into another application (not to mention it, GLPI...). The problem I have is that my script is validated with the running version of Nedi and if I want to test Nedi version, I have no mean today with the web interface.

In the future, we would like to write something more generic and cleaner, that is to say a plugin for GLPI. Why not using direct access to Nedi's Mysql database? Because for this I would need to request a direct access to Mysql database, and also network people would have to limit what I can see in Mysql database, then we would have to open ports in the firewall. That's why I would prefer not to do like this. By the way, is the Nedi's version stored in the database? :)

So if I stick with the solution of browsing the Nedi's web interface with the script, I would need to know which Nedi's version is running. That's why it would be nice to see somewhere the Nedi's version for example at the login page, or through a META tag, may be, I don't know. Like this, if the Nedi's version changes, I can display a nice message!

Then, if Nedi is capable of exporting information through web services (or another easy way), the coding and maintenance of my plugin will be much easier! :) The other advantage I see in the web services is that you don't need access to the Mysql database also... Quite some work though certainly to write these web services!

vongillus

  • Guest
Re: Nedi and Web services / Get Nedi version
« Reply #3 on: January 17, 2012, 04:33:16 PM »
I just insist one more time (short version  ;) ) but it would be very nice and certainly very easy to add a meta tag on the login page with the version of Nedi! :)

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2777
    • View Profile
    • NeDi
Re: Nedi and Web services / Get Nedi version
« Reply #4 on: January 18, 2012, 08:34:47 PM »
You mean something like this

<!--Version 1.0.7-->

or


<meta name="generator" content="NeDi 1.0.7">
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

vongillus

  • Guest
Re: Nedi and Web services / Get Nedi version
« Reply #5 on: January 19, 2012, 02:28:21 PM »
Exactly, and the meta tag as you show here would be easier to handle. That would be perfect! :)

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2777
    • View Profile
    • NeDi
Re: Nedi and Web services / Get Nedi version
« Reply #6 on: January 20, 2012, 07:48:10 PM »
Ok, it's in index and the header. You get the task to remind me, if I fail to update it!
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

vongillus

  • Guest
Re: Nedi and Web services / Get Nedi version
« Reply #7 on: January 23, 2012, 09:14:16 AM »
Ok, I promiss I will assle you!  ;)

Thanks

swiss-it

  • Guest
Re: Nedi and Web services / Get Nedi version
« Reply #8 on: March 14, 2012, 09:06:45 PM »
I have the same request, I would like to pump out info from nedi. I'm now using mysql, but a web service would be extremely nice. Now the best solution is of course to use JSON as export format, behind a microframework like http://perldancer.org/

I might give it a go if I find the time during my project, and submit it as contrib, but no promise.