.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "SYNCTHING-EVENT-API" "7" "Dec 21, 2023" "v1.27.0" "Syncthing"
.SH NAME
syncthing-event-api \- Event API
.SH DESCRIPTION
.sp
Syncthing provides a simple long polling interface for exposing events from the
core utility towards a GUI. To receive events, see \fI\%GET /rest/events\fP\&.
.SH EVENT STRUCTURE
.sp
Each event is represented by an object similar to the following:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
\(dqid\(dq: 2,
\(dqglobalID\(dq: 3,
\(dqtype\(dq: \(dqDeviceConnected\(dq,
\(dqtime\(dq: \(dq2014\-07\-13T21:04:33.687836696+02:00\(dq,
\(dqdata\(dq: {
\(dqaddr\(dq: \(dq172.16.32.25:22000\(dq,
\(dqid\(dq: \(dqNFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG\(dq
}
}
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The top level keys \fBid\fP, \fBglobalID\fP, \fBtime\fP, \fBtype\fP and \fBdata\fP are always present,
though \fBdata\fP may be \fBnull\fP\&.
.INDENT 0.0
.TP
.B id
A unique ID for this event on the events API. It always increases by 1: the first
event generated has id \fB1\fP, the next has id \fB2\fP etc. If this increases by
more than 1, then one or more events have been skipped by the events API.
.TP
.B globalID
A global ID for this event, across the events API, the audit log, and any other
sources. It may increase by more than 1, but it will always be greater
than or equal to the id.
.TP
.B time
The time the event was generated.
.TP
.B type
Indicates the type of (i.e. reason for) the event and is one of the event
types below.
.TP
.B data
An object containing optional extra information; the exact structure is
determined by the event type.
.UNINDENT
.SH EVENT TYPES
.SS ClusterConfigReceived
.sp
New in version 1.20.0.
.sp
The \fBClusterConfigReceived\fP event is emitted after processing such a protocol
message received from a remote device. It is mainly used for internal purposes.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
\(dqid\(dq: 84,
\(dqglobalID\(dq: 84,
\(dqtype\(dq: \(dqClusterConfigReceived\(dq,
\(dqtime\(dq: \(dq2022\-04\-27T14:14:27.043576583+09:00\(dq,
\(dqdata\(dq: {
\(dqdevice\(dq: \(dqI6KAH76\-66SLLLB\-5PFXSOA\-UFJCDZC\-YAOMLEK\-CP2GB32\-BV5RQST\-3PSROAU\(dq
}
}
.ft P
.fi
.UNINDENT
.UNINDENT
.SS ConfigSaved
.sp
Emitted after the config has been saved by the user or by Syncthing
itself.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
\(dqid\(dq: 50,
\(dqglobalID\(dq: 50,
\(dqtype\(dq: \(dqConfigSaved\(dq,
\(dqtime\(dq: \(dq2014\-12\-13T00:09:13.5166486Z\(dq,
\(dqdata\(dq: {
\(dqversion\(dq: 7,
\(dqfolders\(dq: [{\(dq...\(dq}],
\(dqdevices\(dq: [{\(dq...\(dq}],
\(dqgui\(dq: {\(dq...\(dq},
\(dqldap\(dq: {\(dq...\(dq},
\(dqoptions\(dq: {\(dq...\(dq},
\(dqremoteIgnoredDevices\(dq: [{\(dq...\(dq}],
\(dqdefaults\(dq: {\(dq...\(dq}
}
}
.ft P
.fi
.UNINDENT
.UNINDENT
.SS DeviceConnected
.sp
Generated each time a connection to a device has been established.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
\(dqid\(dq: 2,
\(dqglobalID\(dq: 2,
\(dqtype\(dq: \(dqDeviceConnected\(dq,
\(dqtime\(dq: \(dq2014\-07\-13T21:04:33.687836696+02:00\(dq,
\(dqdata\(dq: {
\(dqaddr\(dq: \(dq172.16.32.25:22000\(dq,
\(dqid\(dq: \(dqNFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG\(dq,
\(dqdeviceName\(dq: \(dqLaptop\(dq,
\(dqclientName\(dq: \(dqsyncthing\(dq,
\(dqclientVersion\(dq: \(dqv0.13.4\(dq,
\(dqtype\(dq: \(dqTCP (Client)\(dq
}
}
.ft P
.fi
.UNINDENT
.UNINDENT
.SS DeviceDisconnected
.sp
Generated each time a connection to a device has been terminated.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
\(dqid\(dq: 48,
\(dqglobalID\(dq: 48,
\(dqtype\(dq: \(dq