difficulty changing settings with api

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
bobbintb
Newbie
Newbie
Posts: 16
Joined: August 24th, 2012, 11:09 am

difficulty changing settings with api

Post 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 = [email protected]
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?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: difficulty changing settings with api

Post by shypike »

api?mode=set_config&section=servers&keyword=SERVERNAME&username=JOHN
bobbintb
Newbie
Newbie
Posts: 16
Joined: August 24th, 2012, 11:09 am

Re: difficulty changing settings with api

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: difficulty changing settings with api

Post by shypike »

Yeah, the api docs suck.
One day we'll improve them...
Post Reply