Groups | Search | Server Info | Login | Register


Groups > comp.file-sharing.bittorrent > #108

aria2c(1) JSON-RPC interface

From Ivan Shmakov <ivan@siamics.net>
Newsgroups comp.file-sharing.bittorrent
Subject aria2c(1) JSON-RPC interface
Date 2018-09-16 08:07 +0000
Organization Aioe.org NNTP Server
Message-ID <874lepg91o.fsf@violet.siamics.net> (permalink)

Show all headers | View raw


	After almost a decade of on-and-off use, I've finally learned
	the Aria2 JSON-RPC interface.

	I still consider it a bug that it only provides an AF_INET{6,}
	socket interface.  Arguably, and also for security reasons,
	Unix sockets should also be supported.

	Consider, e. g.:

$ curl --silent --data '{
      "jsonrpc": "2.0", "id": "1",
      "method": "aria2.getGlobalStat", "params": []
  }' -- http://ip6-localhost:38534/jsonrpc ; printf \\n 
{"id":"1","jsonrpc":"2.0",
 "result":{
  "downloadSpeed":"0","numActive":"4","numStopped":"1",
  "numStoppedTotal":"1","numWaiting":"0","uploadSpeed":"0"}}
$ curl --silent --data '{
      "jsonrpc": "2.0", "id": "1",
      "method": "aria2.tellActive", "params": [ [
          "gid", "infoHash", "totalLength", "uploadLength",
          "uploadSpeed", "status", "numSeeders", "connections"
      ] ]
  }' -- http://ip6-localhost:38534/jsonrpc ; printf \\n 
{"id":"1","jsonrpc":"2.0",
 "result":[
  {"connections":"1","gid":"879f781e664fdb6c",
   "infoHash":"2e636b6583e04dbe7e9d4490e43b9eb2fb855c9c",
   "numSeeders":"0","status":"active","totalLength":"1176185140",
   "uploadLength":"39043072","uploadSpeed":"0"},
  ...]}
$ 

PS.  And curl(1) should also support the --OPTION=VALUE GNU convention, IMO.

-- 
FSF associate member #7257  np. Rambo (in game theme) -- Johan Andersson

Back to comp.file-sharing.bittorrent | Previous | Next | Find similar


Thread

aria2c(1) JSON-RPC interface Ivan Shmakov <ivan@siamics.net> - 2018-09-16 08:07 +0000

csiph-web