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

Stream live changes

Server-sent events. The first event is a snapshot of the torrents, transfer status, categories and tags; the rest are changes to it. When the server drops a slow client the stream ends, and reconnecting starts again from a snapshot.

GET/events
Authorization
AuthorizationBearer token · headerrequired

An API key, pm_....

or
piecemeal_sessionAPI key · cookierequired
Responses
200

OK

Array of object
One of:
object
dataCategoriesEventrequired
Show properties
itemsCategory[] | nullrequired
Show properties
Array of Category
inactiveSeedingTimeLimitinteger<int64>required

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

incompletePathstringrequired

With incompletePathMode on: where the category's incomplete torrents are kept.

incompletePathModestringrequired

The category's incomplete folder: default follows the global setting, off keeps its torrents in their save path, on uses incompletePath.

Allowed:defaultoffon
namestringrequired
ratioLimitnumber<double>required

-2 follows the global setting, -1 is unlimited.

savePathstringrequired

Where torrents in this category are saved. Empty uses the default save path, or for automatically managed torrents a folder named after the category in it.

seedGoalActionstringrequired

What happens when a torrent reaches its seeding goals; default follows the global setting.

Allowed:defaultstopremoveremoveWithData
seedGoalModestringrequired

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

Allowed:defaultanyall
seedingTimeLimitinteger<int64>required

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

eventstringrequired

The event name.

idinteger | string

The event ID.

Show properties
One of:
integer
integer
string
string
retryinteger

The retry time in milliseconds.

object
dataSettingsEventrequired
Show properties
lockedobjectrequired

Settings set by environment variables, which can't be changed here, mapped to the variable.

proxyPasswordSetbooleanrequired

Whether a proxy password is stored. The password itself is never returned.

settingsSettingsrequired
Show properties
addStoppedbooleanrequired

Add new torrents stopped.

altDownloadLimitinteger<int64>required

Alternative download limit, used while altSpeedEnabled is on.

min 0
altSpeedEnabledbooleanrequired

Use the alternative limits.

altSpeedSchedulebooleanrequired

Turn the alternative limits on and off on a schedule.

altSpeedScheduleDaysstringrequired

The days the schedule applies, by the day it starts.

Allowed:everyDayweekdaysweekendsmondaytuesdaywednesdaythursdayfridaysaturdaysunday
altSpeedScheduleFromstringrequired

When the alternative limits start, HH:MM local time.

matches ^([01][0-9]|2[0-3]):[0-5][0-9]$
altSpeedScheduleTostringrequired

When they end, HH:MM local time; earlier than the start means the next day.

matches ^([01][0-9]|2[0-3]):[0-5][0-9]$
altUploadLimitinteger<int64>required

Alternative upload limit, used while altSpeedEnabled is on.

min 0
autoManagementbooleanrequired

New torrents use automatic management, unless the request says otherwise: their save path and incomplete folder follow their category.

bannedIPsstringrequired

Peers to refuse: IP addresses or CIDR ranges, one per line.

defaultSavePathstringrequired

Where torrents are saved when neither the request nor its category names a path.

dhtbooleanrequired

Use the DHT to find peers.

dontCountSlowTorrentsbooleanrequired

Slow torrents don't count toward the limits.

downloadLimitinteger<int64>required

Global download limit in bytes per second, 0 for unlimited.

min 0
encryptionstringrequired

Peer connection encryption: prefer, require or disable.

Allowed:preferrequiredisable
inactiveSeedingTimeLimitinteger<int64>required

Stop seeding after this many minutes without upload, -1 for unlimited.

incompletePathstringrequired

Where incomplete torrents are kept while incompletePathEnabled is on.

incompletePathEnabledbooleanrequired

Keep incomplete torrents in incompletePath; each moves to its save path once complete. A category or a torrent can choose otherwise.

ipFilterEnabledbooleanrequired

Refuse peers in the ranges of the IP filter file.

ipFilterPathstringrequired

An IP filter file: eMule .dat, PeerGuardian .p2p, or one IP address or CIDR range per line.

maxActiveCheckingTorrentsinteger<int64>required

Torrents whose data is checked at once; the rest wait, queued for checking.

min 1
maxActiveDownloadsinteger<int64>required

Torrents downloading at once, -1 for unlimited.

min -1
maxActiveTorrentsinteger<int64>required

Torrents running at once, -1 for unlimited.

min -1
maxActiveUploadsinteger<int64>required

