REST API

August 26, 2018 ยท View on GitHub

EndpointDescription
GET /torrentswill return the list of all torrents
GET /torrents/{infoHash}will return one torrent
GET /torrents/{infoHash}/archivewill return the ZIP archive
GET /torrents/{infoHash}/fileswill return the M3U playlist
GET /torrents/{infoHash}/files/{path}will start streaming the file (honoring the Range header)
GET /torrents/{infoHash}/statswill return the torrent stats (speed, bandwidth, etc.)
POST /torrents/{infoHash}/pause and
POST /torrents/{infoHash}/resume
will pause/resume the swarm and peer discovery
POST /torrents/{infoHash}/start and
POST /torrents/{infoHash}/stop
will start/stop the download by selecting/deselecting all files
POST /torrents/{infoHash}/start/{index} and
POST /torrents/{infoHash}/stop/{index}
will start/stop downloading a particular file (by index)
POST /torrentswill add a new torrent ({"link":"magnet link or URL"})
POST /uploadwill accept a .torrent file as an attachment (file field in multipart/form-data)
DELETE /torrents/{infoHash}will delete the torrent