syncthing-event-api.7 22 KB

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