Torrents seeding at once, -1 for unlimited.

min -1
maxConnectionsPerTorrentinteger<int64>required

Established peer connections per torrent.

min 1
maxHalfOpenConnectionsinteger<int64>required

Outgoing connection attempts in progress, across all torrents.

min 1
peerPortinteger<int64>required

Port to accept peers on. NAT-PMP, when configured, overrides it. 0 picks a random port.

min 0 · max 65535
pexbooleanrequired

Exchange peers with other peers.

proxyBitTorrentbooleanrequired

Announce to trackers and download from web seeds through the proxy. UDP trackers need a SOCKS5 proxy that relays UDP, and aren't used otherwise.

proxyHoststringrequired

The proxy server's hostname or IP address.

proxyHostnameLookupbooleanrequired

Let the proxy look up the hostnames of trackers and web seeds, so they aren't looked up locally. UDP trackers are always looked up locally.

proxyPeerConnectionsbooleanrequired

With proxyBitTorrent, connect to peers through the proxy too. The DHT, uTP and WebRTC peers can't go through it, so they are off meanwhile.

proxyPortinteger<int64>required

The proxy server's port.

min 0 · max 65535
proxyRSSbooleanrequired

Fetch RSS feeds through the proxy.

proxyTorrentFilesbooleanrequired

Download torrent files from URLs through the proxy, whether added by URL or by an RSS rule. Addresses on PIECEMEAL_FETCH_ALLOWED_NETWORKS are reached directly.

proxyTypestringrequired

The proxy server's type: none, socks5, or http (an HTTP proxy that allows CONNECT to any port).

Allowed:nonesocks5http
proxyUsernamestringrequired

The username for the proxy, empty for none.

max length 255
queueingEnabledbooleanrequired

Run only a limited number of torrents at a time; the rest wait in the queue.

ratioLimitnumber<double>required

Stop seeding at this upload ratio, -1 for unlimited.

relocateOnCategoryChangebooleanrequired

When an automatically managed torrent's category changes, move its data to the new category's paths. Off switches the torrent to manual management instead.

relocateOnCategoryPathChangebooleanrequired

When a category's save path or incomplete folder changes, move the data of its automatically managed torrents. Off switches them to manual management instead.

relocateOnDefaultPathChangebooleanrequired

When the default save path or the incomplete folder changes, move the data of automatically managed torrents that use it. Off switches them to manual management instead.

rssAutoDownloadbooleanrequired

Add torrents from new articles that RSS rules match.

rssDownloadRepacksbooleanrequired

With the smart episode filter, also take a REPACK or PROPER of an episode already downloaded.

rssEnabledbooleanrequired

Fetch RSS feeds on their schedule.

rssFetchDelayinteger<int64>required

Seconds between requests to the same host.

min 0
rssMaxArticlesinteger<int64>required

Articles kept per feed; older ones are dropped.

min 0
rssRefreshIntervalinteger<int64>required

Minutes between fetches of a feed without its own interval.

min 1
rssSmartEpisodeFiltersstringrequired

Regular expressions, one per line, that find the episode in a title for the smart episode filter: two groups for season and episode, or one for a date.

seedGoalActionstringrequired

What to do once a torrent reaches its seeding goals.

Allowed:stopremoveremoveWithData
seedGoalModestringrequired

Whether a torrent reaches its seeding goals when any one is met, or only when all that are set are.

Allowed:anyall
seedingTimeLimitinteger<int64>required

Stop seeding after this many minutes, -1 for unlimited.

slowDownloadRateinteger<int64>required

A torrent below this download rate, in bytes per second, is slow.

min 0
slowTorrentTimeinteger<int64>required

Seconds a torrent must stay below the slow rates to count as slow.

min 0
slowUploadRateinteger<int64>required

A torrent below this upload rate, in bytes per second, is slow.

min 0
uploadLimitinteger<int64>required

Global upload limit in bytes per second, 0 for unlimited.

min 0
utpbooleanrequired

Use uTP as well as TCP for peer connections.

eventstringrequired

The event name.

idinteger | string

The event ID.

Show properties
One of:
integer
integer
string
string
retryinteger

The retry time in milliseconds.

object
dataSnapshotEventrequired
Show properties
categoriesCategory[] | nullrequired
Show properties
Array of Category
inactiveSeedingTimeLimitinteger<int64>required

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

incompletePathstringrequired

With incompletePathMode on: where the category's incomplete torrents are kept.

incompletePathModestringrequired

