-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Bittorrent Sync provides an API though a local HTTP server. This allows you to request data about the current status of Bittorrent Sync and issue commeands. The Web UI uses this API, as does btsyncindicator. The API is undocumented, so this documentation was created from my observations using Firebug.
The API can be used by sending a GET request to the root URL of the Web UI running on the HTTP server with a query string containing a token, the requested action, and any additional parameters. Each action returns a JSON object.
Before any actions can be requested, the session must be initialised. This process provides a session cookie and token that must be sent with any subsequent action requests.
- Send a POST request to
http://localhost:8888/gui/token.html
(where localhost:8888 is the listen address in your Bittorrent Sync configuration). - The response will contain
<html><div id='token'>random string here</div></html>
. Extract the random string, this is your token. - The response will also contain a cookie called GUID. This is your session cookie, which must be sent with all HTTP requests in this session.
Documentation for actions marked * is incomplete