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

Change the speed limits

Changes the global and alternative limits and the alternative speed toggle. Unlike PATCH /settings, any signed-in user may do this.

PATCH/transfer
Authorization
AuthorizationBearer token · headerrequired

An API key, pm_....

or
piecemeal_sessionAPI key · cookierequired
Request body
requiredapplication/json
altDownloadLimitinteger<int64>
min 0
altSpeedEnabledboolean
altUploadLimitinteger<int64>
min 0
downloadLimitinteger<int64>
min 0
uploadLimitinteger<int64>
min 0
Responses
200

OK

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.

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/transfer' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "altDownloadLimit": 0,
  "altSpeedEnabled": true,
  "altUploadLimit": 0,
  "downloadLimit": 0,
  "uploadLimit": 0
}'
Response
{
  "altSpeedEnabled": true,
  "connection": "connected",
  "dhtNodes": 0,
  "downloadLimit": 0,
  "downloadRate": 0,
  "freeSpace": 0,
  "interface": {
    "name": "string",
    "up": true
  },
  "peers": 0,
  "port": 0,
  "sessionDownloaded": 0,
  "sessionUploaded": 0,
  "torrents": 0,
  "uploadLimit": 0,
  "uploadRate": 0
}

Was this page helpful?