### Example History JSON Response
Source: https://sabnzbd.org/wiki/configuration/4.5/api
This is an example of the JSON response received when querying the history endpoint. It includes overall statistics and details for each download slot.
```json
{
"history": {
"noofslots": 220,
"ppslots": 1,
"day_size": "1.9 G",
"week_size": "30.4 G",
"month_size": "167.3 G",
"total_size": "678.1 G",
"last_history_update": 1469210913,
"slots": [
{
"action_line": "",
"duplicate_key": "TV.Show/4/2",
"meta": null,
"fail_message": "",
"loaded": false,
"size": "2.3 GB",
"category": "tv",
"pp": "D",
"retry": 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,
"time_added": 1469172000,
"nzo_id": "SABnzbd_nzo_sdkoun",
"downloaded": 2436906376,
"report": "",
"password": "",
"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",
"archive": false,
"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
Age: 550d
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": "",
"duplicate_key": "TV.Show/4/13",
"meta": null,
"fail_message": "",
"loaded": false,
```
--------------------------------
### Get Version
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves the version of the running SABnzbd instance.
```APIDOC
## GET /api?mode=version
### Description
Get version of running SABnzbd.
### Method
GET
### Endpoint
/api?mode=version
```
--------------------------------
### Get Categories
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves all configured categories.
```APIDOC
## GET /api?mode=get_cats
### Description
Get all categories.
### Method
GET
### Endpoint
/api?mode=get_cats
### Response
#### Success Response (200)
- **categories** (array) - List of category names.
### Response Example
```json
{
"categories": [
"*",
"movies",
"series",
"tv"
]
}
```
```
--------------------------------
### Get Scripts
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves all available scripts.
```APIDOC
## GET /api?mode=get_scripts
### Description
Get all scripts.
### Method
GET
### Endpoint
/api?mode=get_scripts
### Response
#### Success Response (200)
- **scripts** (array) - List of script names.
### Response Example
```json
{
"scripts": [
"None",
"Notify.py",
"sabnzbd-notify.py"
]
}
```
```
--------------------------------
### Get Configuration Item(s)
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves configuration item(s). Can read the whole configuration, a sub-set, or a single setting.
```APIDOC
## GET /api?mode=get_config
### Description
You can read the whole configuration, a sub-set or a single setting. Passwords will be replaced by `***` characters.
### Method
GET
### Endpoint
/api?mode=get_config
### Parameters
#### Query Parameters
- **section** (string) - Optional - The section to retrieve configuration from (e.g., "misc", "servers").
- **keyword** (string) - Optional - The specific keyword within the section to retrieve.
### Example
All elements in `misc` section:
```
api?mode=get_config§ion=misc
```
Example of filtering the server settings by keyword:
```
api?mode=get_config§ion=servers&keyword=ServerName
```
```
--------------------------------
### Get Warnings
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves all active warnings.
```APIDOC
## GET /api?mode=warnings
### Description
Get all active warnings.
### Method
GET
### Endpoint
/api?mode=warnings
```
--------------------------------
### Get Configuration Item(s)
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Reads configuration settings. You can retrieve the entire configuration, a subset of a section, or a specific item. Passwords are not returned and are masked with asterisks.
```bash
api?mode=get_config
```
```bash
api?mode=get_config§ion=misc
```
```bash
api?mode=get_config§ion=servers&keyword=ServerName
```
--------------------------------
### Get All Scripts
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Fetches a list of available scripts that can be used with SABnzbd. This helps in identifying custom or built-in scripts.
```bash
api?mode=get_scripts
```
```json
{
"scripts": [
"None",
"Notify.py",
"sabnzbd-notify.py"
]
}
```
--------------------------------
### Get All Categories
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves a list of all configured categories in SABnzbd. This is useful for understanding the available download categories.
```bash
api?mode=get_cats
```
```json
{
"categories": [
"*",
"movies",
"series",
"tv"
]
}
```
--------------------------------
### API Response Example (Success)
Source: https://sabnzbd.org/wiki/configuration/4.5/api
A typical success response from the SABnzbd API. Note that for some functions, 'status' may return true even if the operation failed.
```json
{
"status": true
}
```
--------------------------------
### Get All Active Warnings via API
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves a list of all active warnings and errors within SABnzbd.
```bash
api?mode=warnings
```
--------------------------------
### SABnzbd Status Response Example
Source: https://sabnzbd.org/wiki/configuration/4.5/api
This JSON object represents the detailed status information returned by the SABnzbd API. It includes details about the operating system, network status, download directories, CPU information, server configurations, and active connections.
```json
{
"status": {
"localipv4": "192.168.0.1",
"ipv6": null,
"publicipv4": "46.00.00.103",
"dnslookup": "OK",
"folders": [
"Lost.Folder.BRRip.x264.1080p"
],
"cpumodel": "Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz",
"pystone": 88738,
"loadavg": "",
"downloaddir": "C:\\SABnzbd",
"downloaddirspeed": 0,
"completedir": "C:\\Users\\xxx\\Videos\\Complete",
"completedirspeed": 0,
"loglevel": "0",
"logfile": "C:\\Users\\xxx\\AppData\\Local\\sabnzbd\\logs\\sabnzbd.log",
"configfn": "C:\\Users\\xxx\\AppData\\Local\\sabnzbd\\sabnzbd.ini",
"nt": true,
"darwin": false,
"confighelpuri": "https://sabnzbd.org/wiki/configuration/5.0/",
"uptime": "3h",
"color_scheme": "Default",
"webdir": "C:\\Program Files\\SABnzbd\\interfaces\\Glitter\\templates",
"active_lang": "en",
"restart_req": false,
"power_options": true,
"pp_pause_event": false,
"pid": 123,
"weblogfile": null,
"new_release": false,
"new_rel_url": null,
"have_warnings": "0",
"warnings": [],
"servers": [
{
"servername": "Frugal",
"servertotalconn": 25,
"serverssl": 0,
"serveractiveconn": 25,
"serveroptional": 0,
"serveractive": true,
"servererror": "",
"serverpriority": 0,
"serverbps": "11.1 M",
"serverconnections": [
{
"thrdnum": 1,
"nzo_name": "Movie.BRRip.x264.1080p",
"nzf_name": "93a4ec7c37752640deab48dabb46b164.01",
"art_name": "1467157804579212986$gps@gopoststuff"
},
{
"thrdnum": 2,
"nzo_name": "Movie.BRRip.x264.1080p",
"nzf_name": "93a4ec7c37752640deab48dabb46b164.02",
"art_name": "1467157807935349477$gps@gopoststuff"
},
{
"thrdnum": 3,
"nzo_name": "Movie.BRRip.x264.1080p",
"nzf_name": "93a4ec7c37752640deab48dabb46b164.03",
"art_name": "1467157811461680159$gps@gopoststuff"
}
]
},
{
"servername": "Nextgennews",
"servertotalconn": 15,
"serverssl": 0,
"serveractiveconn": 0,
"serveroptional": 0,
"serveractive": true,
"servererror": "",
"serverpriority": 1,
"serverbps": "0 ",
"serverconnections": []
}
]
}
}
```
--------------------------------
### Get All Status Information
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieve all available status information from SABnzbd. The `skip_dashboard=1` parameter can be used to omit the potentially time-consuming public IPv4 address lookup. Add `calculate_performance=1` to compute performance metrics.
```bash
api?mode=status&skip_dashboard=0
```
--------------------------------
### Get Authentication Methods
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves the authentication methods available for interacting with the API.
```APIDOC
## GET /api?mode=auth
### Description
Get authentication methods available for interaction with the API.
### Method
GET
### Endpoint
/api?mode=auth
```
--------------------------------
### Get Full Queue Output
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieve detailed information about all jobs in the queue. Supports filtering by start index, limit, category, priority, search term, and specific NZB IDs.
```api
api?mode=queue&start=START&limit=LIMIT&cat=CATEGORY&priority=PRIORITY&search=SEARCH&nzo_ids=NZO_ID_1,NZO_ID_2,NZO_ID_3
```
```json
{
"queue": {
"status": "Downloading",
"speedlimit": "9",
"speedlimit_abs": "4718592.0",
"paused": false,
"noofslots_total": 2,
"noofslots": 2,
"limit": 10,
"start": 0,
"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": "",
"avg_age": "2895d",
"time_added": 1469172000,
"script": "None",
"direct_unpack": "10/30",
"mb": "1277.65",
"mbleft": "1271.59",
"mbmissing": "0.0",
"size": "1.2 GB",
"sizeleft": "1.2 GB",
"filename": "TV.Show.S04E11.720p.HDTV.x264",
"labels": [],
"priority": "Normal",
"cat": "tv",
"timeleft": "0:16:44",
"percentage": "0",
"nzo_id": "SABnzbd_nzo_p86tgx",
"unpackopts": "3"
},
{
"status": "Paused",
"index": 1,
"password": "",
"avg_age": "2895d",
"time_added": 1469171000,
"script": "None",
"direct_unpack": null,
"mb": "1277.76",
"mbleft": "1277.76",
"mbmissing": "0.0",
"size": "1.2 GB",
"sizeleft": "1.2 GB",
"filename": "TV.Show.S04E12.720p.HDTV.x264",
"labels": [
"TOO LARGE",
"DUPLICATE"
],
"priority": "Normal",
"cat": "tv",
"timeleft": "0:00:00",
"percentage": "0",
"nzo_id": "SABnzbd_nzo_ksfai6",
"unpackopts": "3"
}
],
"diskspace1": "161.16",
"diskspace2": "161.16",
"diskspacetotal1": "465.21",
"diskspacetotal2": "465.21",
"diskspace1_norm": "161.2 G",
"diskspace2_norm": "161.2 G",
"have_warnings": "0",
"pause_int": "0",
"left_quota": "0 ",
"version": "3.x.x",
"finish": 2,
"cache_art": "16",
"cache_size": "6 MB",
"finishaction": null,
"paused_all": false,
"quota": "0 ",
"have_quota": false,
}
}
```
--------------------------------
### Get All Active Warnings
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves a list of all active warnings currently present in SABnzbd.
```APIDOC
## Get all active warnings
```
api?mode=warnings
```
```json
{
"warnings": [
{
"text": "API key missing, please enter the API key from Config->General into your 3rd party program",
"type": "WARNING",
"time": 1505153489
},
{
"text": "Thread 3@news.powerusenet.com:119: login failed",
"type": "ERROR",
"time": 1505139501
}
]
}
```
```
--------------------------------
### Get Server Statistics
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves download statistics in bytes, total and per-server.
```APIDOC
## GET /api?mode=server_stats
### Description
Get download statistics in bytes, total and per-server.
### Method
GET
### Endpoint
/api?mode=server_stats
### Response
#### Success Response (200)
- **day** (integer) - Download statistics for the current day in bytes.
- **week** (integer) - Download statistics for the current week in bytes.
- **month** (integer) - Download statistics for the current month in bytes.
- **total** (integer) - Total download statistics in bytes.
- **servers** (object) - Statistics per server.
- **servers[server_name].week** (integer) - Weekly download statistics for the specific server.
- **servers[server_name].total** (integer) - Total download statistics for the specific server.
- **servers[server_name].day** (integer) - Daily download statistics for the specific server.
- **servers[server_name].month** (integer) - Monthly download statistics for the specific server.
- **servers[server_name].daily** (object) - Daily breakdown of statistics.
- **servers[server_name].articles_tried** (integer) - Number of articles tried for the specific server.
- **servers[server_name].articles_success** (integer) - Number of articles successfully downloaded for the specific server.
### Response Example
```json
{
"day": 2352634799,
"week": 32934490677,
"month": 179983557488,
"total": 728426161290,
"servers": {
"eunews.server.com": {
"week": 19783288936,
"total": 163741252273,
"day": 2352634799,
"month": 90478917031,
"daily": {
"2017-01-28": 1234,
"2017-01-29": 4567
},
"articles_tried": 929299,
"articles_success": 8299
},
"News.server.net": {
"week": 13151201741,
"total": 165783396295,
"day": 0,
"month": 89499300889,
"daily": {
"2017-01-28": 1234,
"2017-01-29": 4567
},
"articles_tried": 520400,
"articles_success": 78881
}
}
}
```
```
--------------------------------
### Get Download Statistics
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves detailed download statistics, including daily, weekly, monthly, and total bytes downloaded, as well as per-server statistics and article counts.
```bash
api?mode=server_stats
```
```json
{
"day": 2352634799,
"week": 32934490677,
"month": 179983557488,
"total": 728426161290,
"servers": {
"eunews.server.com": {
"week": 19783288936,
"total": 163741252273,
"day": 2352634799,
"month": 90478917031,
"daily": {
"2017-01-28": 1234,
"2017-01-29": 4567
},
"articles_tried": 929299,
"articles_success": 8299
},
"News.server.net": {
"week": 13151201741,
"total": 165783396295,
"day": 0,
"month": 89499300889,
"daily": {
"2017-01-28": 1234,
"2017-01-29": 4567
},
"articles_tried": 520400,
"articles_success": 78881
}
}
}
```
--------------------------------
### Get History Output
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves a list of historical download jobs with detailed information. Supports filtering by category, status, search term, and specific NZB IDs.
```APIDOC
## GET api?mode=history
### Description
Retrieves full history output with details about all jobs. This endpoint provides comprehensive information about past download jobs, including statistics like daily, weekly, monthly, and total downloaded amounts. It shares many fields with the `queue` output but includes additional historical statistics.
### Method
GET
### Endpoint
`/api?mode=history`
### Parameters
#### Query Parameters
- **start** (integer) - Optional - Index of the job to start retrieving from.
- **limit** (integer) - Optional - Number of jobs to display in the output.
- **archive** (boolean) - Optional - If true, displays archived items; otherwise, displays history (default).
- **search** (string) - Optional - Filters job names by the provided search term.
- **category** / **cat** (string) - Optional - Filters jobs by a specified category or comma-separated list of categories. Use `*` for default.
- **status** (string) - Optional - Filters jobs by a specified status or comma-separated list of statuses. Possible values include: `Completed`, `Failed`, `Queued`, `QuickCheck`, `Verifying`, `Repairing`, `Fetching`, `Extracting`, `Moving`, `Running`.
- **nzo_ids** (string) - Optional - Filters jobs by a comma-separated list of NZB IDs.
- **failed_only** (boolean) - Optional - If true, only shows failed jobs (shorthand for `status=Failed`).
- **last_history_update** (integer) - Optional - Returns full output only if changes have occurred since the specified Unix timestamp.
### Response
#### Success Response (200)
- **history** (object) - Contains historical data.
- **noofslots** (integer) - Total number of slots available.
- **ppslots** (integer) - Number of slots used for post-processing.
- **day_size** (string) - Amount downloaded in the last day.
- **week_size** (string) - Amount downloaded in the last week.
- **month_size** (string) - Amount downloaded in the last month.
- **total_size** (string) - Total amount downloaded.
- **last_history_update** (integer) - Unix timestamp of the last history update.
- **slots** (array) - An array of historical job objects.
- **action_line** (string) - Information about the action line.
- **duplicate_key** (string) - How SABnzbd identified the show and season/episode info.
- **meta** (any) - Metadata associated with the job.
- **fail_message** (string) - Message if the job failed.
- **loaded** (boolean) - Indicates if the item is post-processing.
- **size** (string) - Size of the downloaded file.
- **category** (string) - Category of the job.
- **pp** (string) - Post-processing status (e.g., `R` for Repair, `U` for Repair/Unpack, `D` for Repair/Unpack/Delete).
- **retry** (integer) - Number of retries for the job.
- **script** (string) - Script used for post-processing.
- **nzb_name** (string) - Name of the NZB file.
- **download_time** (integer) - Time taken for download in seconds.
- **storage** (string) - Final destination path for the downloaded file.
- **has_rating** (boolean) - Indicates if the job has a rating.
- **status** (string) - Status of the job (e.g., `Completed`, `Failed`).
- **script_line** (string) - Line from the script.
- **completed** (integer) - Unix timestamp when the job was completed.
- **time_added** (integer) - Unix timestamp when the job was added to the queue.
- **nzo_id** (string) - The unique NZB object ID.
- **downloaded** (integer) - Amount downloaded in bytes.
- **report** (string) - Report information.
- **password** (string) - Password for encrypted archives.
- **path** (string) - Temporary destination path.
- **postproc_time** (integer) - Time taken for post-processing in seconds.
- **name** (string) - Name of the job.
- **url** (string) - URL of the NZB file.
- **md5sum** (string) - MD5 checksum of the NZB file.
- **archive** (boolean) - Indicates if the item is archived.
- **bytes** (integer) - Size of the download in bytes.
- **url_info** (string) - Information about the URL.
- **stage_log** (array) - Log entries for different stages of the job.
### Request Example
```
GET /api?mode=history&limit=10&status=Completed
```
### Response Example
```json
{
"history": {
"noofslots": 220,
"ppslots": 1,
"day_size": "1.9 G",
"week_size": "30.4 G",
"month_size": "167.3 G",
"total_size": "678.1 G",
"last_history_update": 1469210913,
"slots": [
{
"action_line": "",
"duplicate_key": "TV.Show/4/2",
"meta": null,
"fail_message": "",
"loaded": false,
"size": "2.3 GB",
"category": "tv",
"pp": "D",
"retry": 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,
"time_added": 1469172000,
"nzo_id": "SABnzbd_nzo_sdkoun",
"downloaded": 2436906376,
"report": "",
"password": "",
"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",
"archive": false,
"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
Age: 550d
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"
]
}
]
}
]
}
}
```
```
--------------------------------
### Full Queue Output
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves detailed information about all jobs in the queue. Supports filtering by start index, limit, category, priority, search term, and NZB IDs.
```APIDOC
## Full Queue output
### Description
Full queue output with details about all jobs.
### Endpoint
`api?mode=queue&start=START&limit=LIMIT&cat=CATEGORY&priority=PRIORITY&search=SEARCH&nzo_ids=NZO_ID_1,NZO_ID_2,NZO_ID_3`
### Parameters
#### Query Parameters
- **start** (integer) - Optional - Index of job to start at
- **limit** (integer) - Optional - Number of jobs to display
- **search** (string) - Optional - Filter job names by search term
- **cat** (string) - Optional - Only return jobs with the specified category or categories (separated by a comma). Use `*` for Default.
- **priority** (string) - Optional - Only return jobs with the specified priority or priorities (separated by a comma).
- `-2` = Paused
- `-1` = Low Priority
- `0` = Normal Priority
- `1` = High Priority
- `2` = Force
- **status** (string) - Optional - Only return jobs with the specified status or statuses (separated by a comma).
- `Downloading`
- `Queued`
- `Paused`
- `Propagating` = Delayed download
- `Fetching` = Job is downloading extra par2 files
- **nzo_ids** (string) - Optional - Only return jobs with these `nzo_ids` (separated by a comma)
### Response Example
```json
{
"queue": {
"status": "Downloading",
"speedlimit": "9",
"speedlimit_abs": "4718592.0",
"paused": false,
"noofslots_total": 2,
"noofslots": 2,
"limit": 10,
"start": 0,
"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": "",
"avg_age": "2895d",
"time_added": 1469172000,
"script": "None",
"direct_unpack": "10/30",
"mb": "1277.65",
"mbleft": "1271.59",
"mbmissing": "0.0",
"size": "1.2 GB",
"sizeleft": "1.2 GB",
"filename": "TV.Show.S04E11.720p.HDTV.x264",
"labels": [],
"priority": "Normal",
"cat": "tv",
"timeleft": "0:16:44",
"percentage": "0",
"nzo_id": "SABnzbd_nzo_p86tgx",
"unpackopts": "3"
},
{
"status": "Paused",
"index": 1,
"password": "",
"avg_age": "2895d",
"time_added": 1469171000,
"script": "None",
"direct_unpack": null,
"mb": "1277.76",
"mbleft": "1277.76",
"mbmissing": "0.0",
"size": "1.2 GB",
"sizeleft": "1.2 GB",
"filename": "TV.Show.S04E12.720p.HDTV.x264",
"labels": [
"TOO LARGE",
"DUPLICATE"
],
"priority": "Normal",
"cat": "tv",
"timeleft": "0:00:00",
"percentage": "0",
"nzo_id": "SABnzbd_nzo_ksfai6",
"unpackopts": "3"
}
],
"diskspace1": "161.16",
"diskspace2": "161.16",
"diskspacetotal1": "465.21",
"diskspacetotal2": "465.21",
"diskspace1_norm": "161.2 G",
"diskspace2_norm": "161.2 G",
"have_warnings": "0",
"pause_int": "0",
"left_quota": "0 ",
"version": "3.x.x",
"finish": 2,
"cache_art": "16",
"cache_size": "6 MB",
"finishaction": null,
"paused_all": false,
"quota": "0 ",
"have_quota": false,
}
}
```
```
--------------------------------
### SABnzbd API Warnings Response
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Example JSON response structure for the 'api?mode=warnings' endpoint, detailing warning text, type, and timestamp.
```json
{
"warnings": [
{
"text": "API key missing, please enter the API key from Config->General into your 3rd party program",
"type": "WARNING",
"time": 1505153489
},
{
"text": "Thread 3@news.powerusenet.com:119: login failed",
"type": "ERROR",
"time": 1505139501
}
]
}
```
--------------------------------
### SABnzbd API Translation Response
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Example JSON response for the 'api?mode=translate' endpoint, showing the translated value.
```json
{
"value": "Bewaakte map"
}
```
--------------------------------
### Get files in job
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves a list of files associated with a specific download job, identified by its nzo_id. Includes file status, size, and age.
```APIDOC
## Get files in job
### Description
Get files of job with `nzo_id`.
### Method
GET
### Endpoint
`/api?mode=get_files&value=`
### Parameters
#### Query Parameters
- **mode** (string) - Required - `get_files`
- **value** (string) - Required - The `nzo_id` of the job.
### Response
#### Success Response (200)
- **files** (array) - A list of file objects.
- **status** (string) - The status of the file (e.g., `finished`, `active`, `queued`).
- **mbleft** (string) - Megabytes remaining for the file.
- **mb** (string) - Total megabytes of the file.
- **age** (string) - Age of the file.
- **bytes** (string) - Size of the file in bytes.
- **filename** (string) - The name of the file.
- **nzf_id** (string) - The unique identifier for the file within SABnzbd.
- **set** (string) - The set identifier for `.par2` files.
### Response Example
```json
{
"files": [
{
"status": "finished",
"mbleft": "0.00",
"mb": "0.05",
"age": "25d",
"bytes": "52161.00",
"filename": "93a4ec7c37752640deab48dabb46b164.par2",
"nzf_id": "SABnzbd_nzf_1lk0ij"
},
{
"status": "active",
"mbleft": "20.58",
"mb": "98.50",
"age": "25d",
"bytes": "103287413.00",
"filename": "93a4ec7c37752640deab48dabb46b164.01",
"nzf_id": "SABnzbd_nzf_zgx_gg"
},
{
"status": "queued",
"set": "93a4ec7c37752640deab48dabb46b164",
"mbleft": "3.13",
"mb": "3.13",
"age": "25d",
"bytes": "3279083.00",
"filename": "93a4ec7c37752640deab48dabb46b164.vol000+02.par2",
"nzf_id": "SABnzbd_nzf_ee63r6"
}
]
}
```
```
--------------------------------
### Get Status Information
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieves all available status information from SABnzbd. Optional parameters `skip_dashboard` and `calculate_performance` can be used to modify the output.
```APIDOC
## GET /api
### Description
Retrieves all status information available from SABnzbd. This endpoint provides details about the system's status, including network information, disk usage, and OS details. It can be customized with `skip_dashboard` to skip dashboard-specific data and `calculate_performance` to include performance metrics.
### Method
GET
### Endpoint
/api
### Query Parameters
- **mode** (string) - Required - Set to `status` to retrieve status information.
- **skip_dashboard** (integer) - Optional - If set to `1`, the public IPv4 address retrieval will be skipped.
- **calculate_performance** (integer) - Optional - If set to `1`, performance measures will be calculated and included.
### Response
#### Success Response (200)
- **status** (object) - Contains various status details including local IP, public IP, DNS lookup status, folders, CPU model, Pystone, load average, download/complete directories and their speeds, log file paths, OS information (nt, darwin), configuration details, uptime, color scheme, active language, restart status, power options, and server connection details.
### Response Example
```json
{
"status": {
"localipv4": "192.168.0.1",
"ipv6": null,
"publicipv4": "46.00.00.103",
"dnslookup": "OK",
"folders": [
"Lost.Folder.BRRip.x264.1080p"
],
"cpumodel": "Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz",
"pystone": 88738,
"loadavg": "",
"downloaddir": "C:\\SABnzbd",
"downloaddirspeed": 0,
"completedir": "C:\\Users\\xxx\\Videos\\Complete",
"completedirspeed": 0,
"loglevel": "0",
"logfile": "C:\\Users\\xxx\\AppData\\Local\\sabnzbd\\logs\\sabnzbd.log",
"configfn": "C:\\Users\\xxx\\AppData\\Local\\sabnzbd\\sabnzbd.ini",
"nt": true,
"darwin": false,
"confighelpuri": "https://sabnzbd.org/wiki/configuration/5.0/",
"uptime": "3h",
"color_scheme": "Default",
"webdir": "C:\\Program Files\\SABnzbd\\interfaces\\Glitter\\templates",
"active_lang": "en",
"restart_req": false,
"power_options": true,
"pp_pause_event": false,
"pid": 123,
"weblogfile": null,
"new_release": false,
"new_rel_url": null,
"have_warnings": "0",
"warnings": [],
"servers": [
{
"servername": "Frugal",
"servertotalconn": 25,
"serverssl": 0,
"serveractiveconn": 25,
"serveroptional": 0,
"serveractive": true,
"servererror": "",
"serverpriority": 0,
"serverbps": "11.1 M",
"serverconnections": [
{
"thrdnum": 1,
"nzo_name": "Movie.BRRip.x264.1080p",
"nzf_name": "93a4ec7c37752640deab48dabb46b164.01",
"art_name": "1467157804579212986$gps@gopoststuff"
},
{
"thrdnum": 2,
"nzo_name": "Movie.BRRip.x264.1080p",
"nzf_name": "93a4ec7c37752640deab48dabb46b164.02",
"art_name": "1467157807935349477$gps@gopoststuff"
},
{
"thrdnum": 3,
"nzo_name": "Movie.BRRip.x264.1080p",
"nzf_name": "93a4ec7c37752640deab48dabb46b164.03",
"art_name": "1467157811461680159$gps@gopoststuff"
}
]
},
{
"servername": "Nextgennews",
"servertotalconn": 15,
"serverssl": 0,
"serveractiveconn": 0,
"serveroptional": 0,
"serveractive": true,
"servererror": "",
"serverpriority": 1,
"serverbps": "0 ",
"serverconnections": []
}
]
}
}
```
```
--------------------------------
### Get Files in Job API
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Retrieve a list of files associated with a specific download job using its NZO ID. The response includes file status, size, age, and name.
```http
api?mode=get_files&value=NZO_ID
```
--------------------------------
### Set Server Configuration via API
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Use this endpoint to set or add server configurations. The 'name' parameter must match an existing server name in `sabnzbd.ini` or it will be added as a new server.
```bash
api?mode=set_config§ion=servers&name=SERVER_NAME&username=VALUE_1&connections=VALUE_2
```
--------------------------------
### Action on queue complete
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Set an end-of-queue action to control PC power states or run a script.
```APIDOC
## Action on queue complete True/False
Set an end-of-queue action
```
api?mode=queue&name=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`.
```
--------------------------------
### Set Category Configuration via API
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Use this endpoint to set or add category configurations. The 'name' parameter must match an existing category name in `sabnzbd.ini` or it will be added as a new category.
```bash
api?mode=set_config§ion=categories&name=CATEGORY_NAME&dir=CATEGORY_DIR
```
--------------------------------
### Get Job Position After Priority Change
Source: https://sabnzbd.org/wiki/configuration/4.5/api
This JSON response indicates the new position of a job in the queue after its priority has been modified.
```json
{
"position": 42
}
```
--------------------------------
### Set End-of-Queue Action
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Configure an action to be performed when the download queue is complete. Available actions include PC power states or running custom scripts.
```api
api?mode=queue&name=change_complete_action&value=ACTION
```
--------------------------------
### Queue Functions
Source: https://sabnzbd.org/wiki/configuration/4.5/api
Functions for managing the download queue, including viewing, pausing, resuming, and modifying jobs.
```APIDOC
## Queue Functions
### Description
Functions for managing the download queue, including viewing, pausing, resuming, and modifying jobs.
### Functions
- **queue**: Full Queue output.
- **pause (queue)**: Pause whole queue.
- **resume (queue)**: Resume whole queue.
- **speedlimit**: Set speedlimit.
- **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_cat**: 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.
- **move_nzf_bulk**: Move file(s) inside a job.
- **delete_nzf**: Remove file(s) from a job.
```