SABnzbd

Wiki

API reference

Jump quickly to: Queue functions, History functions and Other functions.


Introduction

The SABnzbd API can be reached via:

http://host:port/sabnzbd/api

For backwards compatibility you might see tapi used in some of our templates, we recommend using api.

Request types

Supported output types are json, xml and text and can be specified in the request:

http://host:port/sabnzbd/api?output=json

API Key and NZB key

API requires the users API key to be supplied all API requests in order for it to work. The API key is randomly generated and is static unless the user decides to change the key. The user can see their API key on the General page of the configuration pages.

http://host:port/sabnzbd/api?output=json&apikey=APIKEY

If the API-key is missing the request will return error: API Key Required, if it is incorrect: error: API Key Incorrect.

There is also a seperate NZB key, which only allowes for adding, modifying and removing jobs in the queue. When this key is used for something else, the request will return error: API Key Incorrect.

The version and auth functions do not require the API key.

Documentation

NOTE In all examples below the apikey=APIKEY&output=json part is not shown but still necessary.

True/False Indicates the API will return the status, for some functions it's always true, even if the operation failed. Sorry about that!

{  
    "status":true
}

Queue functions

Function Description
queue Full Queue output
qstatus Simple Queue output
pause (queue) Pause whole queue
resume (queue) Resume whole queue
speedlimit Set speelimit
change_complete_action Action on queue complete
sort Sort the queue
addurl Add NZB by URL
addfile Add NZB by file upload
addlocalfile Add NZB by local file path
pause (single job) Pause a single job
resume (single job) Resume a single job
delete Delete job
purge Delete all jobs or based on keyword
move Change position of job in queue
change_category Change job category
change_script Change job script
priority Change job priority
change_opts Change job post-processing
rename Change name and password of job
get_files Get details of files in a job
delete_nzf Remove a file from a job

Full Queue output

Full queue output with details about all jobs.

api?mode=queue&start=START&limit=LIMIT&search=SEARCH

NOTE Some of the less obvious output paramaters are described below.

Input parameter Description
start optional Index of job to start at
limit optional Number of jobs to display
search optional Filter job names by search term
Output parameter Description
speedlimit In percentage of maximum set by user
speedlimit_abs In bytes/s
filename Labels like DUPLICATE and ENCRYPTED will be part of the filename
unpackopts See change_opts
darwin true when OS running SABnzbd is OSX
nt true when OS running SABnzbd is Windows
loadavg On Linux this will contain a string with information about system load
{
    "queue":{
        "session":"APIKEY",
        "speedlimit":"9",
        "speedlimit_abs":"4718592.0",
        "paused":false,
        "noofslots_total":2,
        "noofslots":2,
        "limit":10,
        "start":0,
        "eta":"17:52 Thu 21 Jul",
        "timeleft":"0:16:44",
        "speed":"1.3 M",
        "kbpersec":"1296.02",
        "size":"1.2 GB",
        "sizeleft":"1.2 GB",
        "mb":"1277.65",
        "mbleft":"1271.58",
        "slots":[
            {
                "status":"Downloading",
                "index":0,
                "password":"",
                "missing":4,
                "avg_age":"2895d",
                "script":"None",
                "has_rating":false,
                "mb":"1277.65",
                "mbleft":"1271.59",
                "size":"1.2 GB",
                "sizeleft":"1.2 GB",
                "filename":"TV.Show.S04E11.720p.HDTV.x264",
                "priority":"Normal",
                "cat":"tv",
                "eta":"17:52 Thu 21 Jul",
                "timeleft":"0:16:44",
                "percentage":"0",
                "nzo_id":"SABnzbd_nzo_p86tgx",
                "unpackopts":"3"
            },
            {
                "status":"Paused",
                "index":1,
                "password":"",
                "missing":0,
                "avg_age":"2895d",
                "script":"None",
                "has_rating":false,
                "mb":"1277.76",
                "mbleft":"1277.76",
                "size":"1.2 GB",
                "sizeleft":"1.2 GB",
                "filename":"TV.Show.S04E12.720p.HDTV.x264",
                "priority":"Normal",
                "cat":"tv",
                "eta":"unknown",
                "timeleft":"0:00:00",
                "percentage":"0",
                "nzo_id":"SABnzbd_nzo_ksfai6",
                "unpackopts":"3"
            }
        ],
        "categories":[
            "*",
            "movies",
            "series",
            "tv"
        ],
        "scripts":[
            "None",
            "Notify.py",
            "sabnzbd-notify.py"
        ],
        "diskspace1":"161.16",
        "diskspace2":"161.16",
        "diskspacetotal1":"465.21",
        "diskspacetotal2":"465.21",
        "diskspace1_norm":"161.2 G",
        "diskspace2_norm":"161.2 G",
        "active_lang":"en",
        "rating_enable":false,
        "darwin":false,
        "nt":true,
        "last_warning":"",
        "have_warnings":"0",
        "pause_int":"0",
        "pp_pause_event":false,
        "loadavg":"",
        "webdir":"",
        "left_quota":"0 ",
        "pid":3464,
        "restart_req":false,
        "power_options":true,
        "helpuri":"https://sabnzbd.org/wiki/",
        "uptime":"3h",
        "refresh_rate":"1",
        "my_home":"C:\\Users\\xxx",
        "version":"1.1.x",
        "my_lcldata":"C:\\Users\\xxx\\AppData\\Local\\sabnzbd",
        "color_scheme":"Default",
        "new_release":"",
        "status":"Downloading",
        "finish":2,
        "cache_art":"16",
        "cache_size":"6 MB",
        "cache_max":"1073741824",
        "finishaction":null,
        "paused_all":false,
        "quota":"0 ",
        "have_quota":false,
        "new_rel_url":"",
        "queue_details":"0"
    }
}

