Skip to content

Websockets Diff

Dr. Daniel Alexander Smith edited this page Jul 29, 2014 · 11 revisions

Basics

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.

Fields

  • 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 the start action.

Operations

All diff request frames specify an operation:

  • start - Create a new diff stream, and issues a diffid.

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 (requires diffid).

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 the diffid so it can be reconciled with the diff that was started.

The field data contains the actual diff.

Errors

In the case of an error, a response with success set to false and with a value in an error field will be sent.

Clone this wiki locally