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

Change settings

Admins only.

PATCH/settings
Authorization
AuthorizationBearer token · headerrequired

An API key, pm_....

or
piecemeal_sessionAPI key · cookierequired
Request body
requiredapplication/json
addStoppedboolean

Add new torrents stopped.

altDownloadLimitinteger<int64>

Alternative download limit, used while altSpeedEnabled is on.

min 0
altSpeedEnabledboolean

Use the alternative limits.

altSpeedScheduleboolean

Turn the alternative limits on and off on a schedule.

altSpeedScheduleDaysstring

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

Allowed:everyDayweekdaysweekendsmondaytuesdaywednesdaythursdayfridaysaturdaysunday
altSpeedScheduleFromstring

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

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

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>

Alternative upload limit, used while altSpeedEnabled is on.

min 0
autoManagementboolean

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

bannedIPsstring

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

defaultSavePathstring

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

dhtboolean

Use the DHT to find peers.

dontCountSlowTorrentsboolean

Slow torrents don't count toward the limits.

downloadLimitinteger<int64>

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

min 0
encryptionstring

Peer connection encryption: prefer, require or disable.

Allowed:preferrequiredisable
inactiveSeedingTimeLimitinteger<int64>

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

incompletePathstring

Where incomplete torrents are kept while incompletePathEnabled is on.

incompletePathEnabledboolean

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

ipFilterEnabledboolean

Refuse peers in the ranges of the IP filter file.

ipFilterPathstring

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

maxActiveCheckingTorrentsinteger<int64>

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

min 1
maxActiveDownloadsinteger<int64>

Torrents downloading at once, -1 for unlimited.

min -1
maxActiveTorrentsinteger<int64>

Torrents running at once, -1 for unlimited.

min -1
maxActiveUploadsinteger<int64>

Torrents seeding at once, -1 for unlimited.

min -1
maxConnectionsPerTorrentinteger<int64>

Established peer connections per torrent.

min 1
maxHalfOpenConnectionsinteger<int64>

Outgoing connection attempts in progress, across all torrents.

min 1
peerPortinteger<int64>

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

min 0 · max 65535
pexboolean

Exchange peers with other peers.

proxyBitTorrentboolean

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.

proxyHoststring

The proxy server's hostname or IP address.

proxyHostnameLookupboolean

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.

proxyPasswordstring

The password for the proxy. Write-only: reads return an empty string, and an empty value leaves the password as it is. Clearing proxyUsername clears it.

max length 255
proxyPeerConnectionsboolean

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>

The proxy server's port.

min 0 · max 65535
proxyRSSboolean

Fetch RSS feeds through the proxy.

proxyTorrentFilesboolean

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.

proxyTypestring

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

Allowed:nonesocks5http
proxyUsernamestring

The username for the proxy, empty for none.

max length 255
queueingEnabledboolean

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

ratioLimitnumber<double>

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

relocateOnCategoryChangeboolean

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.

relocateOnCategoryPathChangeboolean

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.

relocateOnDefaultPathChangeboolean

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.

rssAutoDownloadboolean

Add torrents from new articles that RSS rules match.

rssDownloadRepacksboolean

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

rssEnabledboolean

Fetch RSS feeds on their schedule.

rssFetchDelayinteger<int64>

Seconds between requests to the same host.

min 0
rssMaxArticlesinteger<int64>

Articles kept per feed; older ones are dropped.

min 0
rssRefreshIntervalinteger<int64>

Minutes between fetches of a feed without its own interval.

min 1
rssSmartEpisodeFiltersstring

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.

seedGoalActionstring

What to do once a torrent reaches its seeding goals.

Allowed:stopremoveremoveWithData
seedGoalModestring

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

Allowed:anyall
seedingTimeLimitinteger<int64>

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

slowDownloadRateinteger<int64>

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

min 0
slowTorrentTimeinteger<int64>

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

min 0
slowUploadRateinteger<int64>

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

min 0
uploadLimitinteger<int64>

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

min 0
utpboolean

Use uTP as well as TCP for peer connections.

Responses
200

