Hi, im integrating SABnzbd into my android app. But I'm having some problems with uploading nzb files with the API.
What i get returned is this: error: expect one parameter
this is my URL in java: "http://" + hostname + ":" + port + "/api?mode=addfile&nzbname=" + FILENAME + "&apikey=" + apiKey
and i set the file itself as a multipart entity as a HTTP POST entity. But as i said i always get error: expect one parameter returned.
Is my URL wrong or am i doing something completly wrong?
Thx
API upload nzb file
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 upload nzb file
Two examples
The bad:
The good:
... do you see the difference? Hint: "@" ...
HTH
EDIT:
It's a POST, not a GET.
The bad:
Code: Select all
$ curl http://localhost:8080/sabnzbd/api -F "apikey=b463b755ad289e4fd2e2e7319ab6" -F mode=addfile -F "name=/home/sander/Downloads/XD830dcea0ed04c547.nzb"
error: expect one parameterCode: Select all
$ curl http://localhost:8080/sabnzbd/api -F "apikey=b463b755ad289e4fd2e2e7319ab6" -F mode=addfile -F "name=@/home/sander/Downloads/XD830dcea0ed04c547.nzb"
okHTH
EDIT:
It's a POST, not a GET.
