syncthing-event-api.7 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-EVENT-API" "7" "November 18, 2017" "v0.14" "Syncthing"
  4. .SH NAME
  5. syncthing-event-api \- Event API
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH DESCRIPTION
  34. .sp
  35. Syncthing provides a simple long polling interface for exposing events from the
  36. core utility towards a GUI.
  37. .sp
  38. To receive events, perform a HTTP GET of \fB/rest/events\fP or
  39. \fB/rest/events/disk\fP\&. The latter returns only local\-change\-detected and
  40. remote\-change\-detected events, the former all other events unless filtered.
  41. .sp
  42. To filter the event list, in effect creating a specific subscription for
  43. only the desired event types, add a parameter
  44. \fBevents=EventTypeA,EventTypeB,...\fP where the event types are any from the
  45. list below.
  46. .sp
  47. The optional parameter \fBsince=<lastSeenID>\fP sets the ID of the last event
  48. you\(aqve already seen. Syncthing returns a JSON encoded array of event objects,
  49. starting at the event just after the one with this last seen ID. The default
  50. value is 0, which returns all events. There is a limit to the number of events
  51. buffered, so if the rate of events is high or the time between polling calls is
  52. long some events might be missed. This can be detected by noting a discontinuity
  53. in the event IDs.
  54. .sp
  55. If no new events are produced since \fB<lastSeenID>\fP, the HTTP call blocks and
  56. waits for new events to happen before returning. By default it times out after
  57. 60 seconds returning an empty array. The time out duration can be customized
  58. with the optional parameter \fBtimeout=seconds\fP\&.
  59. .sp
  60. To receive only a limited number of events, add the \fBlimit=n\fP parameter with a
  61. suitable value for \fBn\fP and only the \fIlast\fP \fBn\fP events will be returned. This
  62. can be used to catch up with the latest event ID after a disconnection for
  63. example: \fB/rest/events?since=0&limit=1\fP\&.
  64. .SH EVENT STRUCTURE
  65. .sp
  66. Each event is represented by an object similar to the following:
  67. .INDENT 0.0
  68. .INDENT 3.5
  69. .sp
  70. .nf
  71. .ft C
  72. {
  73. "id": 2,
  74. "globalID": 3,
  75. "type": "DeviceConnected",
  76. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  77. "data": {
  78. "addr": "172.16.32.25:22000",
  79. "id": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  80. }
  81. }
  82. .ft P
  83. .fi
  84. .UNINDENT
  85. .UNINDENT
  86. .sp
  87. The top level keys \fBid\fP, \fBglobalID\fP, \fBtime\fP, \fBtype\fP and \fBdata\fP are always present,
  88. though \fBdata\fP may be \fBnull\fP\&.
  89. .INDENT 0.0
  90. .TP
  91. .B id
  92. A unique ID for this event on the events API. It always increases by 1: the first
  93. event generated has id \fB1\fP, the next has id \fB2\fP etc. If this increases by
  94. more than 1, then one or more events have been skipped by the events API.
  95. .TP
  96. .B globalID
  97. A global ID for this event, across the events API, the audit log, and any other
  98. sources. It may increase by more than 1, but it will always be greater
  99. than or equal to the id.
  100. .TP
  101. .B time
  102. The time the event was generated.
  103. .TP
  104. .B type
  105. Indicates the type of (i.e. reason for) the event and is one of the event
  106. types below.
  107. .TP
  108. .B data
  109. An object containing optional extra information; the exact structure is
  110. determined by the event type.
  111. .UNINDENT
  112. .SH EVENT TYPES
  113. .SS ConfigSaved
  114. .sp
  115. Emitted after the config has been saved by the user or by Syncthing
  116. itself.
  117. .INDENT 0.0
  118. .INDENT 3.5
  119. .sp
  120. .nf
  121. .ft C
  122. {
  123. "id": 50,
  124. "type": "ConfigSaved",
  125. "time": "2014\-12\-13T00:09:13.5166486Z",
  126. "data": {
  127. "Version": 7,
  128. "Options": {"..."},
  129. "GUI": {"..."},
  130. "Devices": [{"..."}],
  131. "Folders": [{"..."}]
  132. }
  133. }
  134. .ft P
  135. .fi
  136. .UNINDENT
  137. .UNINDENT
  138. .SS DeviceConnected
  139. .sp
  140. Generated each time a connection to a device has been established.
  141. .INDENT 0.0
  142. .INDENT 3.5
  143. .sp
  144. .nf
  145. .ft C
  146. {
  147. "id": 2,
  148. "type": "DeviceConnected",
  149. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  150. "data": {
  151. "addr": "172.16.32.25:22000",
  152. "id": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG",
  153. "deviceName": "Laptop",
  154. "clientName": "syncthing",
  155. "clientVersion": "v0.13.4",
  156. "type": "TCP (Client)"
  157. }
  158. }
  159. .ft P
  160. .fi
  161. .UNINDENT
  162. .UNINDENT
  163. .SS DeviceDisconnected
  164. .sp
  165. Generated each time a connection to a device has been terminated.
  166. .INDENT 0.0
  167. .INDENT 3.5
  168. .sp
  169. .nf
  170. .ft C
  171. {
  172. "id": 48,
  173. "type": "DeviceDisconnected",
  174. "time": "2014\-07\-13T21:18:52.859929215+02:00",
  175. "data": {
  176. "error": "unexpected EOF",
  177. "id": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  178. }
  179. }
  180. .ft P
  181. .fi
  182. .UNINDENT
  183. .UNINDENT
  184. .sp
  185. \fBNOTE:\fP
  186. .INDENT 0.0
  187. .INDENT 3.5
  188. The error key contains the cause for disconnection, which might not
  189. necessarily be an error as such. Specifically, "EOF" and "unexpected
  190. EOF" both signify TCP connection termination, either due to the other
  191. device restarting or going offline or due to a network change.
  192. .UNINDENT
  193. .UNINDENT
  194. .SS DeviceDiscovered
  195. .sp
  196. Emitted when a new device is discovered using local discovery.
  197. .INDENT 0.0
  198. .INDENT 3.5
  199. .sp
  200. .nf
  201. .ft C
  202. {
  203. "id": 13,
  204. "type": "DeviceDiscovered",
  205. "time": "2014\-07\-17T13:28:05.043465207+02:00",
  206. "data": {
  207. "addrs": [
  208. "172.16.32.25:22000"
  209. ],
  210. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  211. }
  212. }
  213. .ft P
  214. .fi
  215. .UNINDENT
  216. .UNINDENT
  217. .SS DevicePaused
  218. .sp
  219. Emitted when a device was paused.
  220. .INDENT 0.0
  221. .INDENT 3.5
  222. .sp
  223. .nf
  224. .ft C
  225. {
  226. "id": 13,
  227. "type": "DevicePaused",
  228. "time": "2014\-07\-17T13:28:05.043465207+02:00",
  229. "data": {
  230. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  231. }
  232. }
  233. .ft P
  234. .fi
  235. .UNINDENT
  236. .UNINDENT
  237. .SS DeviceRejected
  238. .sp
  239. Emitted when there is a connection from a device we are not configured
  240. to talk to.
  241. .INDENT 0.0
  242. .INDENT 3.5
  243. .sp
  244. .nf
  245. .ft C
  246. {
  247. "id": 24,
  248. "type": "DeviceRejected",
  249. "time": "2014\-08\-19T10:43:00.562821045+02:00",
  250. "data": {
  251. "address": "127.0.0.1:51807",
  252. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK"
  253. }
  254. }
  255. .ft P
  256. .fi
  257. .UNINDENT
  258. .UNINDENT
  259. .SS DeviceResumed
  260. .sp
  261. Generated each time a device was resumed.
  262. .INDENT 0.0
  263. .INDENT 3.5
  264. .sp
  265. .nf
  266. .ft C
  267. {
  268. "id": 2,
  269. "type": "DeviceResumed",
  270. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  271. "data": {
  272. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  273. }
  274. }
  275. .ft P
  276. .fi
  277. .UNINDENT
  278. .UNINDENT
  279. .SS DownloadProgress
  280. .sp
  281. Emitted during file downloads for each folder for each file. By default
  282. only a single file in a folder is handled at the same time, but custom
  283. configuration can cause multiple files to be shown.
  284. .INDENT 0.0
  285. .INDENT 3.5
  286. .sp
  287. .nf
  288. .ft C
  289. {
  290. "id": 221,
  291. "type": "DownloadProgress",
  292. "time": "2014\-12\-13T00:26:12.9876937Z",
  293. "data": {
  294. "folder1": {
  295. "file1": {
  296. "Total": 800,
  297. "Pulling": 2,
  298. "CopiedFromOrigin": 0,
  299. "Reused": 633,
  300. "CopiedFromElsewhere": 0,
  301. "Pulled": 38,
  302. "BytesTotal": 104792064,
  303. "BytesDone": 87883776
  304. },
  305. "dir\e\efile2": {
  306. "Total": 80,
  307. "Pulling": 2,
  308. "CopiedFromOrigin": 0,
  309. "Reused": 0,
  310. "CopiedFromElsewhere": 0,
  311. "Pulled": 32,
  312. "BytesTotal": 10420224,
  313. "BytesDone": 4128768
  314. }
  315. },
  316. "folder2": {
  317. "file3": {
  318. "Total": 800,
  319. "Pulling": 2,
  320. "CopiedFromOrigin": 0,
  321. "Reused": 633,
  322. "CopiedFromElsewhere": 0,
  323. "Pulled": 38,
  324. "BytesTotal": 104792064,
  325. "BytesDone": 87883776
  326. },
  327. "dir\e\efile4": {
  328. "Total": 80,
  329. "Pulling": 2,
  330. "CopiedFromOrigin": 0,
  331. "Reused": 0,
  332. "CopiedFromElsewhere": 0,
  333. "Pulled": 32,
  334. "BytesTotal": 10420224,
  335. "BytesDone": 4128768
  336. }
  337. }
  338. }
  339. }
  340. .ft P
  341. .fi
  342. .UNINDENT
  343. .UNINDENT
  344. .INDENT 0.0
  345. .IP \(bu 2
  346. \fBTotal\fP \- total number of blocks in the file
  347. .IP \(bu 2
  348. \fBPulling\fP \- number of blocks currently being downloaded
  349. .IP \(bu 2
  350. \fBCopiedFromOrigin\fP \- number of blocks copied from the file we are
  351. about to replace
  352. .IP \(bu 2
  353. \fBReused\fP \- number of blocks reused from a previous temporary file
  354. .IP \(bu 2
  355. \fBCopiedFromElsewhere\fP \- number of blocks copied from other files or
  356. potentially other folders
  357. .IP \(bu 2
  358. \fBPulled\fP \- number of blocks actually downloaded so far
  359. .IP \(bu 2
  360. \fBBytesTotal\fP \- approximate total file size
  361. .IP \(bu 2
  362. \fBBytesDone\fP \- approximate number of bytes already handled (already
  363. reused, copied or pulled)
  364. .UNINDENT
  365. .sp
  366. Where block size is 128KB.
  367. .sp
  368. Files/folders appearing in the event data imply that the download has
  369. been started for that file/folder, where disappearing implies that the
  370. downloads have been finished or failed for that file/folder. There is
  371. always a last event emitted with no data, which implies all downloads
  372. have finished/failed.
  373. .SS FolderCompletion
  374. .sp
  375. The \fBFolderCompletion\fP event is emitted when the local or remote
  376. contents for a folder changes. It contains the completion percentage for
  377. a given remote device and is emitted once per currently connected remote
  378. device.
  379. .INDENT 0.0
  380. .INDENT 3.5
  381. .sp
  382. .nf
  383. .ft C
  384. {
  385. "id": 84,
  386. "type": "FolderCompletion",
  387. "time": "2015\-04\-17T14:14:27.043576583+09:00",
  388. "data": {
  389. "completion": 100,
  390. "device": "I6KAH76\-66SLLLB\-5PFXSOA\-UFJCDZC\-YAOMLEK\-CP2GB32\-BV5RQST\-3PSROAU",
  391. "folder": "default"
  392. }
  393. }
  394. .ft P
  395. .fi
  396. .UNINDENT
  397. .UNINDENT
  398. .SS FolderErrors
  399. .sp
  400. The \fBFolderErrors\fP event is emitted when a folder cannot be successfully
  401. synchronized. The event contains the ID of the affected folder and a list of
  402. errors for files or directories therein. This list of errors is obsolete once
  403. the folder changes state to \fBsyncing\fP \- if errors remain after the next
  404. synchronization attempt, a new \fBFolderErrors\fP event is emitted.
  405. .INDENT 0.0
  406. .INDENT 3.5
  407. .sp
  408. .nf
  409. .ft C
  410. {
  411. "id": 132,
  412. "type": "FolderErrors",
  413. "time": "2015\-06\-26T13:39:24.697401384+02:00",
  414. "data": {
  415. "errors": [
  416. {
  417. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/h2j/.syncthing.aslkjd.tmp: permission denied",
  418. "path": "h2j/aslkjd"
  419. }
  420. ],
  421. "folder": "default"
  422. }
  423. }
  424. .ft P
  425. .fi
  426. .UNINDENT
  427. .UNINDENT
  428. .sp
  429. New in version 0.11.12.
  430. .sp
  431. \fBSEE ALSO:\fP
  432. .INDENT 0.0
  433. .INDENT 3.5
  434. The statechanged event.
  435. .UNINDENT
  436. .UNINDENT
  437. .SS FolderRejected
  438. .sp
  439. Emitted when a device sends index information for a folder we do not
  440. have, or have but do not share with the device in question.
  441. .INDENT 0.0
  442. .INDENT 3.5
  443. .sp
  444. .nf
  445. .ft C
  446. {
  447. "id": 27,
  448. "type": "FolderRejected",
  449. "time": "2014\-08\-19T10:41:06.761751399+02:00",
  450. "data": {
  451. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  452. "folder": "GXWxf\-3zgnU",
  453. "folderLabel": "My Pictures"
  454. }
  455. }
  456. .ft P
  457. .fi
  458. .UNINDENT
  459. .UNINDENT
  460. .SS Folder Scan Progress
  461. .sp
  462. Emitted in regular intervals (folder setting ProgressIntervalS, 2s by default)
  463. during scans giving the amount of bytes already scanned and to be scanned in
  464. total , as well as the current scanning rates in bytes per second.
  465. .INDENT 0.0
  466. .INDENT 3.5
  467. .sp
  468. .nf
  469. .ft C
  470. {
  471. "data" : {
  472. "total" : 1,
  473. "rate" : 0,
  474. "current" : 0,
  475. "folder" : "bd7q3\-zskm5"
  476. },
  477. "globalID" : 29,
  478. "type" : "FolderScanProgress",
  479. "time" : "2017\-03\-06T15:00:58.072004209+01:00",
  480. "id" : 29
  481. }
  482. .ft P
  483. .fi
  484. .UNINDENT
  485. .UNINDENT
  486. .SS FolderSummary
  487. .sp
  488. The FolderSummary event is emitted when folder contents have changed
  489. locally. This can be used to calculate the current local completion
  490. state.
  491. .INDENT 0.0
  492. .INDENT 3.5
  493. .sp
  494. .nf
  495. .ft C
  496. {
  497. "id": 16,
  498. "type": "FolderSummary",
  499. "time": "2015\-04\-17T14:12:20.460121585+09:00",
  500. "data": {
  501. "folder": "default",
  502. "summary": {
  503. "globalBytes": 0,
  504. "globalDeleted": 0,
  505. "globalFiles": 0,
  506. "ignorePatterns": false,
  507. "inSyncBytes": 0,
  508. "inSyncFiles": 0,
  509. "invalid": "",
  510. "localBytes": 0,
  511. "localDeleted": 0,
  512. "localFiles": 0,
  513. "needBytes": 0,
  514. "needFiles": 0,
  515. "state": "idle",
  516. "stateChanged": "2015\-04\-17T14:12:12.455224687+09:00",
  517. "version": 0
  518. }
  519. }
  520. }
  521. .ft P
  522. .fi
  523. .UNINDENT
  524. .UNINDENT
  525. .SS ItemFinished
  526. .sp
  527. Generated when Syncthing ends synchronizing a file to a newer version. A
  528. successful operation:
  529. .INDENT 0.0
  530. .INDENT 3.5
  531. .sp
  532. .nf
  533. .ft C
  534. {
  535. "id": 93,
  536. "type": "ItemFinished",
  537. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  538. "data": {
  539. "item": "test.txt",
  540. "folder": "default",
  541. "error": null,
  542. "type": "file",
  543. "action": "update"
  544. }
  545. }
  546. .ft P
  547. .fi
  548. .UNINDENT
  549. .UNINDENT
  550. .sp
  551. An unsuccessful operation:
  552. .INDENT 0.0
  553. .INDENT 3.5
  554. .sp
  555. .nf
  556. .ft C
  557. {
  558. "id": 44,
  559. "type": "ItemFinished",
  560. "time": "2015\-05\-27T11:21:05.711133004+02:00",
  561. "data": {
  562. "action": "update",
  563. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/foo/.syncthing.hej.tmp: permission denied",
  564. "folder": "default",
  565. "item": "foo/hej",
  566. "type": "file"
  567. }
  568. }
  569. .ft P
  570. .fi
  571. .UNINDENT
  572. .UNINDENT
  573. .sp
  574. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  575. .sp
  576. New in version 0.11.10: The \fBmetadata\fP action.
  577. .SS ItemStarted
  578. .sp
  579. Generated when Syncthing begins synchronizing a file to a newer version.
  580. .INDENT 0.0
  581. .INDENT 3.5
  582. .sp
  583. .nf
  584. .ft C
  585. {
  586. "id": 93,
  587. "type": "ItemStarted",
  588. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  589. "data": {
  590. "item": "test.txt",
  591. "folder": "default",
  592. "type": "file",
  593. "action": "update"
  594. }
  595. }
  596. .ft P
  597. .fi
  598. .UNINDENT
  599. .UNINDENT
  600. .sp
  601. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  602. .sp
  603. New in version 0.11.10: The \fBmetadata\fP action.
  604. .SS Listen Addresses Changed
  605. .sp
  606. This event is emitted when a listen address changes.
  607. .INDENT 0.0
  608. .INDENT 3.5
  609. .sp
  610. .nf
  611. .ft C
  612. {
  613. "type" : "ListenAddressesChanged",
  614. "id" : 70,
  615. "time" : "2017\-03\-06T15:01:24.88340663+01:00",
  616. "globalID" : 70,
  617. "data" : {
  618. "address" : {
  619. "Fragment" : "",
  620. "RawQuery" : "",
  621. "Scheme" : "dynamic+https",
  622. "Path" : "/endpoint",
  623. "RawPath" : "",
  624. "User" : null,
  625. "ForceQuery" : false,
  626. "Host" : "relays.syncthing.net",
  627. "Opaque" : ""
  628. },
  629. "wan" : [
  630. {
  631. "ForceQuery" : false,
  632. "User" : null,
  633. "Host" : "31.15.66.212:443",
  634. "Opaque" : "",
  635. "Path" : "/",
  636. "RawPath" : "",
  637. "RawQuery" : "id=F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=",
  638. "Scheme" : "relay",
  639. "Fragment" : ""
  640. }
  641. ],
  642. "lan" : [
  643. {
  644. "RawQuery" : "id=F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=",
  645. "Scheme" : "relay",
  646. "Fragment" : "",
  647. "RawPath" : "",
  648. "Path" : "/",
  649. "Host" : "31.15.66.212:443",
  650. "Opaque" : "",
  651. "ForceQuery" : false,
  652. "User" : null
  653. }
  654. ]
  655. }
  656. }
  657. .ft P
  658. .fi
  659. .UNINDENT
  660. .UNINDENT
  661. .SS LocalChangeDetected
  662. .sp
  663. Generated upon scan whenever the local disk has discovered an updated file from the
  664. previous scan. This does \fInot\fP include events that are discovered and copied from
  665. other devices (remote\-change\-detected), only files that were changed on the
  666. local filesystem.
  667. .INDENT 0.0
  668. .INDENT 3.5
  669. .sp
  670. .nf
  671. .ft C
  672. {
  673. "id": 7,
  674. "globalID": 59,
  675. "time": "2016\-09\-26T22:07:10.7189141\-04:00",
  676. "type": "LocalChangeDetected",
  677. "data": {
  678. "action": "deleted",
  679. "folderID": "vitwy\-zjxqt",
  680. "label": "TestSync",
  681. "path": "C:\e\eUsers\e\eNate\e\eSync\e\etestfolder\e\etest file.rtf",
  682. "type": "file"
  683. }
  684. }
  685. .ft P
  686. .fi
  687. .UNINDENT
  688. .UNINDENT
  689. .SS LocalIndexUpdated
  690. .sp
  691. Generated when the local index information has changed, due to
  692. synchronizing one or more items from the cluster or discovering local
  693. changes during a scan.
  694. .INDENT 0.0
  695. .INDENT 3.5
  696. .sp
  697. .nf
  698. .ft C
  699. {
  700. "id": 59,
  701. "type": "LocalIndexUpdated",
  702. "time": "2014\-07\-17T13:27:28.051369434+02:00",
  703. "data": {
  704. "folder": "default",
  705. "items": 1000,
  706. }
  707. }
  708. .ft P
  709. .fi
  710. .UNINDENT
  711. .UNINDENT
  712. .SS Login Attempt
  713. .sp
  714. When authentication is enabled for the GUI, this event is emitted on every
  715. login attempt. If either the username or password are incorrect, \fBsuccess\fP
  716. is false and in any case the given username is returned.
  717. .INDENT 0.0
  718. .INDENT 3.5
  719. .sp
  720. .nf
  721. .ft C
  722. {
  723. "id" : 187,
  724. "time" : "2017\-03\-07T00:19:24.420386143+01:00",
  725. "data" : {
  726. "username" : "somename",
  727. "success" : false
  728. },
  729. "type" : "LoginAttempt",
  730. "globalID" : 195
  731. }
  732. .ft P
  733. .fi
  734. .UNINDENT
  735. .UNINDENT
  736. .SS RemoteChangeDetected
  737. .sp
  738. Generated upon scan whenever a file is locally updated due to a remote change.
  739. Files that are updated locally produce a local\-change\-detected event.
  740. .INDENT 0.0
  741. .INDENT 3.5
  742. .sp
  743. .nf
  744. .ft C
  745. {
  746. "time" : "2017\-03\-06T23:58:21.844739891+01:00",
  747. "globalID" : 123,
  748. "data" : {
  749. "type" : "file",
  750. "action" : "deleted",
  751. "path" : "/media/ntfs_data/Dokumente/testfile",
  752. "label" : "Dokumente",
  753. "folderID" : "Dokumente",
  754. "modifiedBy" : "BPDFDTU"
  755. },
  756. "type" : "RemoteChangeDetected",
  757. "id" : 2
  758. }
  759. .ft P
  760. .fi
  761. .UNINDENT
  762. .UNINDENT
  763. .SS Remote Download Progress
  764. .sp
  765. This event is emitted when a download\-progress message is
  766. received. It returns a map \fBdata\fP of filenames with a count of
  767. downloaded blocks. The files in questions are currently being
  768. downloaded on the remote \fBdevice\fP and belong to \fBfolder\fP\&.
  769. .INDENT 0.0
  770. .INDENT 3.5
  771. .sp
  772. .nf
  773. .ft C
  774. {
  775. "time" : "2017\-03\-07T00:11:37.65838955+01:00",
  776. "globalID" : 170,
  777. "data" : {
  778. "state" : {
  779. "tahr64\-6.0.5.iso" : 1784
  780. },
  781. "device" : "F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A",
  782. "folder" : "Dokumente"
  783. },
  784. "type" : "RemoteDownloadProgress",
  785. "id" : 163
  786. }
  787. .ft P
  788. .fi
  789. .UNINDENT
  790. .UNINDENT
  791. .SS RemoteIndexUpdated
  792. .sp
  793. Generated each time new index information is received from a device.
  794. .INDENT 0.0
  795. .INDENT 3.5
  796. .sp
  797. .nf
  798. .ft C
  799. {
  800. "id": 44,
  801. "type": "RemoteIndexUpdated",
  802. "time": "2014\-07\-13T21:04:35.394184435+02:00",
  803. "data": {
  804. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG",
  805. "folder": "lightroom",
  806. "items": 1000
  807. }
  808. }
  809. .ft P
  810. .fi
  811. .UNINDENT
  812. .UNINDENT
  813. .SS Starting
  814. .sp
  815. Emitted exactly once, when Syncthing starts, before parsing
  816. configuration etc.
  817. .INDENT 0.0
  818. .INDENT 3.5
  819. .sp
  820. .nf
  821. .ft C
  822. {
  823. "id": 1,
  824. "type": "Starting",
  825. "time": "2014\-07\-17T13:13:32.044470055+02:00",
  826. "data": {
  827. "home": "/home/jb/.config/syncthing"
  828. }
  829. }
  830. .ft P
  831. .fi
  832. .UNINDENT
  833. .UNINDENT
  834. .SS StartupComplete
  835. .sp
  836. Emitted exactly once, when initialization is complete and Syncthing is
  837. ready to start exchanging data with other devices.
  838. .INDENT 0.0
  839. .INDENT 3.5
  840. .sp
  841. .nf
  842. .ft C
  843. {
  844. "id": 1,
  845. "type": "StartupComplete",
  846. "time": "2014\-07\-13T21:03:18.383239179+02:00",
  847. "data": null
  848. }
  849. .ft P
  850. .fi
  851. .UNINDENT
  852. .UNINDENT
  853. .SS StateChanged
  854. .sp
  855. Emitted when a folder changes state. Possible states are \fBidle\fP,
  856. \fBscanning\fP, \fBsyncing\fP and \fBerror\fP\&. The field \fBduration\fP is
  857. the number of seconds the folder spent in state \fBfrom\fP\&. In the example
  858. below, the folder \fBdefault\fP was in state \fBscanning\fP for 0.198
  859. seconds and is now in state \fBidle\fP\&.
  860. .INDENT 0.0
  861. .INDENT 3.5
  862. .sp
  863. .nf
  864. .ft C
  865. {
  866. "id": 8,
  867. "type": "StateChanged",
  868. "time": "2014\-07\-17T13:14:28.697493016+02:00",
  869. "data": {
  870. "folder": "default",
  871. "from": "scanning",
  872. "duration": 0.19782869900000002,
  873. "to": "idle"
  874. }
  875. }
  876. .ft P
  877. .fi
  878. .UNINDENT
  879. .UNINDENT
  880. .SH AUTHOR
  881. The Syncthing Authors
  882. .SH COPYRIGHT
  883. 2015, The Syncthing Authors
  884. .\" Generated by docutils manpage writer.
  885. .