Simple Queue output

Depreciated now by the Full Queue output, this is the old API that just provides limited details on the current queue and state of SABnzbd.

api?mode=qstatus
{
    "noofslots_total":2,
    "have_warnings":"0",
    "pp_active":false,
    "mb":1277.6258602142334,
    "speedlimit_abs":"4718592.0",
    "jobs":[
        {
            "timeleft":"0:00:00",
            "filename":"TV.Show.S04E11.720p.HDTV.x264",
            "mbleft":1264.411566734314,
            "id":"SABnzbd_nzo_p86tgx",
            "mb":1277.6455068588257
        },
        {
            "timeleft":"0:00:00",
            "filename":"TV.Show.S04E12.720p.HDTV.x264",
            "mbleft":1277.7558698654175,
            "id":"SABnzbd_nzo_ksfai6",
            "mb":1277.7558698654175
        }
    ],
    "noofslots":2,
    "paused":true,
    "pause_int":"0",
    "state":"Paused",
    "loadavg":"",
    "mbleft":1264.3628635406494,
    "diskspace2":161.14520645141602,
    "diskspace1":161.14520645141602,
    "kbpersec":0.0,
    "speedlimit":"9",
    "timeleft":"0:00:00",
    "speed":"0 "
}

Pause queue True/False

Pauses the whole queue (do not confuse this will pausing an individual download, this is a global pause).

api?mode=pause

Pauses for value minutes.

api?mode=config&name=set_pause&value=50

Resume queue True/False

Resumes the whole queue (do not confuse this will resuming an individual download, this is a global pause).

api?mode=resume

Set speedlimit True/False

Sets the speedlimit to value in percentage of the maximum line speed (set by user).

api?mode=config&name=speedlimit&value=30

It can also be followed by K,M to define speedlimit in KB/s,MB/s, respectively.

api?mode=config&name=speedlimit&value=400K

NOTE In SABnzbd 0.7.20 and below the value is always interpreted as KB/s, no percentages.

Action on queue complete True/False

Set an end-of-queue action

api?mode=change_complete_action&value=ACTION

Options:

  • hibernate_pc
  • standby_pc
  • shutdown_program
  • Script: prefix the name of the script with script_, for example script_test.py

On some systems additional packages are required to allow SABnzbd to control power states, if there are problems in queue it will show as power_options=false.

Sort the queue True/False

Sort the queue by avg_age, name or size in asc or desc order.

api?mode=queue&name=sort&sort=avg_age&dir=desc

Add NZB by URL

