Skip to content

Latest commit

 

History

History
16 lines (15 loc) · 1.04 KB

REST.md

File metadata and controls

16 lines (15 loc) · 1.04 KB

REST API

Endpoint Description
GET /torrents will return the list of all torrents
GET /torrents/{infoHash} will return one torrent
GET /torrents/{infoHash}/stats will return the torrent stats (speed, bandwidth, etc.)
GET /torrents/{infoHash}/files will return the M3U playlist
GET /torrents/{infoHash}/files/{path} will start streaming the file (honoring the Range header)
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 /torrents will add a new torrent ({"link":"magnet link or URL"})
POST /upload will accept a .torrent file as an attachment (file field in multipart/form-data)
DELETE /torrents/{infoHash} will delete the torrent