API status

Want something added? Ask for it here.
Post Reply
gleam
Newbie
Newbie
Posts: 4
Joined: June 22nd, 2008, 9:34 pm

API status

Post by gleam »

Hey,

I'm working on a basic shell script to manipulate SABnzbd+ from the command line (reorder the queue, add, delete, etc), and I'm running into trouble because some of the API commands are still unimplemented.  Notably, switch and queue-delete.

Is there any information on when these will be working?

-gleam
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: API status

Post by switch »

The api for 0.5 will feature many of the missing API calls plus some more (check here for a list).

In the meantime, you can switch and queue delete using these urls:

Code: Select all

http://localhost:8080/sabnzbd/queue/switch?uid1=ITEM1&uid2=ITEM2
where item1 is the nzoID (SABnzbd_ijfij34ij) you wish to move, and item2 is either the nzoID at the location you wish to insert the item, or the position in the queue you wish for it to be inserted (can't remember if this is zero based or not)

Code: Select all

http://localhost:8080/sabnzbd/queue/delete?uid=ITEM
If you wish to look for more, either look at the calls the web-ui makes, or look into interface.py (search for "class QueuePage")
gleam
Newbie
Newbie
Posts: 4
Joined: June 22nd, 2008, 9:34 pm

Re: API status

Post by gleam »

Awesome, thanks so much for the reply!
bulld03er
Release Testers
Release Testers
Posts: 3
Joined: August 26th, 2009, 5:35 am

Re: API status

Post by bulld03er »

Hi

Newbie here.

I tried to used the url but it doesnt seem to work.
http://localhost:8080/sabnzbd/queue/swi ... uid2=ITEM2

what is nzoid?  is it just the number of the item in the list.

sorry if the info is around but i cannot find any other info on this. 

thanks
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: API status

Post by shypike »

It's a random number generated by SABnzbd.
The idea is that you first get the list of jobs in the queue through another API call.
That contains the ID's of each job.
bulld03er
Release Testers
Release Testers
Posts: 3
Joined: August 26th, 2009, 5:35 am

Re: API status

Post by bulld03er »

working brilliantly!  ;D ;D

I was able just to do the api call from the browser by turning off the api key.

waiting for the next version.
Post Reply