Add NZB using an URL that needs to be accessible by SABnzbd, so make sure to include authentication information if the Indexer requires it. Example of a full request with everything set to default values is shown below, but only the name parameter is required.

api?mode=addurl&name=https%3A%2F%indexer.info%2Fget.php%3Fguid%3Ded731c0b37f25f84aea563d6ddb210b1%26api%3D6f235b80fab0c76e1ce7da21b2c6c48c&nzbname=&cat=*&script=Default&priority=-100&pp=-1

Returns the nzo_id of the job:

{
    "status": true, 
    "nzo_ids": ["SABnzbd_nzo_kyt1f0"]
}
Input parameter Description
name URL-encoded version of the link to the NZB to be fetched.
nzbname optional Name of the job, if empty the NZB filename is used.
NOTE If you want to supply a password, it needs to be part of the name/nzbname or provided inside the NZB, see: RAR with password.
cat optional Category to be assigned, * means Default. List of available categories can be retrieved from get_cats.
script optional Script to be assigned, Default will use the script assigned to the category. List of available scripts can be retrieved from get_scripts.
priority optional Priority to be assigned:
  • -100 = Default Priority (of category)
  • -2 = Paused
  • -1 = Low Priority
  • 0 = Normal Priority
  • 1 = High Priority
  • 2 = Force
pp optional Post-processing options:
  • -1 = Default (of category)
  • 0 = None
  • 1 = +Repair
  • 2 = +Repair/Unpack
  • 3 = +Repair/Unpack/Delete

Add NZB by file upload

Upload NZB using POST multipart/form-data. The file data should be in the field name.
For other parameters and output see addurl.

Add NZB by file upload

Upload NZB from a location on the file system that SABnzbd can access. The path should be URL-encoded.
For other parameters and output see addurl.

Example of adding a file E:\Downloads\Movie.BRRip.x264.1080p-NPW.nzb:

api?mode=addlocalfile&name=E%3A%5CDownloads%5CMovie.BRRip.x264.1080p-NPW.nzb&nzbname=&cat=*&script=Default&priority=-100&pp=-1

Pause single job True/False

Pause a single job based on its nzo_id.

api?mode=queue&name=pause&value=NZO_ID

Resume single job True/False

Resume a single job based on its nzo_id.

api?mode=queue&name=resume&value=NZO_ID

Delete jobs True/False

Delete job(s) based on nzo_id.

NOTE By default already download files of a job are not removed, add del_files=1 to have all files removed.

api?mode=queue&name=delete&value=NZO_ID

Deleting multiple items:

api?mode=queue&name=delete&value=NZO_ID_1,NZO_ID_2,NZO_ID_2

Deleting all items:

api?mode=queue&name=delete&value=all&del_files=1

Purge queue

Remove all jobs from the queue, or only the ones matching search. Returns nzb_id of the jobs removed.

api?mode=queue&name=purge&search=SEARCH&del_files=1

NOTE By default already download files of a job are not removed, add del_files=1 to have all files removed.

Move job in queue

Job's can be switched by providing 2 nzo_id, value is the item you want to move, value2 is the name of the job where you want to put value one above, shifting job value2 down.

api?mode=switch&value=NZO_ID_1&value2=NZO_ID_2

You can also move to a specific location in the queu, where 0 is the top of the queue:

api?mode=switch&value=NZO_ID&value2=2

Both commands will return the new position and priority, since a job's location is also dependent on its priority:

{
    "result": {
        "priority": 0, 
        "position": 2
    }
}

Change job category True/False

Change category of job with nzo_id. List of available categories can be retrieved from get_cats.

api?mode=change_cat&value=NZO_ID&value2=Category

Change job script True/False

Change script of job with nzo_id. List of available scripts can be retrieved from get_scripts.

api?mode=change_cat&value=NZO_ID&value2=script.py

Change job priority True/False

Change priority of job with nzo_id.

  • -100 = Default Priority (of category)
  • -2 = Paused
  • -1 = Low Priority
  • 0 = Normal Priority
  • 1 = High Priority
  • 2 = Force
api?mode=queue&name=priority&value=NZO_ID&value2=0

Change job post-processing options True/False

Change post-processing of job with nzo_id.

  • -1 = Default (of category)
  • 0 = None
  • 1 = +Repair
  • 2 = +Repair/Unpack
  • 3 = +Repair/Unpack/Delete
