added some simple docs for the tunnel API

This commit is contained in:
tigerbot 2017-08-09 18:30:18 -06:00
förälder 66e9ecd2bf
incheckning b65697ea74

20
API.md
Visa fil

@ -7,6 +7,26 @@ admin.invalid
localhost.admin.daplie.me
```
All requests require an OAuth3 token in the request headers.
## Tunnel
### Check Status
* **URL** `/api/goldillocks@daplie.com/tunnel`
* **Method** `POST`
* **Reponse**: An object whose keys are the URLs for the tunnels, and whose
properties are arrays of the tunnel tokens.
This route with return only the sessions started by the same user who is
checking the status.
### Start Tunnel
* **URL** `/api/goldillocks@daplie.com/tunnel`
* **Method** `POST`
This route will use the stored token for the user matching the request
header to request a tunnel token from the audience of the stored token.
## Socks5 Proxy
### Check Status