2013-09-13 05:54 AM
Hi, is it possible to execute NwConsole commands over REST API
I am reading REST API guide right now. Couldn't locate any such documents. Just wondering is it available or not.
Regards
DJ
2013-09-14 08:12 PM
I guess that's probably the only one that wouldn't be there but I could be wrong!
But even if it was you would need to login as all REST functionality is only available after login.
Why would it executing it locally would be an issue? You could then use REST to upload it to your decoders. NwConsole can be executed in a non-interactive mode, you could simply use:
NwConsole -c feed create feed-definition.xml
That would not require login and could be used programmatically in most cases.
Regards,
Rui
2013-09-14 07:51 PM
Hi DJ,
I'm not sure I fully understand your question but here are two attempts at answering that I think might help.
Option #1) NwConsole currently does not use the REST API, it uses the native SDK but both are equally available on all devices (i.e. port 5000x for the SDK instead of port 5010x for the REST API).
Option #2) All the functionality provided by NwConsole is also available over the REST API so whatever can be achieved by using NwConsole should be achievable via the REST API.
Hope that helps!
Regards,
Rui
2013-09-14 07:58 PM
Can we do
feed ctreate feed-definitions.xml
Over REST API ?
I want a way to create these feed files without logging in to nw. But want to do it programmatically over REST.
Sent from my iPhone
2013-09-14 08:12 PM
I guess that's probably the only one that wouldn't be there but I could be wrong!
But even if it was you would need to login as all REST functionality is only available after login.
Why would it executing it locally would be an issue? You could then use REST to upload it to your decoders. NwConsole can be executed in a non-interactive mode, you could simply use:
NwConsole -c feed create feed-definition.xml
That would not require login and could be used programmatically in most cases.
Regards,
Rui
2013-09-14 10:51 PM
Yes looks like there is no way to execute console queries over REST. Want to do it in non-interactive way and then fetch the file to REST client. And upload it over REST for all decoders and reload parsers. I guess that is the only way to achieve this
But in future I would love to see console command also Over REST
Sent from my iPhone
2013-09-15 10:43 AM
Hi,
I'm trying to understand why calling/executing the nwconsole command externally would be an issue for your REST client?
I understand the request and agree would be a nice to have but I was focused on solving your issue.
The nwconsole command exists for Windows, Mac and Linux OSes, requires no license and can be installed separately.
Thank you,
Rui
2013-09-15 11:37 PM
Executing a command externally wants me to use some SSH client in my REST client. Which is not advised. So everything needs to be over REST. We are consuming data over REST.
So i was interested in knowing whether NwConsole commands can be executed over REST.
Can NwConsole be installed as an app for Linux OS? Do we have any online guide for it?
What i am trying to do is, If NwConsole is available where my REST client resides, i can compile the feed locally and then upload the new feed file through REST.
Regards
DJ
2013-09-16 09:57 AM
HI DJ,
I agree on the use of SSH being too much for a script (it would require auth which is never great).
Yes, there should be an nwconsole*.rpm with the latest 9.8.5.x patch available, the only downside is that it will be inside the *.npf file but if you rename it to .zip or simply unzip the .npf you should be able to extract the nwconsole*.rpm.
Hope that helps!
Regards,
Rui
2013-09-16 11:07 AM
Rui, will try to extract the rpm and install it. Will post if there are any issues.
Sent from my iPhone
2013-09-17 02:51 AM
To generate custom feed we don't need to compile, create feed file and then upload it to NW.
So no need to install NwConsole. We can achieve this from REST interface directly by sending a zip file containing csv file and feed-definition file.
Create your csv file and definition file then create a zip file. Upload it to NW using URL
http://IP:PORT/decoder/parsers/upload?name=zipfilename&dateInstalled=timeinmillis
I made customfeed.csv and customfeed.xml (csv and definition file) and created a customfeed.zip file and put the zip file in post message body and executed above URL. It creates new customfeed.feed file in decoder
Then reload the parser it will starts capturing the data for new Meta.
Regards
DJ