api?mode=change_opts&value=NZO_ID&value2=0

Change job name True/False

Change name and password of job with nzo_id.

NOTE value3 can be empty, but to set a password value and value2 must also be filled, using the current name.

api?mode=queue&name=rename&value=NZO_ID&value2=NEW_NAME&value3=PASSWORD

Or you can set a password as part of the new name in value2, see: RAR with password.

api?mode=queue&name=rename&value=NZO_ID&value2=NEW_NAME{{PASSWORD}}

Get files in job

Get files of job with nzo_id.

api?mode=get_files&value=NZO_ID

The status indicates if a file was finished, in the process of being downloaded (active) or will only be downloaded when necessary (queued, like .par2 files). The set shows to which part of the download the .par2 files belong to, in case of multiple sets in 1 job.

{
    "files":[
        {
            "status":"finished",
            "mb":"0.05",
            "age":"25d",
            "bytes":"52161.00",
            "filename":"93a4ec7c37752640deab48dabb46b164.par2",
            "mbleft":"0.00",
            "id":"0"
        },
        {
            "status":"active",
            "mbleft":"20.58",
            "mb":"98.50",
            "nzf_id":"SABnzbd_nzf_l5nz0c",
            "age":"25d",
            "bytes":"103287413.00",
            "id":"1",
            "filename":"93a4ec7c37752640deab48dabb46b164.01"
        },
        {
            "status":"queued",
            "set":"93a4ec7c37752640deab48dabb46b164",
            "mbleft":"3.13",
            "mb":"3.13",
            "age":"25d",
            "bytes":"3279083.00",
            "id":"37",
            "filename":"93a4ec7c37752640deab48dabb46b164.vol000+02.par2"
        }
    ]
}

Remove a file from a job

Remove a file using nzo_id of the job and nzf_id of the file. Returns the nzf_id of removed file.

api?mode=queue&name=delete_nzf&value=NZO_ID&value2=NZF_ID

History functions

Function Description
history Full history output
retry Retry failed job
retry_all Retry all failed jobs
delete Delete history item

History output

Full queue output with details about all jobs. The queue and the history output share many common fields, but the history also contains statistiscs about how much has been downloaded in the past day, week, month and total.

api?mode=history&start=START&limit=LIMIT&category=CATEGORY&search=SEARCH&failed_only=0

NOTE Some of the less obvious output paramaters are described below.

Input parameter Description
start optional Index of job to start at
limit optional Number of jobs to display
category optional Only return jobs in this category (Only 1.0.0+)
search optional Filter job names by search term
failed_only optional Only show failed jobs
last_history_update optional Only return full output if anything has changed since last_history_update, the last update is given by a previous call to history (Only 1.1.0+)
Output parameter Description
series How SABnzbd identified the show and season/episode info
pp Different format than the queue:
  • R = +Repair
  • U = +Repair/Unpack
  • D = +Repair/Unpack/Delete
