I wrote a small script to fetch the new login data to the server and stated in the documentation to the API i can insert/get/change the data i provided. But when i try the keyword param nothing gets returned. Is there someone who can help me with the API to change/set the new server data?
Greetings
API to change server settings?
Forum rules
Help us help you:
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.
Re: API to change server settings?
See https://sabnzbd.org/wiki/advanced/api starting from "Get config item(s)" at the bottom.
Example:
Example:
Code: Select all
$ curl 'http://127.0.0.1:8080/api?mode=get_config§ion=servers&keyword=newszilla.xs4all.nl'
{u'servers': [{'username': u'nobody', 'priority': 0, 'enable': 0, 'displayname': u'newszilla.xs4all.nl', 'name': u'newszilla.xs4all.nl', 'notes': u'', 'connections': 4, 'ssl': 0, 'host': u'newszilla.xs4all.nl', 'timeout': 120, 'ssl_verify': 2, 'send_group': 0, 'password': '*******', 'optional': 0, 'port': 119, 'retention': 0}]}
Re: API to change server settings?
Code: Select all
&keyword=newszillaDOTxs4allDOTnl
Thank you very much
Re: API to change server settings?
It requires a section to be given. The keyword is not required, but helps to limit the results!
But for security, passwords are always displayed as *.
You can only set passwords, not read them.
But for security, passwords are always displayed as *.
You can only set passwords, not read them.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
-
- Newbie
- Posts: 4
- Joined: February 5th, 2014, 10:10 am
Re: API to change server settings?
Hi,
I also wanted to change the user and password of a server automatically by an external application.
Unfortunately when I use the following command it will create a new server which has only this parameter set, everything else is empty/default.
(FYI: There will be only one server in my list of servers)
http://{sabnzbd-address}/api?mode=set_config§ion=servers&keyword=username&value={New name}
How can I achive this task?
Thanks in advance
Frank
P.S: Unfortunately the starter of the thread did only say he has got the problem solved, instead of publishing the solution for others that have the same problem :-(
I also wanted to change the user and password of a server automatically by an external application.
Unfortunately when I use the following command it will create a new server which has only this parameter set, everything else is empty/default.
(FYI: There will be only one server in my list of servers)
http://{sabnzbd-address}/api?mode=set_config§ion=servers&keyword=username&value={New name}
How can I achive this task?
Thanks in advance
Frank
P.S: Unfortunately the starter of the thread did only say he has got the problem solved, instead of publishing the solution for others that have the same problem :-(
Re: API to change server settings?
In order to update a server, you need to specify the server name.
This is a bit hidden information, but you can find it in your sabnzbd.ini or by inspecting the source/requests from the Config > Servers page.
For example this is in my sabnzbd.ini because I have multiple servers with same hostname:
In this case you have to also include the
To indicate which server to update with new info.
This is a bit hidden information, but you can find it in your sabnzbd.ini or by inspecting the source/requests from the Config > Servers page.
For example this is in my sabnzbd.ini because I have multiple servers with same hostname:
Code: Select all
[servers]
[[eunews.frugalusenet.com@2]]
blabla
Code: Select all
&server=eunews.frugalusenet.com@2
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: API to change server settings?
Actually I was even wrong before, sorry.
The `servers` one is a bit strange, but I think the command should look like this:
Maybe I should add this info to the wiki..
EDIT: Added to wiki.
The `servers` one is a bit strange, but I think the command should look like this:
Code: Select all
http://{sabnzbd-address}/api?mode=set_config§ion=servers&keyword=eunews.frugalusenet.com@2&username=NEW_USERNAME&password=NEW_PASSWORD
EDIT: Added to wiki.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
-
- Newbie
- Posts: 4
- Joined: February 5th, 2014, 10:10 am
Re: API to change server settings?
Just wanted to say thanks!
Worked great!
Franky
Worked great!
Franky