-
Notifications
You must be signed in to change notification settings - Fork 6
Websockets Diff
Dr. Daniel Alexander Smith edited this page Jul 29, 2014
·
11 revisions
Requesting a diff stream to start, where a new frame is returned over the websocket whenever a change is made to the box. Use an action
of value diff
in all requests.
-
token
- All diff requests must specify an authenticated token (see Websockets/Auth).
NB: A token is tied to a specific box, so a box is never specified in the protocol.
-
diffid
- The ID of the diff stream, issued by thestart
action.
All diff request frames specify an operation
:
-
start
- Create a new diff stream, and issues adiffid
.
Responds with fields:
success
: true / false (see below).
diffid
: A new UUID issued to this ongoing diff request.
respond_to
: The value is diff/start
.
-
stop
- Stop the diff stream (requiresdiffid
).
Responds with fields:
success
: true / false (see below).
respond_to
: The value is diff/stop
.
-
update
- Used in a response back to a client when a diff is to be sent, the payload is the diff itself, includes thediffid
so it can be reconciled with the diff that was started.
The field data
contains the actual diff.
In the case of an error, a response with success
set to false
and with a value in an error
field will be sent.