syncthing-event-api.7 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-EVENT-API" "7" "Apr 04, 2021" "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. 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.
  712. .INDENT 0.0
  713. .INDENT 3.5
  714. .sp
  715. .nf
  716. .ft C
  717. {
  718. "id" : 187,
  719. "time" : "2017\-03\-07T00:19:24.420386143+01:00",
  720. "data" : {
  721. "username" : "somename",
  722. "success" : false
  723. },
  724. "type" : "LoginAttempt",
  725. "globalID" : 195
  726. }
  727. .ft P
  728. .fi
  729. .UNINDENT
  730. .UNINDENT
  731. .SS PendingDevicesChanged
  732. .sp
  733. New in version 1.14.0.
  734. .sp
  735. Emitted when pending devices were added / updated (connection from
  736. unknown ID) or removed (device is ignored or added).
  737. .INDENT 0.0
  738. .INDENT 3.5
  739. .sp
  740. .nf
  741. .ft C
  742. {
  743. "id": 87,
  744. "type": "PendingDevicesChanged",
  745. "time": "2020\-12\-22T22:24:37.578586718+01:00",
  746. "data": {
  747. "added": [
  748. {
  749. "address": "127.0.0.1:51807",
  750. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  751. "name": "My dusty computer"
  752. }
  753. ],
  754. "removed": [
  755. {
  756. "device": "P56IOI7\-MZJNU2Y\-IQGDREY\-DM2MGTI\-MGL3BXN\-PQ6W5BM\-TBBZ4TJ\-XZWICQ2"
  757. }
  758. ]
  759. }
  760. }
  761. .ft P
  762. .fi
  763. .UNINDENT
  764. .UNINDENT
  765. .SS PendingFoldersChanged
  766. .sp
  767. New in version 1.14.0.
  768. .sp
  769. Emitted when pending folders were added / updated (offered by some
  770. device, but not shared to them) or removed (folder ignored or added or
  771. no longer offered from the remote device).
  772. .INDENT 0.0
  773. .INDENT 3.5
  774. .sp
  775. .nf
  776. .ft C
  777. {
  778. "id": 101,
  779. "type": "PendingFoldersChanged",
  780. "time": "2020\-12\-22T22:36:55.66744317+01:00",
  781. "data": {
  782. "added": [
  783. {
  784. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  785. "folder": "GXWxf\-3zgnU",
  786. "folderLabel": "My Pictures"
  787. }
  788. ],
  789. "removed": [
  790. {
  791. "device": "P56IOI7\-MZJNU2Y\-IQGDREY\-DM2MGTI\-MGL3BXN\-PQ6W5BM\-TBBZ4TJ\-XZWICQ2",
  792. "folder": "neyfh\-sa2nu"
  793. }
  794. ]
  795. }
  796. }
  797. .ft P
  798. .fi
  799. .UNINDENT
  800. .UNINDENT
  801. .SS RemoteChangeDetected
  802. .sp
  803. Generated upon scan whenever a file is locally updated due to a remote change.
  804. Files that are updated locally produce a local\-change\-detected event.
  805. .INDENT 0.0
  806. .INDENT 3.5
  807. .sp
  808. .nf
  809. .ft C
  810. {
  811. "time" : "2017\-03\-06T23:58:21.844739891+01:00",
  812. "globalID" : 123,
  813. "data" : {
  814. "type" : "file",
  815. "action" : "deleted",
  816. "path" : "/media/ntfs_data/Dokumente/testfile",
  817. "label" : "Dokumente",
  818. "folderID" : "Dokumente",
  819. "modifiedBy" : "BPDFDTU"
  820. },
  821. "type" : "RemoteChangeDetected",
  822. "id" : 2
  823. }
  824. .ft P
  825. .fi
  826. .UNINDENT
  827. .UNINDENT
  828. .SS Remote Download Progress
  829. .sp
  830. This event is emitted when a download\-progress message is
  831. received. It returns a map \fBdata\fP of filenames with a count of
  832. downloaded blocks. The files in questions are currently being
  833. downloaded on the remote \fBdevice\fP and belong to \fBfolder\fP\&.
  834. .INDENT 0.0
  835. .INDENT 3.5
  836. .sp
  837. .nf
  838. .ft C
  839. {
  840. "time" : "2017\-03\-07T00:11:37.65838955+01:00",
  841. "globalID" : 170,
  842. "data" : {
  843. "state" : {
  844. "tahr64\-6.0.5.iso" : 1784
  845. },
  846. "device" : "F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A",
  847. "folder" : "Dokumente"
  848. },
  849. "type" : "RemoteDownloadProgress",
  850. "id" : 163
  851. }
  852. .ft P
  853. .fi
  854. .UNINDENT
  855. .UNINDENT
  856. .SS RemoteIndexUpdated
  857. .sp
  858. Generated each time new index information is received from a device.
  859. .INDENT 0.0
  860. .INDENT 3.5
  861. .sp
  862. .nf
  863. .ft C
  864. {
  865. "id": 44,
  866. "globalID": 44,
  867. "type": "RemoteIndexUpdated",
  868. "time": "2014\-07\-13T21:04:35.394184435+02:00",
  869. "data": {
  870. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG",
  871. "folder": "lightroom",
  872. "items": 1000
  873. }
  874. }
  875. .ft P
  876. .fi
  877. .UNINDENT
  878. .UNINDENT
  879. .SS Starting
  880. .sp
  881. Emitted exactly once, when Syncthing starts, before parsing
  882. configuration etc.
  883. .INDENT 0.0
  884. .INDENT 3.5
  885. .sp
  886. .nf
  887. .ft C
  888. {
  889. "id": 1,
  890. "globalID": 1,
  891. "type": "Starting",
  892. "time": "2014\-07\-17T13:13:32.044470055+02:00",
  893. "data": {
  894. "home": "/home/jb/.config/syncthing"
  895. }
  896. }
  897. .ft P
  898. .fi
  899. .UNINDENT
  900. .UNINDENT
  901. .SS StartupComplete
  902. .sp
  903. Emitted exactly once, when initialization is complete and Syncthing is
  904. ready to start exchanging data with other devices.
  905. .INDENT 0.0
  906. .INDENT 3.5
  907. .sp
  908. .nf
  909. .ft C
  910. {
  911. "id": 1,
  912. "globalID": 1,
  913. "type": "StartupComplete",
  914. "time": "2014\-07\-13T21:03:18.383239179+02:00",
  915. "data": null
  916. }
  917. .ft P
  918. .fi
  919. .UNINDENT
  920. .UNINDENT
  921. .SS StateChanged
  922. .sp
  923. Emitted when a folder changes state. Possible states are \fBidle\fP,
  924. \fBscanning\fP, \fBsyncing\fP and \fBerror\fP\&. The field \fBduration\fP is
  925. the number of seconds the folder spent in state \fBfrom\fP\&. In the example
  926. below, the folder \fBdefault\fP was in state \fBscanning\fP for 0.198
  927. seconds and is now in state \fBidle\fP\&.
  928. .INDENT 0.0
  929. .INDENT 3.5
  930. .sp
  931. .nf
  932. .ft C
  933. {
  934. "id": 8,
  935. "globalID": 8,
  936. "type": "StateChanged",
  937. "time": "2014\-07\-17T13:14:28.697493016+02:00",
  938. "data": {
  939. "folder": "default",
  940. "from": "scanning",
  941. "duration": 0.19782869900000002,
  942. "to": "idle"
  943. }
  944. }
  945. .ft P
  946. .fi
  947. .UNINDENT
  948. .UNINDENT
  949. .SH AUTHOR
  950. The Syncthing Authors
  951. .SH COPYRIGHT
  952. 2014-2019, The Syncthing Authors
  953. .\" Generated by docutils manpage writer.
  954. .