path Temporary destination
storage Final destination
loaded If true, item is post-processing
completeness / show_details Depricated
{
    "history":{
        "noofslots":220,
        "session":"APIKEY",
        "day_size":"1.9 G",
        "week_size":"30.4 G",
        "month_size":"167.3 G",
        "total_size":"678.1 G",
        "slots":[
            {
                "action_line":"",
                "series":"TV.Show/4/2",
                "show_details":"True",
                "script_log":"",
                "meta":null,
                "fail_message":"",
                "loaded":false,
                "id":235,
                "size":"2.3 GB",
                "category":"tv",
                "pp":"D",
                "retry":0,
                "completeness":0,
                "script":"None",
                "nzb_name":"TV.Show.S04E02.720p.BluRay.x264-xHD.nzb",
                "download_time":64,
                "storage":"C:\\Users\\xxx\\Videos\\Complete\\TV.Show.S04E02.720p.BluRay.x264-xHD",
                "has_rating":false,
                "status":"Completed",
                "script_line":"",
                "completed":1469172988,
                "nzo_id":"SABnzbd_nzo_sdkoun",
                "downloaded":2436906376,
                "report":"",
                "path":"\\\\?\\C:\\SABnzbd\\TV.Show.S04E02.720p.BluRay.x264-xHD",
                "postproc_time":40,
                "name":"TV.Show.S04E02.720p.BluRay.x264-xHD",
                "url":"TV.Show.S04E02.720p.BluRay.x264-xHD.nzb",
                "md5sum":"d2c16aeecbc1b1921d04422850e93013",
                "bytes":2436906376,
                "url_info":"",
                "stage_log":[
                    {
                        "name":"Source",
                        "actions":[
                            "TV.Show.S04E02.720p.BluRay.x264-xHD.nzb"
                        ]
                    },
                    {
                        "name":"Download",
                        "actions":[
                            "Downloaded in 1 min 4 seconds at an average of 36.2 MB/s<br/>Age: 550d<br/>10 articles were malformed"
                        ]
                    },
                    {
                        "name":"Servers",
                        "actions":[
                            "Frugal=2.3 GB"
                        ]
                    },
                    {
                        "name":"Repair",
                        "actions":[
                            "[pA72r5Ac6lW3bmpd20T7Hj1Zg2bymUsINBB50skrI] Repaired in 19 seconds"
                        ]
                    },
                    {
                        "name":"Unpack",
                        "actions":[
                            "[pA72r5Ac6lW3bmpd20T7Hj1Zg2bymUsINBB50skrI] Unpacked 1 files/folders in 6 seconds"
                        ]
                    }
                ]
            },
            {
                "action_line":"",
                "series":"TV.Show/4/13",
                "show_details":"True",
                "script_log":"",
                "meta":null,
                "fail_message":"",
                "loaded":false,
                "id":234,
                "size":"2.3 GB",
                "category":"tv",
                "pp":"D",
                "retry":0,
                "completeness":0,
                "script":"None",
                "nzb_name":"TV.Show.S04E13.720p.BluRay.x264-xHD.nzb",
                "download_time":60,
                "storage":"C:\\Users\\xxx\\Videos\\Complete\\TV.Show.S04E13.720p.BluRay.x264-xHD",
                "has_rating":false,
                "status":"Completed",
                "script_line":"",
                "completed":1469172947,
                "nzo_id":"SABnzbd_nzo_gqhp63",
                "downloaded":2491255137,
                "report":"",
                "path":"\\\\?\\C:\\SABnzbd\\TV.Show.S04E13.720p.BluRay.x264-xHD",
                "postproc_time":82,
                "name":"TV.Show.S04E13.720p.BluRay.x264-xHD",
                "url":"TV.Show.S04E13.720p.BluRay.x264-xHD.nzb",
                "md5sum":"85baf55ec0de0dc732c2af6537c5c01b",
                "bytes":2491255137,
                "url_info":"",
                "stage_log":[
                    {
                        "name":"Source",
                        "actions":[
                            "TV.Show.S04E13.720p.BluRay.x264-xHD.nzb"
                        ]
                    },
                    {
                        "name":"Download",
                        "actions":[
                            "Downloaded in 1 min at an average of 39.4 MB/s<br/>Age: 558d<br/>15 articles were malformed"
                        ]
                    },
                    {
                        "name":"Servers",
                        "actions":[
                            "Frugal=2.3 GB"
                        ]
                    },
                    {
                        "name":"Repair",
                        "actions":[
                            "[m0vklMEMKIT5L5XH9z5YTmuquoitCQ3F5LISTLFjT] Repaired in 47 seconds"
                        ]
                    },
                    {
                        "name":"Unpack",
                        "actions":[
                            "[m0vklMEMKIT5L5XH9z5YTmuquoitCQ3F5LISTLFjT] Unpacked 1 files/folders in 6 seconds"
                        ]
                    }
                ]
            }
        ],
        "diskspacetotal2":"465.21",
        "darwin":false,
        "last_warning":"",
        "have_warnings":"0",
        "diskspace2_norm":"182.0 G",
        "speedlimit_abs":"10485760",
        "active_lang":"en",
        "pause_int":"0",
        "pp_pause_event":false,
        "diskspacetotal1":"465.21",
        "loadavg":"",
        "cache_max":"1073741824",
        "speedlimit":"20",
        "webdir":"",
        "left_quota":"0 ",
        "diskspace1_norm":"182.0 G",
        "pid":9792,
        "paused":true,
        "restart_req":false,
        "power_options":true,
        "helpuri":"https://sabnzbd.org/wiki/",
        "uptime":"1d",
        "my_home":"C:\\Users\\xxx",
        "last_history_update":1469210913,
        "version":"1.1.x",
        "my_lcldata":"C:\\Users\\xxx\\AppData\\Local\\sabnzbd",
        "color_scheme":"Default",
        "new_release":"",
        "nt":true,
        "cache_art":"0",
        "finishaction":null,
        "paused_all":false,
        "quota":"0 ",
        "cache_size":"0 B",
        "diskspace2":"182.00",
        "diskspace1":"182.00",
        "have_quota":false,
        "new_rel_url":""
    }
}