OK

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.

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 PATCH 'https://piecemeal.example.com/api/piecemeal/v1/settings' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "addStopped": true,
  "altDownloadLimit": 0,
  "altSpeedEnabled": true,
  "altSpeedSchedule": true,
  "altSpeedScheduleDays": "everyDay",
  "altSpeedScheduleFrom": "string",
  "altSpeedScheduleTo": "string",
  "altUploadLimit": 0,
  "autoManagement": true,
  "bannedIPs": "string",
  "defaultSavePath": "string",
  "dht": true,
  "dontCountSlowTorrents": true,
  "downloadLimit": 0,
  "encryption": "prefer",
  "inactiveSeedingTimeLimit": 0,
  "incompletePath": "string",
  "incompletePathEnabled": true,
  "ipFilterEnabled": true,
  "ipFilterPath": "string",
  "maxActiveCheckingTorrents": 1,
  "maxActiveDownloads": -1,
  "maxActiveTorrents": -1,
  "maxActiveUploads": -1,
  "maxConnectionsPerTorrent": 1,
  "maxHalfOpenConnections": 1,
  "peerPort": 0,
  "pex": true,
  "proxyBitTorrent": true,
  "proxyHost": "string",
  "proxyHostnameLookup": true,
  "proxyPassword": "string",
  "proxyPeerConnections": true,
  "proxyPort": 0,
  "proxyRSS": true,
  "proxyTorrentFiles": true,
  "proxyType": "none",
  "proxyUsername": "string",
  "queueingEnabled": true,
  "ratioLimit": 0.1,
  "relocateOnCategoryChange": true,
  "relocateOnCategoryPathChange": true,
  "relocateOnDefaultPathChange": true,
  "rssAutoDownload": true,
  "rssDownloadRepacks": true,
  "rssEnabled": true,
  "rssFetchDelay": 0,
  "rssMaxArticles": 0,
  "rssRefreshInterval": 1,
  "rssSmartEpisodeFilters": "string",
  "seedGoalAction": "stop",
  "seedGoalMode": "any",
  "seedingTimeLimit": 0,
  "slowDownloadRate": 0,
  "slowTorrentTime": 0,
  "slowUploadRate": 0,
  "uploadLimit": 0,
  "utp": true
}'
Response
{
  "locked": {
    "property1": "string",
    "property2": "string"
  },
  "proxyPasswordSet": true,
  "settings": {
    "addStopped": true,
    "altDownloadLimit": 0,
    "altSpeedEnabled": true,
    "altSpeedSchedule": true,
    "altSpeedScheduleDays": "everyDay",
    "altSpeedScheduleFrom": "string",
    "altSpeedScheduleTo": "string",
    "altUploadLimit": 0,
    "autoManagement": true,
    "bannedIPs": "string",
    "defaultSavePath": "string",
    "dht": true,
    "dontCountSlowTorrents": true,
    "downloadLimit": 0,
    "encryption": "prefer",
    "inactiveSeedingTimeLimit": 0,
    "incompletePath": "string",
    "incompletePathEnabled": true,
    "ipFilterEnabled": true,
    "ipFilterPath": "string",
    "maxActiveCheckingTorrents": 1,
    "maxActiveDownloads": -1,
    "maxActiveTorrents": -1,
    "maxActiveUploads": -1,
    "maxConnectionsPerTorrent": 1,
    "maxHalfOpenConnections": 1,
    "peerPort": 0,
    "pex": true,
    "proxyBitTorrent": true,
    "proxyHost": "string",
    "proxyHostnameLookup": true,
    "proxyPeerConnections": true,
    "proxyPort": 0,
    "proxyRSS": true,
    "proxyTorrentFiles": true,
    "proxyType": "none",
    "proxyUsername": "string",
    "queueingEnabled": true,
    "ratioLimit": 0.1,
    "relocateOnCategoryChange": true,
    "relocateOnCategoryPathChange": true,
    "relocateOnDefaultPathChange": true,
    "rssAutoDownload": true,
    "rssDownloadRepacks": true,
    "rssEnabled": true,
    "rssFetchDelay": 0,
    "rssMaxArticles": 0,
    "rssRefreshInterval": 1,
    "rssSmartEpisodeFilters": "string",
    "seedGoalAction": "stop",
    "seedGoalMode": "any",
    "seedingTimeLimit": 0,
    "slowDownloadRate": 0,
    "slowTorrentTime": 0,
    "slowUploadRate": 0,
    "uploadLimit": 0,
    "utp": true
  }
}

Was this page helpful?