Create syncthing-event-api(7)
This commit is contained in:
+18
-7
@@ -1,8 +1,11 @@
|
|||||||
Event API
|
Event API
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Syncthing provides a simple long polling interface for exposing events from
|
Description
|
||||||
the core utility towards a GUI.
|
-----------
|
||||||
|
|
||||||
|
Syncthing provides a simple long polling interface for exposing events from the
|
||||||
|
core utility towards a GUI.
|
||||||
|
|
||||||
To receive events, perform a HTTP GET of ``/rest/events?since=<lastSeenID>``,
|
To receive events, perform a HTTP GET of ``/rest/events?since=<lastSeenID>``,
|
||||||
where ``<lastSeenID>`` is the ID of the last event you've already seen or zero.
|
where ``<lastSeenID>`` is the ID of the last event you've already seen or zero.
|
||||||
@@ -36,12 +39,20 @@ Each event is represented by an object similar to the following::
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
The top level keys ``id``, ``time``, ``type`` and ``data`` are always present, though ``data`` may be ``null``.
|
The top level keys ``id``, ``time``, ``type`` and ``data`` are always present,
|
||||||
|
though ``data`` may be ``null``.
|
||||||
|
|
||||||
* ``id`` is a monotonically increasing integer. The first event generated has id ``1``, the next has id ``2`` etc.
|
id
|
||||||
* ``time`` is the time the event was generated.
|
A monotonically increasing integer. The first event generated has id ``1``,
|
||||||
* ``type`` indicates the type of (i.e. reason for) the event and is one of the event types below.
|
the next has id ``2`` etc.
|
||||||
* ``data`` is an object containing optional extra information; the exact structure is determined by the event type.
|
time
|
||||||
|
The time the event was generated.
|
||||||
|
type
|
||||||
|
Indicates the type of (i.e. reason for) the event and is one of the event
|
||||||
|
types below.
|
||||||
|
data
|
||||||
|
An object containing optional extra information; the exact structure is
|
||||||
|
determined by the event type.
|
||||||
|
|
||||||
Events
|
Events
|
||||||
------
|
------
|
||||||
|
|||||||
Reference in New Issue
Block a user