syncthing-event-api.7 23 KB

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