Retry history item True/False

Retry history item(s) based on nzo_id. Optionally provide a password and an additional NZB as POST multipart/form-data in the nzbfile field.

NOTE Pay attention to the different variable names used here: job and nzbfile.

api?mode=retry&job=NZO_ID&password=password

Retry all history items True/False

Will retry all failed jobs in the history. However, you are not able to supply passwords or extra NZB's.

api?mode=retry_all

Delete history items True/False

Delete history item(s) based on nzo_id.

NOTE By default files of failed jobs are not removed, add del_files=1 to also have them removed.

api?mode=history&name=delete&value=NZO_ID

Deleting multiple items:

api?mode=history&name=delete&value=NZO_ID_1,NZO_ID_2,NZO_ID_2

Deleting all items:

api?mode=history&name=delete&value=all

Deleting all failed items:

api?mode=history&name=delete&value=failed

Other functions

NOTE Other functions are listed below, some straightforward commands are described only in this table and can simply be activated by calling:

api?mode=FUNCTION
Function Description
version Get version of running SABnzbd
auth Get authentication methods available for interaction with the API
fullstatus All status information
warnings Get all active warnings
warnings clear Clear all active warnings
get_cats Get all categories
get_scripts Get all scripts
server_stats Get download statistics
get_config Get value of configuration item
set_config Set configuration item to value
set_config_default Reset config item to default value
shutdown True/False Shutdown SABnnzbd
restart True/False Restart SABnnzbd
pause_pp True/False Pause post-processing queue
resume_pp True/False Resume post-processing queue
rss_now True/False Fetch and process all RSS feeds
watched_now True/False Scan Watched Folder now
reset_quota True/False Reset the user defined quota to 0
set_apikey Reset the API key, returns the new key
set_nzbkey Reset the NZB key, returns the new key
translate Translate a text to user's locale

Status information

Get all status information available from SABnzbd. Below are only the values that are different from calls to queue.

Getting the public IPv4 address might take some time, so it can be skipped by setting skip_dashboard=1. Calculating the disk-speed is not possible through the API, only from a skin.

api?mode=fullstatus&skip_dashboard=0

NOTE Some of the less obvious output paramaters are described below.

