syncthing-event-api.7 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042
  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" "Jan 12, 2022" "v1" "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 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
  219. .sp
  220. Deprecated since version v1.13.0: This event is still emitted for compatibility, but deprecated. Use
  221. the replacement pending\-devices\-changed 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. }
  404. }
  405. .ft P
  406. .fi
  407. .UNINDENT
  408. .UNINDENT
  409. .SS FolderErrors
  410. .sp
  411. The \fBFolderErrors\fP event is emitted when a folder cannot be successfully
  412. synchronized. The event contains the ID of the affected folder and a list of
  413. errors for files or directories therein. This list of errors is obsolete once
  414. the folder changes state to \fBsyncing\fP \- if errors remain after the next
  415. synchronization attempt, a new \fBFolderErrors\fP event is emitted.
  416. .INDENT 0.0
  417. .INDENT 3.5
  418. .sp
  419. .nf
  420. .ft C
  421. {
  422. "id": 132,
  423. "type": "FolderErrors",
  424. "time": "2015\-06\-26T13:39:24.697401384+02:00",
  425. "data": {
  426. "errors": [
  427. {
  428. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/h2j/.syncthing.aslkjd.tmp: permission denied",
  429. "path": "h2j/aslkjd"
  430. }
  431. ],
  432. "folder": "default"
  433. }
  434. }
  435. .ft P
  436. .fi
  437. .UNINDENT
  438. .UNINDENT
  439. .sp
  440. New in version 0.11.12.
  441. .sp
  442. \fBSEE ALSO:\fP
  443. .INDENT 0.0
  444. .INDENT 3.5
  445. The statechanged event.
  446. .UNINDENT
  447. .UNINDENT
  448. .SS FolderPaused
  449. .sp
  450. Generated when the configuration changes regarding the “paused” state
  451. of a folder. Sent repeatedly for each changed folder.
  452. .INDENT 0.0
  453. .INDENT 3.5
  454. .sp
  455. .nf
  456. .ft C
  457. {
  458. "id": 93,
  459. "globalID": 93,
  460. "type": "FolderPaused",
  461. "time": "2021\-06\-07T23:45:03.414609034+02:00",
  462. "data": {
  463. "id": "abcde\-fghij",
  464. "label": "My folder"
  465. }
  466. }
  467. .ft P
  468. .fi
  469. .UNINDENT
  470. .UNINDENT
  471. .SS FolderRejected
  472. .sp
  473. Deprecated since version v1.13.0: This event is still emitted for compatibility, but deprecated. Use
  474. the replacement pending\-folders\-changed event instead.
  475. .sp
  476. Emitted when a device sends index information for a folder we do not
  477. have, or have but do not share with the device in question.
  478. .INDENT 0.0
  479. .INDENT 3.5
  480. .sp
  481. .nf
  482. .ft C
  483. {
  484. "id": 27,
  485. "globalID": 27,
  486. "type": "FolderRejected",
  487. "time": "2014\-08\-19T10:41:06.761751399+02:00",
  488. "data": {
  489. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  490. "folder": "GXWxf\-3zgnU",
  491. "folderLabel": "My Pictures"
  492. }
  493. }
  494. .ft P
  495. .fi
  496. .UNINDENT
  497. .UNINDENT
  498. .SS FolderResumed
  499. .sp
  500. Generated when the configuration changes regarding the “paused” state
  501. of a folder. Sent repeatedly for each changed folder.
  502. .INDENT 0.0
  503. .INDENT 3.5
  504. .sp
  505. .nf
  506. .ft C
  507. {
  508. "id": 93,
  509. "globalID": 93,
  510. "type": "FolderResumed",
  511. "time": "2021\-06\-07T23:45:03.414609034+02:00",
  512. "data": {
  513. "id": "abcde\-fghij",
  514. "label": "My folder"
  515. }
  516. }
  517. .ft P
  518. .fi
  519. .UNINDENT
  520. .UNINDENT
  521. .SS FolderScanProgress
  522. .sp
  523. Emitted in regular intervals (folder setting ProgressIntervalS, 2s by default)
  524. during scans giving the amount of bytes already scanned and to be scanned in
  525. total , as well as the current scanning rates in bytes per second.
  526. .INDENT 0.0
  527. .INDENT 3.5
  528. .sp
  529. .nf
  530. .ft C
  531. {
  532. "data" : {
  533. "total" : 1,
  534. "rate" : 0,
  535. "current" : 0,
  536. "folder" : "bd7q3\-zskm5"
  537. },
  538. "globalID" : 29,
  539. "type" : "FolderScanProgress",
  540. "time" : "2017\-03\-06T15:00:58.072004209+01:00",
  541. "id" : 29
  542. }
  543. .ft P
  544. .fi
  545. .UNINDENT
  546. .UNINDENT
  547. .SS FolderSummary
  548. .sp
  549. The FolderSummary event is emitted when folder contents have changed
  550. locally. This can be used to calculate the current local completion
  551. state.
  552. .INDENT 0.0
  553. .INDENT 3.5
  554. .sp
  555. .nf
  556. .ft C
  557. {
  558. "id": 16,
  559. "globalID": 16,
  560. "type": "FolderSummary",
  561. "time": "2015\-04\-17T14:12:20.460121585+09:00",
  562. "data": {
  563. "folder": "default",
  564. "summary": {
  565. "globalBytes": 0,
  566. "globalDeleted": 0,
  567. "globalFiles": 0,
  568. "ignorePatterns": false,
  569. "inSyncBytes": 0,
  570. "inSyncFiles": 0,
  571. "invalid": "",
  572. "localBytes": 0,
  573. "localDeleted": 0,
  574. "localFiles": 0,
  575. "needBytes": 0,
  576. "needFiles": 0,
  577. "state": "idle",
  578. "stateChanged": "2015\-04\-17T14:12:12.455224687+09:00",
  579. "version": 0
  580. }
  581. }
  582. }
  583. .ft P
  584. .fi
  585. .UNINDENT
  586. .UNINDENT
  587. .SS ItemFinished
  588. .sp
  589. Generated when Syncthing ends synchronizing a file to a newer version. A
  590. successful operation:
  591. .INDENT 0.0
  592. .INDENT 3.5
  593. .sp
  594. .nf
  595. .ft C
  596. {
  597. "id": 93,
  598. "globalID": 93,
  599. "type": "ItemFinished",
  600. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  601. "data": {
  602. "item": "test.txt",
  603. "folder": "default",
  604. "error": null,
  605. "type": "file",
  606. "action": "update"
  607. }
  608. }
  609. .ft P
  610. .fi
  611. .UNINDENT
  612. .UNINDENT
  613. .sp
  614. An unsuccessful operation:
  615. .INDENT 0.0
  616. .INDENT 3.5
  617. .sp
  618. .nf
  619. .ft C
  620. {
  621. "id": 44,
  622. "globalID": 44,
  623. "type": "ItemFinished",
  624. "time": "2015\-05\-27T11:21:05.711133004+02:00",
  625. "data": {
  626. "action": "update",
  627. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/foo/.syncthing.hej.tmp: permission denied",
  628. "folder": "default",
  629. "item": "foo/hej",
  630. "type": "file"
  631. }
  632. }
  633. .ft P
  634. .fi
  635. .UNINDENT
  636. .UNINDENT
  637. .sp
  638. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  639. .sp
  640. New in version 0.11.10: The \fBmetadata\fP action.
  641. .SS ItemStarted
  642. .sp
  643. Generated when Syncthing begins synchronizing a file to a newer version.
  644. .INDENT 0.0
  645. .INDENT 3.5
  646. .sp
  647. .nf
  648. .ft C
  649. {
  650. "id": 93,
  651. "globalID": 93,
  652. "type": "ItemStarted",
  653. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  654. "data": {
  655. "item": "test.txt",
  656. "folder": "default",
  657. "type": "file",
  658. "action": "update"
  659. }
  660. }
  661. .ft P
  662. .fi
  663. .UNINDENT
  664. .UNINDENT
  665. .sp
  666. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  667. .sp
  668. New in version 0.11.10: The \fBmetadata\fP action.
  669. .SS ListenAddressesChanged
  670. .sp
  671. This event is emitted when a listen address changes.
  672. .INDENT 0.0
  673. .INDENT 3.5
  674. .sp
  675. .nf
  676. .ft C
  677. {
  678. "type" : "ListenAddressesChanged",
  679. "id" : 70,
  680. "time" : "2017\-03\-06T15:01:24.88340663+01:00",
  681. "globalID" : 70,
  682. "data" : {
  683. "address" : {
  684. "Fragment" : "",
  685. "RawQuery" : "",
  686. "Scheme" : "dynamic+https",
  687. "Path" : "/endpoint",
  688. "RawPath" : "",
  689. "User" : null,
  690. "ForceQuery" : false,
  691. "Host" : "relays.syncthing.net",
  692. "Opaque" : ""
  693. },
  694. "wan" : [
  695. {
  696. "ForceQuery" : false,
  697. "User" : null,
  698. "Host" : "31.15.66.212:443",
  699. "Opaque" : "",
  700. "Path" : "/",
  701. "RawPath" : "",
  702. "RawQuery" : "id=F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=",
  703. "Scheme" : "relay",
  704. "Fragment" : ""
  705. }
  706. ],
  707. "lan" : [
  708. {
  709. "RawQuery" : "id=F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=",
  710. "Scheme" : "relay",
  711. "Fragment" : "",
  712. "RawPath" : "",
  713. "Path" : "/",
  714. "Host" : "31.15.66.212:443",
  715. "Opaque" : "",
  716. "ForceQuery" : false,
  717. "User" : null
  718. }
  719. ]
  720. }
  721. }
  722. .ft P
  723. .fi
  724. .UNINDENT
  725. .UNINDENT
  726. .SS LocalChangeDetected
  727. .sp
  728. Generated upon scan whenever the local disk has discovered an updated file from the
  729. previous scan. This does \fInot\fP include events that are discovered and copied from
  730. other devices (remote\-change\-detected), only files that were changed on the
  731. local filesystem.
  732. .INDENT 0.0
  733. .INDENT 3.5
  734. .sp
  735. .nf
  736. .ft C
  737. {
  738. "id": 7,
  739. "globalID": 59,
  740. "time": "2016\-09\-26T22:07:10.7189141\-04:00",
  741. "type": "LocalChangeDetected",
  742. "data": {
  743. "action": "deleted",
  744. "folderID": "vitwy\-zjxqt",
  745. "label": "TestSync",
  746. "path": "C:\e\eUsers\e\eNate\e\eSync\e\etestfolder\e\etest file.rtf",
  747. "type": "file"
  748. }
  749. }
  750. .ft P
  751. .fi
  752. .UNINDENT
  753. .UNINDENT
  754. .SS LocalIndexUpdated
  755. .sp
  756. Generated when the local index information has changed, due to
  757. synchronizing one or more items from the cluster or discovering local
  758. changes during a scan.
  759. .INDENT 0.0
  760. .INDENT 3.5
  761. .sp
  762. .nf
  763. .ft C
  764. {
  765. "id": 59,
  766. "globalID": 59,
  767. "type": "LocalIndexUpdated",
  768. "time": "2014\-07\-17T13:27:28.051369434+02:00",
  769. "data": {
  770. "folder": "default",
  771. "items": 1000,
  772. }
  773. }
  774. .ft P
  775. .fi
  776. .UNINDENT
  777. .UNINDENT
  778. .SS LoginAttempt
  779. .sp
  780. When authentication is enabled for the GUI, this event is emitted on every
  781. login attempt. If either the username or password are incorrect, \fBsuccess\fP
  782. is false and in any case the given username is returned. The included
  783. remote address concerns the immediate connecting host, which may not be the
  784. origin of the request, but e.g. a reverse proxy.
  785. .INDENT 0.0
  786. .INDENT 3.5
  787. .sp
  788. .nf
  789. .ft C
  790. {
  791. "id" : 187,
  792. "time" : "2017\-03\-07T00:19:24.420386143+01:00",
  793. "data" : {
  794. "remoteAddress" : "127.0.0.1:55530",
  795. "username" : "somename",
  796. "success" : false
  797. },
  798. "type" : "LoginAttempt",
  799. "globalID" : 195
  800. }
  801. .ft P
  802. .fi
  803. .UNINDENT
  804. .UNINDENT
  805. .SS PendingDevicesChanged
  806. .sp
  807. New in version 1.14.0.
  808. .sp
  809. Emitted when pending devices were added / updated (connection from
  810. unknown ID) or removed (device is ignored, dismissed or added).
  811. .INDENT 0.0
  812. .INDENT 3.5
  813. .sp
  814. .nf
  815. .ft C
  816. {
  817. "id": 87,
  818. "type": "PendingDevicesChanged",
  819. "time": "2020\-12\-22T22:24:37.578586718+01:00",
  820. "data": {
  821. "added": [
  822. {
  823. "address": "127.0.0.1:51807",
  824. "deviceID": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  825. "name": "My dusty computer"
  826. }
  827. ],
  828. "removed": [
  829. {
  830. "deviceID": "P56IOI7\-MZJNU2Y\-IQGDREY\-DM2MGTI\-MGL3BXN\-PQ6W5BM\-TBBZ4TJ\-XZWICQ2"
  831. }
  832. ]
  833. }
  834. }
  835. .ft P
  836. .fi
  837. .UNINDENT
  838. .UNINDENT
  839. .SS PendingFoldersChanged
  840. .sp
  841. New in version 1.14.0.
  842. .sp
  843. Emitted when pending folders were added / updated (offered by some
  844. device, but not shared to them) or removed (folder ignored, dismissed
  845. or added or no longer offered from the remote device). A removed
  846. entry without a \fBdeviceID\fP attribute means that the folder is no
  847. longer pending for any device.
  848. .INDENT 0.0
  849. .INDENT 3.5
  850. .sp
  851. .nf
  852. .ft C
  853. {
  854. "id": 101,
  855. "type": "PendingFoldersChanged",
  856. "time": "2020\-12\-22T22:36:55.66744317+01:00",
  857. "data": {
  858. "added": [
  859. {
  860. "deviceID": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  861. "folderID": "GXWxf\-3zgnU",
  862. "folderLabel": "My Pictures"
  863. "receiveEncrypted": "false"
  864. "remoteEncrypted": "false"
  865. }
  866. ],
  867. "removed": [
  868. {
  869. "deviceID": "P56IOI7\-MZJNU2Y\-IQGDREY\-DM2MGTI\-MGL3BXN\-PQ6W5BM\-TBBZ4TJ\-XZWICQ2",
  870. "folderID": "neyfh\-sa2nu"
  871. },
  872. {
  873. "folderID": "abcde\-fghij"
  874. }
  875. ]
  876. }
  877. }
  878. .ft P
  879. .fi
  880. .UNINDENT
  881. .UNINDENT
  882. .SS RemoteChangeDetected
  883. .sp
  884. Generated upon scan whenever a file is locally updated due to a remote change.
  885. Files that are updated locally produce a local\-change\-detected event.
  886. .INDENT 0.0
  887. .INDENT 3.5
  888. .sp
  889. .nf
  890. .ft C
  891. {
  892. "time" : "2017\-03\-06T23:58:21.844739891+01:00",
  893. "globalID" : 123,
  894. "data" : {
  895. "type" : "file",
  896. "action" : "deleted",
  897. "path" : "/media/ntfs_data/Dokumente/testfile",
  898. "label" : "Dokumente",
  899. "folderID" : "Dokumente",
  900. "modifiedBy" : "BPDFDTU"
  901. },
  902. "type" : "RemoteChangeDetected",
  903. "id" : 2
  904. }
  905. .ft P
  906. .fi
  907. .UNINDENT
  908. .UNINDENT
  909. .SS RemoteDownloadProgress
  910. .sp
  911. This event is emitted when a download\-progress message is
  912. received. It returns a map \fBdata\fP of filenames with a count of
  913. downloaded blocks. The files in questions are currently being
  914. downloaded on the remote \fBdevice\fP and belong to \fBfolder\fP\&.
  915. .INDENT 0.0
  916. .INDENT 3.5
  917. .sp
  918. .nf
  919. .ft C
  920. {
  921. "time" : "2017\-03\-07T00:11:37.65838955+01:00",
  922. "globalID" : 170,
  923. "data" : {
  924. "state" : {
  925. "tahr64\-6.0.5.iso" : 1784
  926. },
  927. "device" : "F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A",
  928. "folder" : "Dokumente"
  929. },
  930. "type" : "RemoteDownloadProgress",
  931. "id" : 163
  932. }
  933. .ft P
  934. .fi
  935. .UNINDENT
  936. .UNINDENT
  937. .SS RemoteIndexUpdated
  938. .sp
  939. Generated each time new index information is received from a device.
  940. .INDENT 0.0
  941. .INDENT 3.5
  942. .sp
  943. .nf
  944. .ft C
  945. {
  946. "id": 44,
  947. "globalID": 44,
  948. "type": "RemoteIndexUpdated",
  949. "time": "2014\-07\-13T21:04:35.394184435+02:00",
  950. "data": {
  951. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG",
  952. "folder": "lightroom",
  953. "items": 1000
  954. }
  955. }
  956. .ft P
  957. .fi
  958. .UNINDENT
  959. .UNINDENT
  960. .SS Starting
  961. .sp
  962. Emitted exactly once, when Syncthing starts, before parsing
  963. configuration etc.
  964. .INDENT 0.0
  965. .INDENT 3.5
  966. .sp
  967. .nf
  968. .ft C
  969. {
  970. "id": 1,
  971. "globalID": 1,
  972. "type": "Starting",
  973. "time": "2014\-07\-17T13:13:32.044470055+02:00",
  974. "data": {
  975. "home": "/home/jb/.config/syncthing"
  976. }
  977. }
  978. .ft P
  979. .fi
  980. .UNINDENT
  981. .UNINDENT
  982. .SS StartupComplete
  983. .sp
  984. Emitted exactly once, when initialization is complete and Syncthing is
  985. ready to start exchanging data with other devices.
  986. .INDENT 0.0
  987. .INDENT 3.5
  988. .sp
  989. .nf
  990. .ft C
  991. {
  992. "id": 1,
  993. "globalID": 1,
  994. "type": "StartupComplete",
  995. "time": "2014\-07\-13T21:03:18.383239179+02:00",
  996. "data": null
  997. }
  998. .ft P
  999. .fi
  1000. .UNINDENT
  1001. .UNINDENT
  1002. .SS StateChanged
  1003. .sp
  1004. Emitted when a folder changes state. Possible states are \fBidle\fP,
  1005. \fBscanning\fP, \fBsyncing\fP and \fBerror\fP\&. The field \fBduration\fP is
  1006. the number of seconds the folder spent in state \fBfrom\fP\&. In the example
  1007. below, the folder \fBdefault\fP was in state \fBscanning\fP for 0.198
  1008. seconds and is now in state \fBidle\fP\&.
  1009. .INDENT 0.0
  1010. .INDENT 3.5
  1011. .sp
  1012. .nf
  1013. .ft C
  1014. {
  1015. "id": 8,
  1016. "globalID": 8,
  1017. "type": "StateChanged",
  1018. "time": "2014\-07\-17T13:14:28.697493016+02:00",
  1019. "data": {
  1020. "folder": "default",
  1021. "from": "scanning",
  1022. "duration": 0.19782869900000002,
  1023. "to": "idle"
  1024. }
  1025. }
  1026. .ft P
  1027. .fi
  1028. .UNINDENT
  1029. .UNINDENT
  1030. .SH AUTHOR
  1031. The Syncthing Authors
  1032. .SH COPYRIGHT
  1033. 2014-2019, The Syncthing Authors
  1034. .\" Generated by docutils manpage writer.
  1035. .