Change 'Config->Servers' details via api?
Posted: March 5th, 2010, 9:42 am
Hi
I have a requirement to auto update my usenet servers info (the info in 'Config->Servers' tab).
Specifically, i want to change the username & password for a server.
So i made an app which runs on my sabnzbd box to do the following:
* search for sabnzbd process.
* close sabnzbd process.
* Modify sabnzbd config file, to new server info.
* start new sabnzbd process.
This works fine, but is not the greatest of solutions.
I was wondering if there is a way to do this via api?
I dont see it mentioned here anywhere: http://sabnzbd.wikidot.com/api
Would this be a reasonable feature request?
If such a feature was implimented would it pose a security risk (eg, anything/anyone that i give my api key to could potentially change my server info, to connect to their own server of malicious design?).
No biggie, as for my purposes i can keep doing it the ugly way i am, but thought i'd throw the request out there in hopes that it is one day implemented.
edit - well i just noticed that instead of closing sabnzb process i should be using something like http://host:port/sabnzbd/shutdown
That should ensure a correct shutdown.
edit2 - Resolution: "mode=set_config§ion=servers&name=SERVERNAME&username=SERVERUSERNAME&password=SERVERPASSWORD"
Cheers.
I have a requirement to auto update my usenet servers info (the info in 'Config->Servers' tab).
Specifically, i want to change the username & password for a server.
So i made an app which runs on my sabnzbd box to do the following:
* search for sabnzbd process.
* close sabnzbd process.
* Modify sabnzbd config file, to new server info.
* start new sabnzbd process.
This works fine, but is not the greatest of solutions.
I was wondering if there is a way to do this via api?
I dont see it mentioned here anywhere: http://sabnzbd.wikidot.com/api
Would this be a reasonable feature request?
If such a feature was implimented would it pose a security risk (eg, anything/anyone that i give my api key to could potentially change my server info, to connect to their own server of malicious design?).
No biggie, as for my purposes i can keep doing it the ugly way i am, but thought i'd throw the request out there in hopes that it is one day implemented.
edit - well i just noticed that instead of closing sabnzb process i should be using something like http://host:port/sabnzbd/shutdown
That should ensure a correct shutdown.
edit2 - Resolution: "mode=set_config§ion=servers&name=SERVERNAME&username=SERVERUSERNAME&password=SERVERPASSWORD"
Cheers.