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

List a torrent's connected peers

GET/torrents/{hash}/peers
Authorization
AuthorizationBearer token · headerrequired

An API key, pm_....

or
piecemeal_sessionAPI key · cookierequired
Path parameters
hashstringrequired

Infohash, lowercase hex.

matches ^[0-9a-f]{40}$
Responses
200

OK

itemsPeer[] | nullrequired
Show properties
Array of Peer
addressstringrequired
clientstringrequired
downloadRateinteger<int64>required

Bytes per second from the peer.

downloadedinteger<int64>required

Payload bytes from the peer this session.

encryptionstringrequired

header: obfuscated handshake only; rc4: the whole connection.

Allowed:noneheaderrc4
networkstringrequired

tcp, utp, webrtc or webseed.

progressnumber<double>required

How much of the torrent the peer has, 0 to 1.

sourcestringrequired

How the peer was found.

uploadRateinteger<int64>required

Bytes per second to the peer.

uploadedinteger<int64>required

Payload bytes to the peer this session.

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/string/peers' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "items": [
    {
      "address": "string",
      "client": "string",
      "downloadRate": 0,
      "downloaded": 0,
      "encryption": "none",
      "network": "string",
      "progress": 0.1,
      "source": "string",
      "uploadRate": 0,
      "uploaded": 0
    }
  ]
}

Was this page helpful?