Skip to content
piecemeal
Esc
↑↓navigate↵open⌘Jpreview

List torrents

GET/torrents
Authorization
AuthorizationBearer token · headerrequired

An API key, pm_....

or
piecemeal_sessionAPI key · cookierequired
Query parameters
filterstring
default: "all"
Allowed:alldownloadingseedingcompletedstoppedactiveinactivestalledcheckingerrored
categorystring

Only torrents in this category.

uncategorizedboolean

Only torrents without a category.

tagstring

Only torrents with this tag.

untaggedboolean

Only torrents without tags.

searchstring

Only torrents whose name contains this, ignoring case.

hashesstring[]

Only these torrents.

sortstring
default: "addedAt"
Allowed:nameaddedAtcompletedAtsizeprogressstatedownloadRateuploadRateetaratioseedspeerscategoryuploadeddownloaded
reverseboolean
limitinteger<int64>

Page size; 0 returns everything.

min 0 · max 10000
cursorstring

nextCursor from the previous page.

Responses
200

OK

itemsTorrent[] | nullrequired
Show properties
Array of Torrent
activeTimeinteger<int64>required

Seconds spent running, all time.

addedAtinteger<int64>required

Unix time.

autoManagedbooleanrequired

Automatic management: the save path and incomplete folder follow the category.

categorystringrequired
commentstringrequired
completebooleanrequired

Every wanted file is downloaded.

completedinteger<int64>required

Wanted bytes downloaded and verified.

completedAtinteger<int64>required

Unix time, 0 if never completed.

contentLayoutstringrequired
Allowed:OriginalSubfolderNoSubfolder
contentPathstringrequired

The torrent's file, or its top folder, or the save path when its files share no folder.

createdAtinteger<int64>required

Unix time the torrent was created, 0 if unknown.

createdBystringrequired
downloadRateinteger<int64>required

Bytes per second.

downloadedinteger<int64>required

Payload bytes downloaded, all time.

errorstring
etainteger<int64>required

Seconds until complete, -1 when unknown.

firstLastPiecebooleanrequired
forcedbooleanrequired
hasMetadatabooleanrequired
hashstringrequired

SHA-1 infohash, hex.

inactiveSeedingTimeLimitinteger<int64>required

Minutes. -2 follows the category, then the global setting; -1 is unlimited.

incompletePathstringrequired

Where the data stays until the torrent completes, then it moves to savePath; empty for none.

lastActivityAtinteger<int64>required

Unix time of the last payload transfer, 0 if none.

magnetstringrequired
multiFilebooleanrequired

The torrent's files are in a root folder, even if there is only one.

namestringrequired
peersinteger<int64>required

Connected peers that are not seeds.

pieceSizeinteger<int64>required
piecesinteger<int64>required
piecesHaveinteger<int64>required
privatebooleanrequired
progressnumber<double>required

Fraction of the wanted bytes downloaded, 0 to 1.

queuePositioninteger<int64>required
rationumber<double>required
ratioLimitnumber<double>required

-2 follows the category, then the global setting; -1 is unlimited.

rootPathstringrequired

The torrent's top folder, empty when it has none.

savePathstringrequired

Where the torrent's data goes; while it's incomplete, it may be in incompletePath instead.

seedGoalActionstringrequired

What happens when the torrent reaches its seeding goals; default follows the category, then the global setting.

Allowed:defaultstopremoveremoveWithData
seedGoalModestringrequired

Whether any goal or all of them must be met; default follows the category, then the global setting.

Allowed:defaultanyall
seedGoalsSeedGoalsrequired

The seeding goals in effect, after following the defaults.

Show properties
actionstringrequired
Allowed:stopremoveremoveWithData
inactiveSeedingTimeLimitinteger<int64>required

Minutes.

modestringrequired
Allowed:anyall
ratioLimitnumber<double>required
seedingTimeLimitinteger<int64>required

Minutes.

seedingTimeinteger<int64>required

Seconds spent seeding, all time.

seedingTimeLimitinteger<int64>required

Minutes. -2 follows the category, then the global setting; -1 is unlimited.

seedsinteger<int64>required

Connected seeds.

sequentialbooleanrequired
sessionDownloadedinteger<int64>required

Payload bytes downloaded since piecemeal started.

sessionUploadedinteger<int64>required

Payload bytes uploaded since piecemeal started.

sizeinteger<int64>required

Bytes in the wanted files.

statestringrequired
Allowed:metadatacheckingqueuedForCheckingdownloadingstalledDownloadingseedingstalledSeedingstoppedqueuedmovingerror
stoppedbooleanrequired
swarmPeersinteger<int64>required