Output parameter Description
folders The orphaned job folder left in the Incomplete folder. Orphaned jobs can only be removed from a skin, not through the API
cpumodel Only available on Linux
dashrefreshcounter How often the disk speed was calculated
pystone Indication of CPU speed, see Highspeed Downloading
{  
    "status":{  
        "localipv4":"192.168.0.1",
        "ipv6":null,
        "publicipv4":"46.00.00.103",
        "dnslookup":"OK",
        "folders":[  
            "Lost.Folder.BRRip.x264.1080p"
        ],
        "weblogfile":null,
        "cpumodel":null,
        "pystone":88738,
        "downloaddir":"C:\\SABnzbd",
        "downloaddirspeed":0,
        "completedir":"C:\\Users\\xxx\\Videos\\Complete",
        "completedirspeed":0,
        "dashrefreshcounter":0,
        "loglevel":"0",
        "logfile":"C:\\Users\\xxx\\AppData\\Local\\sabnzbd\\logs\\sabnzbd.log",
        "configfn":"C:\\Users\\xxx\\AppData\\Local\\sabnzbd\\sabnzbd.ini",
        "warnings":[  

        ],
        "servers":[  
            {  
                "servername":"Frugal",
                "servertotalconn":25,
                "serverssl":0,
                "serveractiveconn":25,
                "serveroptional":0,
                "serveractive":true,
                "servererror":"",
                "serverpriority":0,
                "serverconnections":[  
                    {  
                        "thrdnum":1,
                        "nzo_name":"Movie.BRRip.x264.1080p",
                        "nzf_name":"93a4ec7c37752640deab48dabb46b164.01",
                        "art_name":"[email protected]"
                    },
                    {  
                        "thrdnum":2,
                        "nzo_name":"Movie.BRRip.x264.1080p",
                        "nzf_name":"93a4ec7c37752640deab48dabb46b164.02",
                        "art_name":"[email protected]"
                    },
                    {  
                        "thrdnum":3,
                        "nzo_name":"Movie.BRRip.x264.1080p",
                        "nzf_name":"93a4ec7c37752640deab48dabb46b164.03",
                        "art_name":"[email protected]"
                    }
                ]
            },
            {  
                "servername":"Nextgennews",
                "servertotalconn":15,
                "serverssl":0,
                "serveractiveconn":0,
                "serveroptional":0,
                "serveractive":true,
                "servererror":"",
                "serverpriority":1,
                "serverconnections":[]
            }
        ]
    }
}

Get all categories

api?mode=get_cats
{
    "categories":[
        "*",
        "movies",
        "series",
        "tv"
    ]
}

Get all scripts

api?mode=get_scripts
{
    "scripts":[
        "None",
        "Notify.py",
        "sabnzbd-notify.py"
    ]
}

Download statistics

Return download statistics in bytes, total and per-server.

api?mode=server_stats
{  
    "day":2352634799,
    "week":32934490677,
    "month":179983557488,
    "total":728426161290,
    "servers":{  
        "eunews.server.com":{  
            "week":19783288936,
            "total":163741252273,
            "day":2352634799,
            "month":90478917031
        },
        "News.server.net":{  
            "week":13151201741,
            "total":165783396295,
            "day":0,
            "month":89499300889
        }
    }
}

Get config item(s)

You can read the whole configuration, a sub-set or a single setting.

NOTE You will never receive passwords, each character will be replaced by *** characters. You can set new passwords through the set_config call.

api?mode=get_config
All elements in misc section
api?mode=get_config&section=misc
Example of filtering the server settings by keyword:
api?mode=get_config&section=servers&keyword=ServerName

Set config item

In order to change a setting, you need to provide the section and keyword of the setting:

api?mode=set_config&section=SECTION&keyword=KEYWORD&value=VALUE

Returns the new setting when saved succesfully.

For example, changing the Cleanup-list to .sfv,.nzb,.nfo,.ext would look like this:

api?mode=set_config&section=misc&keyword=cleanup_list&value=.sfv,.nzb,.nfo,.ext

Reset config item to default value

NOTE Currently only for settings in the misc section of the config. Can accept multiple keywords to reset.

api?mode=set_config_default&keyword=SETTING_1&keyword=SETTING_2

Get all active warnings

api?mode=warnings
{  
    "warnings":[  
        "2015-12-26 19:53:42,567\nWARNING\n[decoder] Badly formed yEnc article in <Article: article=, bytes=, partnum=, art_id=>",
        "2015-12-26 19:54:45,861\nWARNING\n[assembler] <Article: article=, bytes=, partnum=, art_id=> missing",
        "2015-12-26 20:44:28,336\nWARNING\n[decoder] CRC Error in <Article: article=, bytes=, partnum=, art_id=> (4134546D -> A8F07173)",
        "2015-12-27 01:13:37,349\nWARNING\n[downloader] Thread [email protected]:119: timed out",
        "2015-12-27 01:13:38,365\nWARNING\n[downloader] Thread [email protected]:119: timed out",
        "2015-12-27 01:45:34,041\nWARNING\n[downloader] Thread [email protected]:119: timed out"
    ]
}

Clear all active warnings True/False

api?mode=warnings&name=clear

Translate a text

Translate any text known to SABnzbd from English to the locale setting of the user.

api?mode=translate&value=Watched%20Folder

Will return for Dutch:

{
    "value": "Bewaakte map"
}