Skip to content

Compare: WebUI API (qBittorrent 4.1)

Showing with 12 additions and 2 deletions.
  1. +12 −2 WebUI-API-(qBittorrent-4.1).md
14 changes: 12 additions & 2 deletions WebUI-API-(qBittorrent-4.1).md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This WebUI API documentation applies to qBittorrent v4.1+. For other WebUI API v
1. [API v2.7.0](#api-v270)
1. [API v2.8.0](#api-v280)
1. [API v2.8.1](#api-v281)
1. [API v2.8.2](#api-v282)
1. [General information](#general-information)
1. [Authentication](#authentication)
1. [Login](#login)
Expand Down Expand Up @@ -208,6 +209,10 @@ Note that this change was released in qBittorrent v4.3.3, but the WebAPI version
- Added `ratioLimit` and `seedingTimeLimit` optional fields to `/torrents/add` ([#14519](https://github.com/qbittorrent/qBittorrent/pull/14519))
- Added `seeding_time` field to `/torrents/info` ([#14554](https://github.com/qbittorrent/qBittorrent/pull/14554))

## API v2.8.2 ##
- Added `indexes` optional parameter to `/torrents/files` ([#14795](https://github.com/qbittorrent/qBittorrent/pull/14795))
- Added `index` field to `/torrents/files` response ([#14795](https://github.com/qbittorrent/qBittorrent/pull/14795))

# General Information #

- All API methods are under `/api/v2/APIName/methodName`, where `APIName` is a certain subgroup of API methods whose functionality is related.
Expand Down Expand Up @@ -1567,6 +1572,7 @@ Name: `files`
Parameter | Type | Description
----------|--------|------------
`hash` | string | The hash of the torrent you want to get the contents of
`indexes` | string | The indexes of the files you want to retrieve. `indexes` can contain multiple values separated by `\|`.

**Returns:**

Expand All @@ -1582,6 +1588,7 @@ The response is:

Property | Type | Description
---------------|---------------|-------------
`index` | string | File index
`name` | string | File name (including relative path)
`size` | integer | File size (bytes)
`progress` | float | File progress (percentage/100)
Expand All @@ -1605,6 +1612,7 @@ Example:

[
{
"index":0,
"is_seed":false,
"name":"debian-8.1.0-amd64-CD-1.iso",
"piece_range":[0,1253],
Expand Down Expand Up @@ -2096,9 +2104,11 @@ Parameter | Type | Description
----------------------------------|---------|------------
`hash` | string | The hash of the torrent
`id` | string | File ids, separated by `\|`
`priority` | number | File priority to set
`priority` | number | File priority to set (consult [torrent contents API](#get-torrent-contents) for possible values)

`id` values correspond to file position inside the array returned by [torrent contents API](#get-torrent-contents), e.g. `id=0` for first file, `id=1` for second file, etc.

Please consult the [torrent contents API](#get-torrent-contents) for possible `priority` values. `id` values coresspond to contents returned by [torrent contents API](#get-torrent-contents), e.g. `id=0` for first file, `id=1` for second file, etc.
Since 2.8.2 it is reccomended to use `index` field returned by [torrent contents API](#get-torrent-contents) (since the files can be filtered and the `index` value may differ from the position inside the response array).

**Returns:**

Expand Down