Peers known in the swarm.

tagsstring[] | nullrequired
totalSizeinteger<int64>required

Bytes in all files.

trackerstringrequired

The first tracker's URL.

trackersinteger<int64>required

Number of trackers.

uploadRateinteger<int64>required

Bytes per second.

uploadedinteger<int64>required

Payload bytes uploaded, all time.

nextCursorstring

Pass as cursor to get the next page; absent on the last page.

totalinteger<int64>required

Torrents matching the filters, across all pages.

401

Unauthorized

detailstring

A human-readable explanation specific to this occurrence of the problem.

errorsErrorDetail[] | null

Optional list of individual error details

Show properties
Array of ErrorDetail
locationstring

Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'

messagestring

Error message text

valueany

The value at the given location

instancestring<uri>

A URI reference that identifies the specific occurrence of the problem.

statusinteger<int64>

HTTP status code

titlestring

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

typestring<uri>

A URI reference to human-readable documentation for the error.

default: "about:blank"
403

Forbidden

detailstring

A human-readable explanation specific to this occurrence of the problem.

errorsErrorDetail[] | null

Optional list of individual error details

Show properties
Array of ErrorDetail
locationstring

Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'

messagestring

Error message text

valueany

The value at the given location

instancestring<uri>

A URI reference that identifies the specific occurrence of the problem.

statusinteger<int64>

HTTP status code

titlestring

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

typestring<uri>

A URI reference to human-readable documentation for the error.

default: "about:blank"
422

Unprocessable Entity

detailstring

A human-readable explanation specific to this occurrence of the problem.

errorsErrorDetail[] | null

Optional list of individual error details

Show properties
Array of ErrorDetail
locationstring

Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'

messagestring

Error message text

valueany

The value at the given location

instancestring<uri>

A URI reference that identifies the specific occurrence of the problem.

statusinteger<int64>

HTTP status code

titlestring

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

typestring<uri>

A URI reference to human-readable documentation for the error.

default: "about:blank"
500

Internal Server Error

detailstring

A human-readable explanation specific to this occurrence of the problem.

errorsErrorDetail[] | null

Optional list of individual error details

Show properties
Array of ErrorDetail
locationstring

Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'

messagestring

Error message text

valueany

The value at the given location

instancestring<uri>

A URI reference that identifies the specific occurrence of the problem.

statusinteger<int64>

HTTP status code

titlestring

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

typestring<uri>

A URI reference to human-readable documentation for the error.

default: "about:blank"
Request
curl -X GET 'https://piecemeal.example.com/api/piecemeal/v1/torrents' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "items": [
    {
      "activeTime": 0,
      "addedAt": 0,
      "autoManaged": true,
      "category": "string",
      "comment": "string",
      "complete": true,
      "completed": 0,
      "completedAt": 0,
      "contentLayout": "Original",
      "contentPath": "string",
      "createdAt": 0,
      "createdBy": "string",
      "downloadRate": 0,
      "downloaded": 0,
      "error": "string",
      "eta": 0,
      "firstLastPiece": true,
      "forced": true,
      "hasMetadata": true,
      "hash": "string",
      "inactiveSeedingTimeLimit": 0,
      "incompletePath": "string",
      "lastActivityAt": 0,
      "magnet": "string",
      "multiFile": true,
      "name": "string",
      "peers": 0,
      "pieceSize": 0,
      "pieces": 0,
      "piecesHave": 0,
      "private": true,
      "progress": 0.1,
      "queuePosition": 0,
      "ratio": 0.1,
      "ratioLimit": 0.1,
      "rootPath": "string",
      "savePath": "string",
      "seedGoalAction": "default",
      "seedGoalMode": "default",
      "seedGoals": {
        "action": "stop",
        "inactiveSeedingTimeLimit": 0,
        "mode": "any",
        "ratioLimit": 0.1,
        "seedingTimeLimit": 0
      },
      "seedingTime": 0,
      "seedingTimeLimit": 0,
      "seeds": 0,
      "sequential": true,
      "sessionDownloaded": 0,
      "sessionUploaded": 0,
      "size": 0,
      "state": "metadata",
      "stopped": true,
      "swarmPeers": 0,
      "tags": [
        "string"
      ],
      "totalSize": 0,
      "tracker": "string",
      "trackers": 0,
      "uploadRate": 0,
      "uploaded": 0
    }
  ],
  "nextCursor": "string",
  "total": 0
}

Was this page helpful?