JSON RPC Set Config

General support for problems installing or using Deluge
Post Reply
gprime
New User
New User
Posts: 7
Joined: Thu Apr 19, 2012 7:28 pm

JSON RPC Set Config

Post by gprime »

I am attempting to set a value in the overall config of deluge. But each time I try to set it it just hangs there.

This is what I am calling after a successful login:

Code: Select all

curl -b cookies.txt --compressed -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"","method":"core.set_config","params":{"max_upload_slots_global":"200"}}' http://localhost:8112/json
Also, if I want to set the configs values on startup, how to I know the names of the values to set. I can't find any examples or docs that help me out with this. I can pass into the terminal --config=pathtoconfig but how should the file containing the config values be organize?
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: JSON RPC Set Config

Post by Cas »

gprime wrote:I am attempting to set a value in the overall config of deluge. But each time I try to set it it just hangs there.
Note the extra square brackets used in params around the dict:

Code: Select all

curl -b cookies.txt --compressed -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"","method":"core.set_config","params":[{"max_upload_slots_global":"200"}]}' http://localhost:8112/json
gprime wrote:Also, if I want to set the configs values on startup, how to I know the names of the values to set. I can't find any examples or docs that help me out with this. I can pass into the terminal --config=pathtoconfig but how should the file containing the config values be organize?
Not sure what you trying to achieve but you can use core.get_config() for a list of all keys or look in the preferencesmanager for the majority.
Post Reply