syncthing-event-api.7 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-EVENT-API" "7" "Dec 05, 2020" "v1" "Syncthing"
  4. .SH NAME
  5. syncthing-event-api \- Event API
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH DESCRIPTION
  34. .sp
  35. Syncthing provides a simple long polling interface for exposing events from the
  36. core utility towards a GUI. 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. Emitted when there is a connection from a device we are not configured
  218. to talk to.
  219. .INDENT 0.0
  220. .INDENT 3.5
  221. .sp
  222. .nf
  223. .ft C
  224. {
  225. "id": 24,
  226. "globalID": 24,
  227. "type": "DeviceRejected",
  228. "time": "2014\-08\-19T10:43:00.562821045+02:00",
  229. "data": {
  230. "address": "127.0.0.1:51807",
  231. "name": "My dusty computer",
  232. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK"
  233. }
  234. }
  235. .ft P
  236. .fi
  237. .UNINDENT
  238. .UNINDENT
  239. .SS DeviceResumed
  240. .sp
  241. Generated each time a device was resumed.
  242. .INDENT 0.0
  243. .INDENT 3.5
  244. .sp
  245. .nf
  246. .ft C
  247. {
  248. "id": 2,
  249. "globalID": 2,
  250. "type": "DeviceResumed",
  251. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  252. "data": {
  253. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  254. }
  255. }
  256. .ft P
  257. .fi
  258. .UNINDENT
  259. .UNINDENT
  260. .SS DownloadProgress
  261. .sp
  262. Emitted during file downloads for each folder for each file. By default
  263. only a single file in a folder is handled at the same time, but custom
  264. configuration can cause multiple files to be shown.
  265. .INDENT 0.0
  266. .INDENT 3.5
  267. .sp
  268. .nf
  269. .ft C
  270. {
  271. "id": 221,
  272. "globalID": 221,
  273. "type": "DownloadProgress",
  274. "time": "2014\-12\-13T00:26:12.9876937Z",
  275. "data": {
  276. "folder1": {
  277. "file1": {
  278. "total": 800,
  279. "pulling": 2,
  280. "copiedFromOrigin": 0,
  281. "reused": 633,
  282. "copiedFromElsewhere": 0,
  283. "pulled": 38,
  284. "bytesTotal": 104792064,
  285. "bytesDone": 87883776
  286. },
  287. "dir\e\efile2": {
  288. "total": 80,
  289. "pulling": 2,
  290. "copiedFromOrigin": 0,
  291. "reused": 0,
  292. "copiedFromElsewhere": 0,
  293. "pulled": 32,
  294. "bytesTotal": 10420224,
  295. "bytesDone": 4128768
  296. }
  297. },
  298. "folder2": {
  299. "file3": {
  300. "total": 800,
  301. "pulling": 2,
  302. "copiedFromOrigin": 0,
  303. "reused": 633,
  304. "copiedFromElsewhere": 0,
  305. "pulled": 38,
  306. "bytesTotal": 104792064,
  307. "bytesDone": 87883776
  308. },
  309. "dir\e\efile4": {
  310. "total": 80,
  311. "pulling": 2,
  312. "copiedFromOrigin": 0,
  313. "reused": 0,
  314. "copiedFromElsewhere": 0,
  315. "pulled": 32,
  316. "bytesTotal": 10420224,
  317. "bytesDone": 4128768
  318. }
  319. }
  320. }
  321. }
  322. .ft P
  323. .fi
  324. .UNINDENT
  325. .UNINDENT
  326. .INDENT 0.0
  327. .IP \(bu 2
  328. \fBtotal\fP \- total number of blocks in the file
  329. .IP \(bu 2
  330. \fBpulling\fP \- number of blocks currently being downloaded
  331. .IP \(bu 2
  332. \fBcopiedFromOrigin\fP \- number of blocks copied from the file we are
  333. about to replace
  334. .IP \(bu 2
  335. \fBreused\fP \- number of blocks reused from a previous temporary file
  336. .IP \(bu 2
  337. \fBcopiedFromElsewhere\fP \- number of blocks copied from other files or
  338. potentially other folders
  339. .IP \(bu 2
  340. \fBpulled\fP \- number of blocks actually downloaded so far
  341. .IP \(bu 2
  342. \fBbytesTotal\fP \- approximate total file size
  343. .IP \(bu 2
  344. \fBbytesDone\fP \- approximate number of bytes already handled (already
  345. reused, copied or pulled)
  346. .UNINDENT
  347. .sp
  348. Where block size is 128KB.
  349. .sp
  350. Files/folders appearing in the event data imply that the download has
  351. been started for that file/folder, where disappearing implies that the
  352. downloads have been finished or failed for that file/folder. There is
  353. always a last event emitted with no data, which implies all downloads
  354. have finished/failed.
  355. .SS FolderCompletion
  356. .sp
  357. The \fBFolderCompletion\fP event is emitted when the local or remote
  358. contents for a folder changes. It contains the completion percentage for
  359. a given remote device and is emitted once per currently connected remote
  360. device.
  361. .INDENT 0.0
  362. .INDENT 3.5
  363. .sp
  364. .nf
  365. .ft C
  366. {
  367. "id": 84,
  368. "globalID": 84,
  369. "type": "FolderCompletion",
  370. "time": "2015\-04\-17T14:14:27.043576583+09:00",
  371. "data": {
  372. "completion": 100,
  373. "device": "I6KAH76\-66SLLLB\-5PFXSOA\-UFJCDZC\-YAOMLEK\-CP2GB32\-BV5RQST\-3PSROAU",
  374. "folder": "default"
  375. }
  376. }
  377. .ft P
  378. .fi
  379. .UNINDENT
  380. .UNINDENT
  381. .SS FolderErrors
  382. .sp
  383. The \fBFolderErrors\fP event is emitted when a folder cannot be successfully
  384. synchronized. The event contains the ID of the affected folder and a list of
  385. errors for files or directories therein. This list of errors is obsolete once
  386. the folder changes state to \fBsyncing\fP \- if errors remain after the next
  387. synchronization attempt, a new \fBFolderErrors\fP event is emitted.
  388. .INDENT 0.0
  389. .INDENT 3.5
  390. .sp
  391. .nf
  392. .ft C
  393. {
  394. "id": 132,
  395. "type": "FolderErrors",
  396. "time": "2015\-06\-26T13:39:24.697401384+02:00",
  397. "data": {
  398. "errors": [
  399. {
  400. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/h2j/.syncthing.aslkjd.tmp: permission denied",
  401. "path": "h2j/aslkjd"
  402. }
  403. ],
  404. "folder": "default"
  405. }
  406. }
  407. .ft P
  408. .fi
  409. .UNINDENT
  410. .UNINDENT
  411. .sp
  412. New in version 0.11.12.
  413. .sp
  414. \fBSEE ALSO:\fP
  415. .INDENT 0.0
  416. .INDENT 3.5
  417. The statechanged event.
  418. .UNINDENT
  419. .UNINDENT
  420. .SS FolderRejected
  421. .sp
  422. Emitted when a device sends index information for a folder we do not
  423. have, or have but do not share with the device in question.
  424. .INDENT 0.0
  425. .INDENT 3.5
  426. .sp
  427. .nf
  428. .ft C
  429. {
  430. "id": 27,
  431. "globalID": 27,
  432. "type": "FolderRejected",
  433. "time": "2014\-08\-19T10:41:06.761751399+02:00",
  434. "data": {
  435. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  436. "folder": "GXWxf\-3zgnU",
  437. "folderLabel": "My Pictures"
  438. }
  439. }
  440. .ft P
  441. .fi
  442. .UNINDENT
  443. .UNINDENT
  444. .SS Folder Scan Progress
  445. .sp
  446. Emitted in regular intervals (folder setting ProgressIntervalS, 2s by default)
  447. during scans giving the amount of bytes already scanned and to be scanned in
  448. total , as well as the current scanning rates in bytes per second.
  449. .INDENT 0.0
  450. .INDENT 3.5
  451. .sp
  452. .nf
  453. .ft C
  454. {
  455. "data" : {
  456. "total" : 1,
  457. "rate" : 0,
  458. "current" : 0,
  459. "folder" : "bd7q3\-zskm5"
  460. },
  461. "globalID" : 29,
  462. "type" : "FolderScanProgress",
  463. "time" : "2017\-03\-06T15:00:58.072004209+01:00",
  464. "id" : 29
  465. }
  466. .ft P
  467. .fi
  468. .UNINDENT
  469. .UNINDENT
  470. .SS FolderSummary
  471. .sp
  472. The FolderSummary event is emitted when folder contents have changed
  473. locally. This can be used to calculate the current local completion
  474. state.
  475. .INDENT 0.0
  476. .INDENT 3.5
  477. .sp
  478. .nf
  479. .ft C
  480. {
  481. "id": 16,
  482. "globalID": 16,
  483. "type": "FolderSummary",
  484. "time": "2015\-04\-17T14:12:20.460121585+09:00",
  485. "data": {
  486. "folder": "default",
  487. "summary": {
  488. "globalBytes": 0,
  489. "globalDeleted": 0,
  490. "globalFiles": 0,
  491. "ignorePatterns": false,
  492. "inSyncBytes": 0,
  493. "inSyncFiles": 0,
  494. "invalid": "",
  495. "localBytes": 0,
  496. "localDeleted": 0,
  497. "localFiles": 0,
  498. "needBytes": 0,
  499. "needFiles": 0,
  500. "state": "idle",
  501. "stateChanged": "2015\-04\-17T14:12:12.455224687+09:00",
  502. "version": 0
  503. }
  504. }
  505. }
  506. .ft P
  507. .fi
  508. .UNINDENT
  509. .UNINDENT
  510. .SS ItemFinished
  511. .sp
  512. Generated when Syncthing ends synchronizing a file to a newer version. A
  513. successful operation:
  514. .INDENT 0.0
  515. .INDENT 3.5
  516. .sp
  517. .nf
  518. .ft C
  519. {
  520. "id": 93,
  521. "globalID": 93,
  522. "type": "ItemFinished",
  523. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  524. "data": {
  525. "item": "test.txt",
  526. "folder": "default",
  527. "error": null,
  528. "type": "file",
  529. "action": "update"
  530. }
  531. }
  532. .ft P
  533. .fi
  534. .UNINDENT
  535. .UNINDENT
  536. .sp
  537. An unsuccessful operation:
  538. .INDENT 0.0
  539. .INDENT 3.5
  540. .sp
  541. .nf
  542. .ft C
  543. {
  544. "id": 44,
  545. "globalID": 44,
  546. "type": "ItemFinished",
  547. "time": "2015\-05\-27T11:21:05.711133004+02:00",
  548. "data": {
  549. "action": "update",
  550. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/foo/.syncthing.hej.tmp: permission denied",
  551. "folder": "default",
  552. "item": "foo/hej",
  553. "type": "file"
  554. }
  555. }
  556. .ft P
  557. .fi
  558. .UNINDENT
  559. .UNINDENT
  560. .sp
  561. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  562. .sp
  563. New in version 0.11.10: The \fBmetadata\fP action.
  564. .SS ItemStarted
  565. .sp
  566. Generated when Syncthing begins synchronizing a file to a newer version.
  567. .INDENT 0.0
  568. .INDENT 3.5
  569. .sp
  570. .nf
  571. .ft C
  572. {
  573. "id": 93,
  574. "globalID": 93,
  575. "type": "ItemStarted",
  576. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  577. "data": {
  578. "item": "test.txt",
  579. "folder": "default",
  580. "type": "file",
  581. "action": "update"
  582. }
  583. }
  584. .ft P
  585. .fi
  586. .UNINDENT
  587. .UNINDENT
  588. .sp
  589. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  590. .sp
  591. New in version 0.11.10: The \fBmetadata\fP action.
  592. .SS Listen Addresses Changed
  593. .sp
  594. This event is emitted when a listen address changes.
  595. .INDENT 0.0
  596. .INDENT 3.5
  597. .sp
  598. .nf
  599. .ft C
  600. {
  601. "type" : "ListenAddressesChanged",
  602. "id" : 70,
  603. "time" : "2017\-03\-06T15:01:24.88340663+01:00",
  604. "globalID" : 70,
  605. "data" : {
  606. "address" : {
  607. "Fragment" : "",
  608. "RawQuery" : "",
  609. "Scheme" : "dynamic+https",
  610. "Path" : "/endpoint",
  611. "RawPath" : "",
  612. "User" : null,
  613. "ForceQuery" : false,
  614. "Host" : "relays.syncthing.net",
  615. "Opaque" : ""
  616. },
  617. "wan" : [
  618. {
  619. "ForceQuery" : false,
  620. "User" : null,
  621. "Host" : "31.15.66.212:443",
  622. "Opaque" : "",
  623. "Path" : "/",
  624. "RawPath" : "",
  625. "RawQuery" : "id=F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=",
  626. "Scheme" : "relay",
  627. "Fragment" : ""
  628. }
  629. ],
  630. "lan" : [
  631. {
  632. "RawQuery" : "id=F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=",
  633. "Scheme" : "relay",
  634. "Fragment" : "",
  635. "RawPath" : "",
  636. "Path" : "/",
  637. "Host" : "31.15.66.212:443",
  638. "Opaque" : "",
  639. "ForceQuery" : false,
  640. "User" : null
  641. }
  642. ]
  643. }
  644. }
  645. .ft P
  646. .fi
  647. .UNINDENT
  648. .UNINDENT
  649. .SS LocalChangeDetected
  650. .sp
  651. Generated upon scan whenever the local disk has discovered an updated file from the
  652. previous scan. This does \fInot\fP include events that are discovered and copied from
  653. other devices (remote\-change\-detected), only files that were changed on the
  654. local filesystem.
  655. .INDENT 0.0
  656. .INDENT 3.5
  657. .sp
  658. .nf
  659. .ft C
  660. {
  661. "id": 7,
  662. "globalID": 59,
  663. "time": "2016\-09\-26T22:07:10.7189141\-04:00",
  664. "type": "LocalChangeDetected",
  665. "data": {
  666. "action": "deleted",
  667. "folderID": "vitwy\-zjxqt",
  668. "label": "TestSync",
  669. "path": "C:\e\eUsers\e\eNate\e\eSync\e\etestfolder\e\etest file.rtf",
  670. "type": "file"
  671. }
  672. }
  673. .ft P
  674. .fi
  675. .UNINDENT
  676. .UNINDENT
  677. .SS LocalIndexUpdated
  678. .sp
  679. Generated when the local index information has changed, due to
  680. synchronizing one or more items from the cluster or discovering local
  681. changes during a scan.
  682. .INDENT 0.0
  683. .INDENT 3.5
  684. .sp
  685. .nf
  686. .ft C
  687. {
  688. "id": 59,
  689. "globalID": 59,
  690. "type": "LocalIndexUpdated",
  691. "time": "2014\-07\-17T13:27:28.051369434+02:00",
  692. "data": {
  693. "folder": "default",
  694. "items": 1000,
  695. }
  696. }
  697. .ft P
  698. .fi
  699. .UNINDENT
  700. .UNINDENT
  701. .SS Login Attempt
  702. .sp
  703. When authentication is enabled for the GUI, this event is emitted on every
  704. login attempt. If either the username or password are incorrect, \fBsuccess\fP
  705. is false and in any case the given username is returned.
  706. .INDENT 0.0
  707. .INDENT 3.5
  708. .sp
  709. .nf
  710. .ft C
  711. {
  712. "id" : 187,
  713. "time" : "2017\-03\-07T00:19:24.420386143+01:00",
  714. "data" : {
  715. "username" : "somename",
  716. "success" : false
  717. },
  718. "type" : "LoginAttempt",
  719. "globalID" : 195
  720. }
  721. .ft P
  722. .fi
  723. .UNINDENT
  724. .UNINDENT
  725. .SS RemoteChangeDetected
  726. .sp
  727. Generated upon scan whenever a file is locally updated due to a remote change.
  728. Files that are updated locally produce a local\-change\-detected event.
  729. .INDENT 0.0
  730. .INDENT 3.5
  731. .sp
  732. .nf
  733. .ft C
  734. {
  735. "time" : "2017\-03\-06T23:58:21.844739891+01:00",
  736. "globalID" : 123,
  737. "data" : {
  738. "type" : "file",
  739. "action" : "deleted",
  740. "path" : "/media/ntfs_data/Dokumente/testfile",
  741. "label" : "Dokumente",
  742. "folderID" : "Dokumente",
  743. "modifiedBy" : "BPDFDTU"
  744. },
  745. "type" : "RemoteChangeDetected",
  746. "id" : 2
  747. }
  748. .ft P
  749. .fi
  750. .UNINDENT
  751. .UNINDENT
  752. .SS Remote Download Progress
  753. .sp
  754. This event is emitted when a download\-progress message is
  755. received. It returns a map \fBdata\fP of filenames with a count of
  756. downloaded blocks. The files in questions are currently being
  757. downloaded on the remote \fBdevice\fP and belong to \fBfolder\fP\&.
  758. .INDENT 0.0
  759. .INDENT 3.5
  760. .sp
  761. .nf
  762. .ft C
  763. {
  764. "time" : "2017\-03\-07T00:11:37.65838955+01:00",
  765. "globalID" : 170,
  766. "data" : {
  767. "state" : {
  768. "tahr64\-6.0.5.iso" : 1784
  769. },
  770. "device" : "F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A",
  771. "folder" : "Dokumente"
  772. },
  773. "type" : "RemoteDownloadProgress",
  774. "id" : 163
  775. }
  776. .ft P
  777. .fi
  778. .UNINDENT
  779. .UNINDENT
  780. .SS RemoteIndexUpdated
  781. .sp
  782. Generated each time new index information is received from a device.
  783. .INDENT 0.0
  784. .INDENT 3.5
  785. .sp
  786. .nf
  787. .ft C
  788. {
  789. "id": 44,
  790. "globalID": 44,
  791. "type": "RemoteIndexUpdated",
  792. "time": "2014\-07\-13T21:04:35.394184435+02:00",
  793. "data": {
  794. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG",
  795. "folder": "lightroom",
  796. "items": 1000
  797. }
  798. }
  799. .ft P
  800. .fi
  801. .UNINDENT
  802. .UNINDENT
  803. .SS Starting
  804. .sp
  805. Emitted exactly once, when Syncthing starts, before parsing
  806. configuration etc.
  807. .INDENT 0.0
  808. .INDENT 3.5
  809. .sp
  810. .nf
  811. .ft C
  812. {
  813. "id": 1,
  814. "globalID": 1,
  815. "type": "Starting",
  816. "time": "2014\-07\-17T13:13:32.044470055+02:00",
  817. "data": {
  818. "home": "/home/jb/.config/syncthing"
  819. }
  820. }
  821. .ft P
  822. .fi
  823. .UNINDENT
  824. .UNINDENT
  825. .SS StartupComplete
  826. .sp
  827. Emitted exactly once, when initialization is complete and Syncthing is
  828. ready to start exchanging data with other devices.
  829. .INDENT 0.0
  830. .INDENT 3.5
  831. .sp
  832. .nf
  833. .ft C
  834. {
  835. "id": 1,
  836. "globalID": 1,
  837. "type": "StartupComplete",
  838. "time": "2014\-07\-13T21:03:18.383239179+02:00",
  839. "data": null
  840. }
  841. .ft P
  842. .fi
  843. .UNINDENT
  844. .UNINDENT
  845. .SS StateChanged
  846. .sp
  847. Emitted when a folder changes state. Possible states are \fBidle\fP,
  848. \fBscanning\fP, \fBsyncing\fP and \fBerror\fP\&. The field \fBduration\fP is
  849. the number of seconds the folder spent in state \fBfrom\fP\&. In the example
  850. below, the folder \fBdefault\fP was in state \fBscanning\fP for 0.198
  851. seconds and is now in state \fBidle\fP\&.
  852. .INDENT 0.0
  853. .INDENT 3.5
  854. .sp
  855. .nf
  856. .ft C
  857. {
  858. "id": 8,
  859. "globalID": 8,
  860. "type": "StateChanged",
  861. "time": "2014\-07\-17T13:14:28.697493016+02:00",
  862. "data": {
  863. "folder": "default",
  864. "from": "scanning",
  865. "duration": 0.19782869900000002,
  866. "to": "idle"
  867. }
  868. }
  869. .ft P
  870. .fi
  871. .UNINDENT
  872. .UNINDENT
  873. .SH AUTHOR
  874. The Syncthing Authors
  875. .SH COPYRIGHT
  876. 2014-2019, The Syncthing Authors
  877. .\" Generated by docutils manpage writer.
  878. .