syncthing-event-api.7 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "SYNCTHING-EVENT-API" "7" "Apr 05, 2022" "v1.19.2" "Syncthing"
  31. .SH NAME
  32. syncthing-event-api \- Event API
  33. .SH DESCRIPTION
  34. .sp
  35. Syncthing provides a simple long polling interface for exposing events from the
  36. core utility towards a GUI. To receive events, see /rest/events\-get\&.
  37. .SH EVENT STRUCTURE
  38. .sp
  39. Each event is represented by an object similar to the following:
  40. .INDENT 0.0
  41. .INDENT 3.5
  42. .sp
  43. .nf
  44. .ft C
  45. {
  46. "id": 2,
  47. "globalID": 3,
  48. "type": "DeviceConnected",
  49. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  50. "data": {
  51. "addr": "172.16.32.25:22000",
  52. "id": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  53. }
  54. }
  55. .ft P
  56. .fi
  57. .UNINDENT
  58. .UNINDENT
  59. .sp
  60. The top level keys \fBid\fP, \fBglobalID\fP, \fBtime\fP, \fBtype\fP and \fBdata\fP are always present,
  61. though \fBdata\fP may be \fBnull\fP\&.
  62. .INDENT 0.0
  63. .TP
  64. .B id
  65. A unique ID for this event on the events API. It always increases by 1: the first
  66. event generated has id \fB1\fP, the next has id \fB2\fP etc. If this increases by
  67. more than 1, then one or more events have been skipped by the events API.
  68. .TP
  69. .B globalID
  70. A global ID for this event, across the events API, the audit log, and any other
  71. sources. It may increase by more than 1, but it will always be greater
  72. than or equal to the id.
  73. .TP
  74. .B time
  75. The time the event was generated.
  76. .TP
  77. .B type
  78. Indicates the type of (i.e. reason for) the event and is one of the event
  79. types below.
  80. .TP
  81. .B data
  82. An object containing optional extra information; the exact structure is
  83. determined by the event type.
  84. .UNINDENT
  85. .SH EVENT TYPES
  86. .SS ConfigSaved
  87. .sp
  88. Emitted after the config has been saved by the user or by Syncthing
  89. itself.
  90. .INDENT 0.0
  91. .INDENT 3.5
  92. .sp
  93. .nf
  94. .ft C
  95. {
  96. "id": 50,
  97. "globalID": 50,
  98. "type": "ConfigSaved",
  99. "time": "2014\-12\-13T00:09:13.5166486Z",
  100. "data": {
  101. "version": 7,
  102. "folders": [{"..."}],
  103. "devices": [{"..."}],
  104. "gui": {"..."},
  105. "ldap": {"..."},
  106. "options": {"..."},
  107. "remoteIgnoredDevices": [{"..."}],
  108. "defaults": {"..."}
  109. }
  110. }
  111. .ft P
  112. .fi
  113. .UNINDENT
  114. .UNINDENT
  115. .SS DeviceConnected
  116. .sp
  117. Generated each time a connection to a device has been established.
  118. .INDENT 0.0
  119. .INDENT 3.5
  120. .sp
  121. .nf
  122. .ft C
  123. {
  124. "id": 2,
  125. "globalID": 2,
  126. "type": "DeviceConnected",
  127. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  128. "data": {
  129. "addr": "172.16.32.25:22000",
  130. "id": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG",
  131. "deviceName": "Laptop",
  132. "clientName": "syncthing",
  133. "clientVersion": "v0.13.4",
  134. "type": "TCP (Client)"
  135. }
  136. }
  137. .ft P
  138. .fi
  139. .UNINDENT
  140. .UNINDENT
  141. .SS DeviceDisconnected
  142. .sp
  143. Generated each time a connection to a device has been terminated.
  144. .INDENT 0.0
  145. .INDENT 3.5
  146. .sp
  147. .nf
  148. .ft C
  149. {
  150. "id": 48,
  151. "globalID": 48,
  152. "type": "DeviceDisconnected",
  153. "time": "2014\-07\-13T21:18:52.859929215+02:00",
  154. "data": {
  155. "error": "unexpected EOF",
  156. "id": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  157. }
  158. }
  159. .ft P
  160. .fi
  161. .UNINDENT
  162. .UNINDENT
  163. .sp
  164. \fBNOTE:\fP
  165. .INDENT 0.0
  166. .INDENT 3.5
  167. The error key contains the cause for disconnection, which might not
  168. necessarily be an error as such. Specifically, “EOF” and “unexpected
  169. EOF” both signify TCP connection termination, either due to the other
  170. device restarting or going offline or due to a network change.
  171. .UNINDENT
  172. .UNINDENT
  173. .SS DeviceDiscovered
  174. .sp
  175. Emitted when a new device is discovered using local discovery.
  176. .INDENT 0.0
  177. .INDENT 3.5
  178. .sp
  179. .nf
  180. .ft C
  181. {
  182. "id": 13,
  183. "globalID": 13,
  184. "type": "DeviceDiscovered",
  185. "time": "2014\-07\-17T13:28:05.043465207+02:00",
  186. "data": {
  187. "addrs": [
  188. "172.16.32.25:22000"
  189. ],
  190. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  191. }
  192. }
  193. .ft P
  194. .fi
  195. .UNINDENT
  196. .UNINDENT
  197. .SS DevicePaused
  198. .sp
  199. Emitted when a device was paused.
  200. .INDENT 0.0
  201. .INDENT 3.5
  202. .sp
  203. .nf
  204. .ft C
  205. {
  206. "id": 13,
  207. "globalID": 13,
  208. "type": "DevicePaused",
  209. "time": "2014\-07\-17T13:28:05.043465207+02:00",
  210. "data": {
  211. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  212. }
  213. }
  214. .ft P
  215. .fi
  216. .UNINDENT
  217. .UNINDENT
  218. .SS DeviceRejected (DEPRECATED)
  219. .sp
  220. Deprecated since version v1.13.0: This event is still emitted for compatibility, but deprecated. Use
  221. the replacement pendingdeviceschanged event instead.
  222. .sp
  223. Emitted when there is a connection from a device we are not configured
  224. to talk to.
  225. .INDENT 0.0
  226. .INDENT 3.5
  227. .sp
  228. .nf
  229. .ft C
  230. {
  231. "id": 24,
  232. "globalID": 24,
  233. "type": "DeviceRejected",
  234. "time": "2014\-08\-19T10:43:00.562821045+02:00",
  235. "data": {
  236. "address": "127.0.0.1:51807",
  237. "name": "My dusty computer",
  238. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK"
  239. }
  240. }
  241. .ft P
  242. .fi
  243. .UNINDENT
  244. .UNINDENT
  245. .SS DeviceResumed
  246. .sp
  247. Generated each time a device was resumed.
  248. .INDENT 0.0
  249. .INDENT 3.5
  250. .sp
  251. .nf
  252. .ft C
  253. {
  254. "id": 2,
  255. "globalID": 2,
  256. "type": "DeviceResumed",
  257. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  258. "data": {
  259. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  260. }
  261. }
  262. .ft P
  263. .fi
  264. .UNINDENT
  265. .UNINDENT
  266. .SS DownloadProgress
  267. .sp
  268. Emitted during file downloads for each folder for each file. By default
  269. only a single file in a folder is handled at the same time, but custom
  270. configuration can cause multiple files to be shown.
  271. .INDENT 0.0
  272. .INDENT 3.5
  273. .sp
  274. .nf
  275. .ft C
  276. {
  277. "id": 221,
  278. "globalID": 221,
  279. "type": "DownloadProgress",
  280. "time": "2014\-12\-13T00:26:12.9876937Z",
  281. "data": {
  282. "folder1": {
  283. "file1": {
  284. "total": 800,
  285. "pulling": 2,
  286. "copiedFromOrigin": 0,
  287. "reused": 633,
  288. "copiedFromElsewhere": 0,
  289. "pulled": 38,
  290. "bytesTotal": 104792064,
  291. "bytesDone": 87883776
  292. },
  293. "dir\e\efile2": {
  294. "total": 80,
  295. "pulling": 2,
  296. "copiedFromOrigin": 0,
  297. "reused": 0,
  298. "copiedFromElsewhere": 0,
  299. "pulled": 32,
  300. "bytesTotal": 10420224,
  301. "bytesDone": 4128768
  302. }
  303. },
  304. "folder2": {
  305. "file3": {
  306. "total": 800,
  307. "pulling": 2,
  308. "copiedFromOrigin": 0,
  309. "reused": 633,
  310. "copiedFromElsewhere": 0,
  311. "pulled": 38,
  312. "bytesTotal": 104792064,
  313. "bytesDone": 87883776
  314. },
  315. "dir\e\efile4": {
  316. "total": 80,
  317. "pulling": 2,
  318. "copiedFromOrigin": 0,
  319. "reused": 0,
  320. "copiedFromElsewhere": 0,
  321. "pulled": 32,
  322. "bytesTotal": 10420224,
  323. "bytesDone": 4128768
  324. }
  325. }
  326. }
  327. }
  328. .ft P
  329. .fi
  330. .UNINDENT
  331. .UNINDENT
  332. .INDENT 0.0
  333. .IP \(bu 2
  334. \fBtotal\fP \- total number of blocks in the file
  335. .IP \(bu 2
  336. \fBpulling\fP \- number of blocks currently being downloaded
  337. .IP \(bu 2
  338. \fBcopiedFromOrigin\fP \- number of blocks copied from the file we are
  339. about to replace
  340. .IP \(bu 2
  341. \fBreused\fP \- number of blocks reused from a previous temporary file
  342. .IP \(bu 2
  343. \fBcopiedFromElsewhere\fP \- number of blocks copied from other files or
  344. potentially other folders
  345. .IP \(bu 2
  346. \fBpulled\fP \- number of blocks actually downloaded so far
  347. .IP \(bu 2
  348. \fBbytesTotal\fP \- approximate total file size
  349. .IP \(bu 2
  350. \fBbytesDone\fP \- approximate number of bytes already handled (already
  351. reused, copied or pulled)
  352. .UNINDENT
  353. .sp
  354. Where block size is 128KB.
  355. .sp
  356. Files/folders appearing in the event data imply that the download has
  357. been started for that file/folder, where disappearing implies that the
  358. downloads have been finished or failed for that file/folder. There is
  359. always a last event emitted with no data, which implies all downloads
  360. have finished/failed.
  361. .SS Failure
  362. .sp
  363. Generated for specific errors that will also be sent to the usage
  364. reporting server, if enabled in the configuration. These are usually
  365. of special interest to the developers to troubleshoot complex errors.
  366. The \fBdata\fP field contains a textual error message.
  367. .INDENT 0.0
  368. .INDENT 3.5
  369. .sp
  370. .nf
  371. .ft C
  372. {
  373. "id": 93,
  374. "globalID": 93,
  375. "type": "Failure",
  376. "time": "2021\-06\-07T21:22:03.414609034+02:00",
  377. "data": "index handler got paused while already paused"
  378. }
  379. .ft P
  380. .fi
  381. .UNINDENT
  382. .UNINDENT
  383. .SS FolderCompletion
  384. .sp
  385. The \fBFolderCompletion\fP event is emitted when the local or remote
  386. contents for a folder changes. It contains the completion percentage for
  387. a given remote device and is emitted once per currently connected remote
  388. device.
  389. .INDENT 0.0
  390. .INDENT 3.5
  391. .sp
  392. .nf
  393. .ft C
  394. {
  395. "id": 84,
  396. "globalID": 84,
  397. "type": "FolderCompletion",
  398. "time": "2015\-04\-17T14:14:27.043576583+09:00",
  399. "data": {
  400. "completion": 100,
  401. "device": "I6KAH76\-66SLLLB\-5PFXSOA\-UFJCDZC\-YAOMLEK\-CP2GB32\-BV5RQST\-3PSROAU",
  402. "folder": "default",
  403. "globalBytes": 17,
  404. "globalItems": 4,
  405. "needBytes": 0,
  406. "needDeletes": 0,
  407. "needItems": 0,
  408. "sequence": 12
  409. }
  410. }
  411. .ft P
  412. .fi
  413. .UNINDENT
  414. .UNINDENT
  415. .SS FolderErrors
  416. .sp
  417. The \fBFolderErrors\fP event is emitted when a folder cannot be successfully
  418. synchronized. The event contains the ID of the affected folder and a list of
  419. errors for files or directories therein. This list of errors is obsolete once
  420. the folder changes state to \fBsyncing\fP \- if errors remain after the next
  421. synchronization attempt, a new \fBFolderErrors\fP event is emitted.
  422. .INDENT 0.0
  423. .INDENT 3.5
  424. .sp
  425. .nf
  426. .ft C
  427. {
  428. "id": 132,
  429. "type": "FolderErrors",
  430. "time": "2015\-06\-26T13:39:24.697401384+02:00",
  431. "data": {
  432. "errors": [
  433. {
  434. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/h2j/.syncthing.aslkjd.tmp: permission denied",
  435. "path": "h2j/aslkjd"
  436. }
  437. ],
  438. "folder": "default"
  439. }
  440. }
  441. .ft P
  442. .fi
  443. .UNINDENT
  444. .UNINDENT
  445. .sp
  446. New in version 0.11.12.
  447. .sp
  448. \fBSEE ALSO:\fP
  449. .INDENT 0.0
  450. .INDENT 3.5
  451. The statechanged event.
  452. .UNINDENT
  453. .UNINDENT
  454. .SS FolderPaused
  455. .sp
  456. Generated when the configuration changes regarding the “paused” state
  457. of a folder. Sent repeatedly for each changed folder.
  458. .INDENT 0.0
  459. .INDENT 3.5
  460. .sp
  461. .nf
  462. .ft C
  463. {
  464. "id": 93,
  465. "globalID": 93,
  466. "type": "FolderPaused",
  467. "time": "2021\-06\-07T23:45:03.414609034+02:00",
  468. "data": {
  469. "id": "abcde\-fghij",
  470. "label": "My folder"
  471. }
  472. }
  473. .ft P
  474. .fi
  475. .UNINDENT
  476. .UNINDENT
  477. .SS FolderRejected (DEPRECATED)
  478. .sp
  479. Deprecated since version v1.13.0: This event is still emitted for compatibility, but deprecated. Use
  480. the replacement pendingfolderschanged event instead.
  481. .sp
  482. Emitted when a device sends index information for a folder we do not
  483. have, or have but do not share with the device in question.
  484. .INDENT 0.0
  485. .INDENT 3.5
  486. .sp
  487. .nf
  488. .ft C
  489. {
  490. "id": 27,
  491. "globalID": 27,
  492. "type": "FolderRejected",
  493. "time": "2014\-08\-19T10:41:06.761751399+02:00",
  494. "data": {
  495. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  496. "folder": "GXWxf\-3zgnU",
  497. "folderLabel": "My Pictures"
  498. }
  499. }
  500. .ft P
  501. .fi
  502. .UNINDENT
  503. .UNINDENT
  504. .SS FolderResumed
  505. .sp
  506. Generated when the configuration changes regarding the “paused” state
  507. of a folder. Sent repeatedly for each changed folder.
  508. .INDENT 0.0
  509. .INDENT 3.5
  510. .sp
  511. .nf
  512. .ft C
  513. {
  514. "id": 93,
  515. "globalID": 93,
  516. "type": "FolderResumed",
  517. "time": "2021\-06\-07T23:45:03.414609034+02:00",
  518. "data": {
  519. "id": "abcde\-fghij",
  520. "label": "My folder"
  521. }
  522. }
  523. .ft P
  524. .fi
  525. .UNINDENT
  526. .UNINDENT
  527. .SS FolderScanProgress
  528. .sp
  529. Emitted in regular intervals (folder setting ProgressIntervalS, 2s by default)
  530. during scans giving the amount of bytes already scanned and to be scanned in
  531. total , as well as the current scanning rates in bytes per second.
  532. .INDENT 0.0
  533. .INDENT 3.5
  534. .sp
  535. .nf
  536. .ft C
  537. {
  538. "data" : {
  539. "total" : 1,
  540. "rate" : 0,
  541. "current" : 0,
  542. "folder" : "bd7q3\-zskm5"
  543. },
  544. "globalID" : 29,
  545. "type" : "FolderScanProgress",
  546. "time" : "2017\-03\-06T15:00:58.072004209+01:00",
  547. "id" : 29
  548. }
  549. .ft P
  550. .fi
  551. .UNINDENT
  552. .UNINDENT
  553. .SS FolderSummary
  554. .sp
  555. The FolderSummary event is emitted when folder contents have changed
  556. locally. This can be used to calculate the current local completion
  557. state.
  558. .INDENT 0.0
  559. .INDENT 3.5
  560. .sp
  561. .nf
  562. .ft C
  563. {
  564. "id": 16,
  565. "globalID": 16,
  566. "type": "FolderSummary",
  567. "time": "2015\-04\-17T14:12:20.460121585+09:00",
  568. "data": {
  569. "folder": "default",
  570. "summary": {
  571. "globalBytes": 0,
  572. "globalDeleted": 0,
  573. "globalFiles": 0,
  574. "ignorePatterns": false,
  575. "inSyncBytes": 0,
  576. "inSyncFiles": 0,
  577. "invalid": "",
  578. "localBytes": 0,
  579. "localDeleted": 0,
  580. "localFiles": 0,
  581. "needBytes": 0,
  582. "needFiles": 0,
  583. "state": "idle",
  584. "stateChanged": "2015\-04\-17T14:12:12.455224687+09:00",
  585. "version": 0
  586. }
  587. }
  588. }
  589. .ft P
  590. .fi
  591. .UNINDENT
  592. .UNINDENT
  593. .SS FolderWatchStateChanged
  594. .sp
  595. The \fBFolderWatchStateChanged\fP event is emitted when a folder’s watcher routine
  596. encounters a new error, or when a previous error disappeared after retrying.
  597. The event contains the ID of the affected folder and textual error messages
  598. describing the previous (\fBfrom\fP) and the updated (\fBto\fP) error conditions.
  599. If there was no error in either of these, the respective field is omitted.
  600. .INDENT 0.0
  601. .INDENT 3.5
  602. .sp
  603. .nf
  604. .ft C
  605. {
  606. "id": 123,
  607. "type": "FolderWatchStateChanged",
  608. "time": "2022\-03\-14T12:34:56.890000000+01:00",
  609. "data": {
  610. "folder": "default",
  611. "from": "Something bad happened.",
  612. "to": "Something worse happened."
  613. }
  614. }
  615. .ft P
  616. .fi
  617. .UNINDENT
  618. .UNINDENT
  619. .SS ItemFinished
  620. .sp
  621. Generated when Syncthing ends synchronizing a file to a newer version. A
  622. successful operation:
  623. .INDENT 0.0
  624. .INDENT 3.5
  625. .sp
  626. .nf
  627. .ft C
  628. {
  629. "id": 93,
  630. "globalID": 93,
  631. "type": "ItemFinished",
  632. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  633. "data": {
  634. "item": "test.txt",
  635. "folder": "default",
  636. "error": null,
  637. "type": "file",
  638. "action": "update"
  639. }
  640. }
  641. .ft P
  642. .fi
  643. .UNINDENT
  644. .UNINDENT
  645. .sp
  646. An unsuccessful operation:
  647. .INDENT 0.0
  648. .INDENT 3.5
  649. .sp
  650. .nf
  651. .ft C
  652. {
  653. "id": 44,
  654. "globalID": 44,
  655. "type": "ItemFinished",
  656. "time": "2015\-05\-27T11:21:05.711133004+02:00",
  657. "data": {
  658. "action": "update",
  659. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/foo/.syncthing.hej.tmp: permission denied",
  660. "folder": "default",
  661. "item": "foo/hej",
  662. "type": "file"
  663. }
  664. }
  665. .ft P
  666. .fi
  667. .UNINDENT
  668. .UNINDENT
  669. .sp
  670. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  671. .sp
  672. New in version 0.11.10: The \fBmetadata\fP action.
  673. .SS ItemStarted
  674. .sp
  675. Generated when Syncthing begins synchronizing a file to a newer version.
  676. .INDENT 0.0
  677. .INDENT 3.5
  678. .sp
  679. .nf
  680. .ft C
  681. {
  682. "id": 93,
  683. "globalID": 93,
  684. "type": "ItemStarted",
  685. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  686. "data": {
  687. "item": "test.txt",
  688. "folder": "default",
  689. "type": "file",
  690. "action": "update"
  691. }
  692. }
  693. .ft P
  694. .fi
  695. .UNINDENT
  696. .UNINDENT
  697. .sp
  698. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  699. .sp
  700. New in version 0.11.10: The \fBmetadata\fP action.
  701. .SS ListenAddressesChanged
  702. .sp
  703. This event is emitted when a listen address changes.
  704. .INDENT 0.0
  705. .INDENT 3.5
  706. .sp
  707. .nf
  708. .ft C
  709. {
  710. "type" : "ListenAddressesChanged",
  711. "id" : 70,
  712. "time" : "2017\-03\-06T15:01:24.88340663+01:00",
  713. "globalID" : 70,
  714. "data" : {
  715. "address" : {
  716. "Fragment" : "",
  717. "RawQuery" : "",
  718. "Scheme" : "dynamic+https",
  719. "Path" : "/endpoint",
  720. "RawPath" : "",
  721. "User" : null,
  722. "ForceQuery" : false,
  723. "Host" : "relays.syncthing.net",
  724. "Opaque" : ""
  725. },
  726. "wan" : [
  727. {
  728. "ForceQuery" : false,
  729. "User" : null,
  730. "Host" : "31.15.66.212:443",
  731. "Opaque" : "",
  732. "Path" : "/",
  733. "RawPath" : "",
  734. "RawQuery" : "id=F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=",
  735. "Scheme" : "relay",
  736. "Fragment" : ""
  737. }
  738. ],
  739. "lan" : [
  740. {
  741. "RawQuery" : "id=F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=",
  742. "Scheme" : "relay",
  743. "Fragment" : "",
  744. "RawPath" : "",
  745. "Path" : "/",
  746. "Host" : "31.15.66.212:443",
  747. "Opaque" : "",
  748. "ForceQuery" : false,
  749. "User" : null
  750. }
  751. ]
  752. }
  753. }
  754. .ft P
  755. .fi
  756. .UNINDENT
  757. .UNINDENT
  758. .SS LocalChangeDetected
  759. .sp
  760. Generated upon scan whenever the local disk has discovered an updated file from the
  761. previous scan. This does \fInot\fP include events that are discovered and copied from
  762. other devices (remotechangedetected), only files that were changed on the
  763. local filesystem.
  764. .sp
  765. \fBNOTE:\fP
  766. .INDENT 0.0
  767. .INDENT 3.5
  768. This event is not included in /rest/events\-get endpoint without
  769. a mask specified, but needs to be selected explicitly.
  770. .UNINDENT
  771. .UNINDENT
  772. .INDENT 0.0
  773. .INDENT 3.5
  774. .sp
  775. .nf
  776. .ft C
  777. {
  778. "id": 7,
  779. "globalID": 59,
  780. "time": "2016\-09\-26T22:07:10.7189141\-04:00",
  781. "type": "LocalChangeDetected",
  782. "data": {
  783. "action": "deleted",
  784. "folderID": "vitwy\-zjxqt",
  785. "label": "TestSync",
  786. "path": "C:\e\eUsers\e\eNate\e\eSync\e\etestfolder\e\etest file.rtf",
  787. "type": "file"
  788. }
  789. }
  790. .ft P
  791. .fi
  792. .UNINDENT
  793. .UNINDENT
  794. .SS LocalIndexUpdated
  795. .sp
  796. Generated when the local index information has changed, due to
  797. synchronizing one or more items from the cluster or discovering local
  798. changes during a scan.
  799. .INDENT 0.0
  800. .INDENT 3.5
  801. .sp
  802. .nf
  803. .ft C
  804. {
  805. "id": 59,
  806. "globalID": 59,
  807. "type": "LocalIndexUpdated",
  808. "time": "2014\-07\-17T13:27:28.051369434+02:00",
  809. "data": {
  810. "folder": "default",
  811. "items": 1000,
  812. }
  813. }
  814. .ft P
  815. .fi
  816. .UNINDENT
  817. .UNINDENT
  818. .SS LoginAttempt
  819. .sp
  820. When authentication is enabled for the GUI, this event is emitted on every
  821. login attempt. If either the username or password are incorrect, \fBsuccess\fP
  822. is false and in any case the given username is returned. The included
  823. remote address concerns the immediate connecting host, which may not be the
  824. origin of the request, but e.g. a reverse proxy.
  825. .INDENT 0.0
  826. .INDENT 3.5
  827. .sp
  828. .nf
  829. .ft C
  830. {
  831. "id" : 187,
  832. "time" : "2017\-03\-07T00:19:24.420386143+01:00",
  833. "data" : {
  834. "remoteAddress" : "127.0.0.1:55530",
  835. "username" : "somename",
  836. "success" : false
  837. },
  838. "type" : "LoginAttempt",
  839. "globalID" : 195
  840. }
  841. .ft P
  842. .fi
  843. .UNINDENT
  844. .UNINDENT
  845. .SS PendingDevicesChanged
  846. .sp
  847. New in version 1.14.0.
  848. .sp
  849. Emitted when pending devices were added / updated (connection from
  850. unknown ID) or removed (device is ignored, dismissed or added).
  851. .INDENT 0.0
  852. .INDENT 3.5
  853. .sp
  854. .nf
  855. .ft C
  856. {
  857. "id": 87,
  858. "type": "PendingDevicesChanged",
  859. "time": "2020\-12\-22T22:24:37.578586718+01:00",
  860. "data": {
  861. "added": [
  862. {
  863. "address": "127.0.0.1:51807",
  864. "deviceID": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  865. "name": "My dusty computer"
  866. }
  867. ],
  868. "removed": [
  869. {
  870. "deviceID": "P56IOI7\-MZJNU2Y\-IQGDREY\-DM2MGTI\-MGL3BXN\-PQ6W5BM\-TBBZ4TJ\-XZWICQ2"
  871. }
  872. ]
  873. }
  874. }
  875. .ft P
  876. .fi
  877. .UNINDENT
  878. .UNINDENT
  879. .SS PendingFoldersChanged
  880. .sp
  881. New in version 1.14.0.
  882. .sp
  883. Emitted when pending folders were added / updated (offered by some
  884. device, but not shared to them) or removed (folder ignored, dismissed
  885. or added or no longer offered from the remote device). A removed
  886. entry without a \fBdeviceID\fP attribute means that the folder is no
  887. longer pending for any device.
  888. .INDENT 0.0
  889. .INDENT 3.5
  890. .sp
  891. .nf
  892. .ft C
  893. {
  894. "id": 101,
  895. "type": "PendingFoldersChanged",
  896. "time": "2020\-12\-22T22:36:55.66744317+01:00",
  897. "data": {
  898. "added": [
  899. {
  900. "deviceID": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  901. "folderID": "GXWxf\-3zgnU",
  902. "folderLabel": "My Pictures"
  903. "receiveEncrypted": "false"
  904. "remoteEncrypted": "false"
  905. }
  906. ],
  907. "removed": [
  908. {
  909. "deviceID": "P56IOI7\-MZJNU2Y\-IQGDREY\-DM2MGTI\-MGL3BXN\-PQ6W5BM\-TBBZ4TJ\-XZWICQ2",
  910. "folderID": "neyfh\-sa2nu"
  911. },
  912. {
  913. "folderID": "abcde\-fghij"
  914. }
  915. ]
  916. }
  917. }
  918. .ft P
  919. .fi
  920. .UNINDENT
  921. .UNINDENT
  922. .SS RemoteChangeDetected
  923. .sp
  924. Generated upon scan whenever a file is locally updated due to a remote change.
  925. Files that are updated locally produce a localchangedetected event.
  926. .sp
  927. \fBNOTE:\fP
  928. .INDENT 0.0
  929. .INDENT 3.5
  930. This event is not included in /rest/events\-get endpoint without
  931. a mask specified, but needs to be selected explicitly.
  932. .UNINDENT
  933. .UNINDENT
  934. .INDENT 0.0
  935. .INDENT 3.5
  936. .sp
  937. .nf
  938. .ft C
  939. {
  940. "time" : "2017\-03\-06T23:58:21.844739891+01:00",
  941. "globalID" : 123,
  942. "data" : {
  943. "type" : "file",
  944. "action" : "deleted",
  945. "path" : "/media/ntfs_data/Dokumente/testfile",
  946. "label" : "Dokumente",
  947. "folderID" : "Dokumente",
  948. "modifiedBy" : "BPDFDTU"
  949. },
  950. "type" : "RemoteChangeDetected",
  951. "id" : 2
  952. }
  953. .ft P
  954. .fi
  955. .UNINDENT
  956. .UNINDENT
  957. .SS RemoteDownloadProgress
  958. .sp
  959. This event is emitted when a download\-progress message is
  960. received. It returns a map \fBdata\fP of filenames with a count of
  961. downloaded blocks. The files in questions are currently being
  962. downloaded on the remote \fBdevice\fP and belong to \fBfolder\fP\&.
  963. .INDENT 0.0
  964. .INDENT 3.5
  965. .sp
  966. .nf
  967. .ft C
  968. {
  969. "time" : "2017\-03\-07T00:11:37.65838955+01:00",
  970. "globalID" : 170,
  971. "data" : {
  972. "state" : {
  973. "tahr64\-6.0.5.iso" : 1784
  974. },
  975. "device" : "F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A",
  976. "folder" : "Dokumente"
  977. },
  978. "type" : "RemoteDownloadProgress",
  979. "id" : 163
  980. }
  981. .ft P
  982. .fi
  983. .UNINDENT
  984. .UNINDENT
  985. .SS RemoteIndexUpdated
  986. .sp
  987. Generated each time new index information is received from a device.
  988. .INDENT 0.0
  989. .INDENT 3.5
  990. .sp
  991. .nf
  992. .ft C
  993. {
  994. "id": 44,
  995. "globalID": 44,
  996. "type": "RemoteIndexUpdated",
  997. "time": "2014\-07\-13T21:04:35.394184435+02:00",
  998. "data": {
  999. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG",
  1000. "folder": "lightroom",
  1001. "items": 1000
  1002. }
  1003. }
  1004. .ft P
  1005. .fi
  1006. .UNINDENT
  1007. .UNINDENT
  1008. .SS Starting
  1009. .sp
  1010. Emitted exactly once, when Syncthing starts, before parsing
  1011. configuration etc.
  1012. .INDENT 0.0
  1013. .INDENT 3.5
  1014. .sp
  1015. .nf
  1016. .ft C
  1017. {
  1018. "id": 1,
  1019. "globalID": 1,
  1020. "type": "Starting",
  1021. "time": "2014\-07\-17T13:13:32.044470055+02:00",
  1022. "data": {
  1023. "home": "/home/jb/.config/syncthing"
  1024. }
  1025. }
  1026. .ft P
  1027. .fi
  1028. .UNINDENT
  1029. .UNINDENT
  1030. .SS StartupComplete
  1031. .sp
  1032. Emitted exactly once, when initialization is complete and Syncthing is
  1033. ready to start exchanging data with other devices.
  1034. .INDENT 0.0
  1035. .INDENT 3.5
  1036. .sp
  1037. .nf
  1038. .ft C
  1039. {
  1040. "id": 1,
  1041. "globalID": 1,
  1042. "type": "StartupComplete",
  1043. "time": "2014\-07\-13T21:03:18.383239179+02:00",
  1044. "data": null
  1045. }
  1046. .ft P
  1047. .fi
  1048. .UNINDENT
  1049. .UNINDENT
  1050. .SS StateChanged
  1051. .sp
  1052. Emitted when a folder changes state. Possible states are \fBidle\fP,
  1053. \fBscanning\fP, \fBsyncing\fP and \fBerror\fP\&. The field \fBduration\fP is
  1054. the number of seconds the folder spent in state \fBfrom\fP\&. In the example
  1055. below, the folder \fBdefault\fP was in state \fBscanning\fP for 0.198
  1056. seconds and is now in state \fBidle\fP\&.
  1057. .INDENT 0.0
  1058. .INDENT 3.5
  1059. .sp
  1060. .nf
  1061. .ft C
  1062. {
  1063. "id": 8,
  1064. "globalID": 8,
  1065. "type": "StateChanged",
  1066. "time": "2014\-07\-17T13:14:28.697493016+02:00",
  1067. "data": {
  1068. "folder": "default",
  1069. "from": "scanning",
  1070. "duration": 0.19782869900000002,
  1071. "to": "idle"
  1072. }
  1073. }
  1074. .ft P
  1075. .fi
  1076. .UNINDENT
  1077. .UNINDENT
  1078. .SH AUTHOR
  1079. The Syncthing Authors
  1080. .SH COPYRIGHT
  1081. 2014-2019, The Syncthing Authors
  1082. .\" Generated by docutils manpage writer.
  1083. .