Page 1 of 1

difficulty changing settings with api

Posted: November 16th, 2012, 12:51 pm
by bobbintb
i am trying to change my sabnzbd.ini settings with the api but am having an issue. i read the wiki on how to do it and tried following this:

Code: Select all

General form for individual settings.

http://localhost:8080/sabnzbd/api?mode=set_config&section=SECTION&keyword=KEYWORD&value=VALUE

Examples:
http://localhost:8080/sabnzbd/api?mode=set_config&section=misc&keyword=dirscan_speed&value=5
http://localhost:8080/sabnzbd/api?mode=set_config&section=newzbin&keyword=username&value=hello
the issue is is that i am trying to change the server login details and the way the ini is structured, i cannot figure out the values since the servers section has sub sections. for example:

Code: Select all

[servers]
[[newszilla6.xs4all.nl - nousername]]
username = ""
name = newszilla6.xs4all.nl
connections = 3
ssl = 0
host = newszilla6.xs4all.nl
password = ""
port = 119
[[news.lightningusenet.com - blabla]]
username = blabla@lightningusenet.com
name = news.lightningusenet.com
connections = 5
ssl = 0
host = news.lightningusenet.com
password = blalba
port = 119
for the api i can set section=servers but i actually need the sub section [[news.lightningusenet.com - blabla]]
does that make sense? can i just use section=news.lightningusenet.com - blabla?

Re: difficulty changing settings with api

Posted: November 16th, 2012, 2:00 pm
by shypike
api?mode=set_config&section=servers&keyword=SERVERNAME&username=JOHN

Re: difficulty changing settings with api

Posted: November 16th, 2012, 2:05 pm
by bobbintb
AH! ok. i got a little confused looking at the examples. i think it was the keyword=username part that got me but i get it now. thanks a lot.

Re: difficulty changing settings with api

Posted: November 16th, 2012, 2:07 pm
by shypike
Yeah, the api docs suck.
One day we'll improve them...