The category's incomplete folder: default follows the global setting, off keeps its torrents in their save path, on uses incompletePath.

Allowed:defaultoffon
namestringrequired
ratioLimitnumber<double>required

-2 follows the global setting, -1 is unlimited.

savePathstringrequired

Where torrents in this category are saved. Empty uses the default save path, or for automatically managed torrents a folder named after the category in it.

seedGoalActionstringrequired

What happens when a torrent reaches its seeding goals; default follows the global setting.

Allowed:defaultstopremoveremoveWithData
seedGoalModestringrequired

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

Allowed:defaultanyall
seedingTimeLimitinteger<int64>required

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

tagsstring[] | nullrequired
torrentsTorrent[] | 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.

transferTransferStatusrequired
Show properties
altSpeedEnabledbooleanrequired
connectionstringrequired
Allowed:connectedfirewalleddisconnected
dhtNodesinteger<int64>required
downloadLimitinteger<int64>required

The limit in effect, bytes per second, 0 for unlimited.

downloadRateinteger<int64>required

Bytes per second.

freeSpaceinteger<int64>required

Free bytes on the default save path's filesystem, -1 if unknown.

interfaceInterfaceStatus

The network interface connections are bound to (PIECEMEAL_BIND_INTERFACE), when set.

Show properties
namestringrequired

The interface's name, such as wg0.

upbooleanrequired

False while the interface is down or gone: nothing goes out until it's back.

peersinteger<int64>required

Connected peers across all torrents.

portinteger<int64>required

The port peers connect to.

sessionDownloadedinteger<int64>required

Payload bytes downloaded since piecemeal started.

sessionUploadedinteger<int64>required

Payload bytes uploaded since piecemeal started.

torrentsinteger<int64>required
uploadLimitinteger<int64>required

The limit in effect, bytes per second, 0 for unlimited.

uploadRateinteger<int64>required

Bytes per second.

eventstringrequired

The event name.

idinteger | string

The event ID.

Show properties
One of:
integer
integer
string
string
retryinteger

The retry time in milliseconds.

object
dataTagsEventrequired
Show properties
itemsstring[] | nullrequired
eventstringrequired

The event name.

idinteger | string

The event ID.

Show properties
One of:
integer
integer
string
string
retryinteger

The retry time in milliseconds.

object
dataTorrentsEventrequired
Show properties
removedstring[] | nullrequired
updatedTorrent[] | 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.

eventstringrequired

The event name.

idinteger | string

The event ID.

Show properties
One of:
integer
integer
string
string
retryinteger

The retry time in milliseconds.

object
dataTransferEventrequired
Show properties
altSpeedEnabledbooleanrequired
connectionstringrequired
Allowed:connectedfirewalleddisconnected
dhtNodesinteger<int64>required
downloadLimitinteger<int64>required

The limit in effect, bytes per second, 0 for unlimited.

downloadRateinteger<int64>required

Bytes per second.

freeSpaceinteger<int64>required

Free bytes on the default save path's filesystem, -1 if unknown.

interfaceInterfaceStatus

The network interface connections are bound to (PIECEMEAL_BIND_INTERFACE), when set.

Show properties
namestringrequired

The interface's name, such as wg0.

upbooleanrequired

False while the interface is down or gone: nothing goes out until it's back.

peersinteger<int64>required

Connected peers across all torrents.

portinteger<int64>required

The port peers connect to.

sessionDownloadedinteger<int64>required

Payload bytes downloaded since piecemeal started.

sessionUploadedinteger<int64>required

Payload bytes uploaded since piecemeal started.

torrentsinteger<int64>required
uploadLimitinteger<int64>required

The limit in effect, bytes per second, 0 for unlimited.

uploadRateinteger<int64>required

Bytes per second.

eventstringrequired

The event name.

idinteger | string

The event ID.

Show properties
One of:
integer
integer
string
string
retryinteger

The retry time in milliseconds.

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"
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/events' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/problem+json'
Response
[
  {
    "data": {
      "items": [
        {
          "inactiveSeedingTimeLimit": 0,
          "incompletePath": "string",
          "incompletePathMode": "default",
          "name": "string",
          "ratioLimit": 0.1,
          "savePath": "string",
          "seedGoalAction": "default",
          "seedGoalMode": "default",
          "seedingTimeLimit": 0
        }
      ]
    },
    "event": "categories",
    "id": 0,
    "retry": 0
  }
]

Was this page helpful?