diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-24 17:56:02 (GMT) |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-24 20:55:42 (GMT) |
commit | e0d453a3a2c120264b13c44f004025b0330547a8 (patch) | |
tree | 4517a7e8f3100f1f75b4cecd68486b42d4f7f0df /REST-API | |
parent | fae0aa58c19a1918e7b7750b4862e2abcbc55788 (diff) | |
download | soup-transcoding-proxy-e0d453a3a2c120264b13c44f004025b0330547a8.zip soup-transcoding-proxy-e0d453a3a2c120264b13c44f004025b0330547a8.tar.gz |
Implement concurrent RTP-UDP streams, and a REST API for status and auth
When the --token-server=ADDR/MASK argument is passed to the server, the token
verification framework is enabled, and the specified subnet is allowed to access
the REST API to add/revoke/list tokens that allow clients to connect, and to
list/abort streams running on the server.
Details about the REST API are documented in the file "REST-API".
There were also some organisational and name changes in the code.
Diffstat (limited to 'REST-API')
-rw-r--r-- | REST-API | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/REST-API b/REST-API new file mode 100644 index 0000000..ec1c2ca --- /dev/null +++ b/REST-API @@ -0,0 +1,49 @@ +The server now implements two REST APIs: + +1) A token-based validation API for clients that want to stream +2) A simple API to list or abort streams running on the server + + +Token-based Validation: +======================= + +The server maintains a hash table of (sessionid, udp-host, udp-port) tuples +against which incoming (HTTP PUT/POST) and outgoing (HTTP GET) streams are +validated. The following API is available to manipulate this table: + +Adding Tokens: +-------------- + +> Adding a token for an HTTP stream + POST http://[host]:8000/add-token?type=http&sessionid=[sessionid] + +> Adding a token for an RTP-UDP stream on host:port + POST http://[host]:8000/add-token?type=rtp-udp&sessionid=[sessionid]&udp-clients=[host]:[port] + +> Adding a token for an HTTP stream and RTP-UDP streams on host1:port1,host2:port2 + POST http://[host]:8000/add-token?type=http,rtp-udp&sessionid=[sessionid]&udp-clients=[host1]:[port1],[host2]:[port2] + +Revoking Tokens: +---------------- + +> Revoking a token + DELETE http://[host]:8000/revoke-token?sessionid=[sessionid] + +Listing Tokens: +---------------- + +> Listing all tokens + GET http://[host]:8000/list-tokens + +This will return a JSON array of dicts with the "sessionid", "host", and "port" +for each token. + + +Listing and Aborting Running Streams: +===================================== + +> Listing all streams + GET http://[host]:8000/list-streams + +> Aborting a running stream + DELETE http://[host]:8000/abort-stream?sessionid=[sessionid] |