syncthing-event-api.7 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-EVENT-API" "7" "April 23, 2017" "v0.14" "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.
  37. .sp
  38. To receive events, perform a HTTP GET of \fB/rest/events\fP or
  39. \fB/rest/events/disk\fP\&. The latter returns only local\-change\-detected and
  40. local\-change\-detected events, the former all other events.
  41. .sp
  42. The optional parameter \fBsince=<lastSeenID>\fP sets the ID of the last event
  43. you\(aqve already seen. Syncthing returns a JSON encoded array of event objects,
  44. starting at the event just after the one with this last seen ID. The default
  45. value is 0, which returns all events. There is a limit to the number of events
  46. buffered, so if the rate of events is high or the time between polling calls is
  47. long some events might be missed. This can be detected by noting a discontinuity
  48. in the event IDs.
  49. .sp
  50. If no new events are produced since \fB<lastSeenID>\fP, the HTTP call blocks and
  51. waits for new events to happen before returning. By default it times out after
  52. 60 seconds returning an empty array. The time out duration can be customized
  53. with the optional parameter \fBtimeout=seconds\fP\&.
  54. .sp
  55. To receive only a limited number of events, add the \fBlimit=n\fP parameter with a
  56. suitable value for \fBn\fP and only the \fIlast\fP \fBn\fP events will be returned. This
  57. can be used to catch up with the latest event ID after a disconnection for
  58. example: \fB/rest/events?since=0&limit=1\fP\&.
  59. .SH EVENT STRUCTURE
  60. .sp
  61. Each event is represented by an object similar to the following:
  62. .INDENT 0.0
  63. .INDENT 3.5
  64. .sp
  65. .nf
  66. .ft C
  67. {
  68. "id": 2,
  69. "globalID": 3,
  70. "type": "DeviceConnected",
  71. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  72. "data": {
  73. "addr": "172.16.32.25:22000",
  74. "id": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  75. }
  76. }
  77. .ft P
  78. .fi
  79. .UNINDENT
  80. .UNINDENT
  81. .sp
  82. The top level keys \fBid\fP, \fBglobalID\fP, \fBtime\fP, \fBtype\fP and \fBdata\fP are always present,
  83. though \fBdata\fP may be \fBnull\fP\&.
  84. .INDENT 0.0
  85. .TP
  86. .B id
  87. A unique ID for this event on the events API. It always increases by 1: the first
  88. event generated has id \fB1\fP, the next has id \fB2\fP etc. If this increases by
  89. more than 1, then one or more events have been skipped by the events API.
  90. .TP
  91. .B globalID
  92. A global ID for this event, across the events API, the audit log, and any other
  93. sources. It may increase by more than 1, but it will always be greater
  94. than or equal to the id.
  95. .TP
  96. .B time
  97. The time the event was generated.
  98. .TP
  99. .B type
  100. Indicates the type of (i.e. reason for) the event and is one of the event
  101. types below.
  102. .TP
  103. .B data
  104. An object containing optional extra information; the exact structure is
  105. determined by the event type.
  106. .UNINDENT
  107. .SH EVENT TYPES
  108. .SS ConfigSaved
  109. .sp
  110. Emitted after the config has been saved by the user or by Syncthing
  111. itself.
  112. .INDENT 0.0
  113. .INDENT 3.5
  114. .sp
  115. .nf
  116. .ft C
  117. {
  118. "id": 50,
  119. "type": "ConfigSaved",
  120. "time": "2014\-12\-13T00:09:13.5166486Z",
  121. "data": {
  122. "Version": 7,
  123. "Options": {"..."},
  124. "GUI": {"..."},
  125. "Devices": [{"..."}],
  126. "Folders": [{"..."}]
  127. }
  128. }
  129. .ft P
  130. .fi
  131. .UNINDENT
  132. .UNINDENT
  133. .SS DeviceConnected
  134. .sp
  135. Generated each time a connection to a device has been established.
  136. .INDENT 0.0
  137. .INDENT 3.5
  138. .sp
  139. .nf
  140. .ft C
  141. {
  142. "id": 2,
  143. "type": "DeviceConnected",
  144. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  145. "data": {
  146. "addr": "172.16.32.25:22000",
  147. "id": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG",
  148. "deviceName": "Laptop",
  149. "clientName": "syncthing",
  150. "clientVersion": "v0.13.4",
  151. "type": "TCP (Client)"
  152. }
  153. }
  154. .ft P
  155. .fi
  156. .UNINDENT
  157. .UNINDENT
  158. .SS DeviceDisconnected
  159. .sp
  160. Generated each time a connection to a device has been terminated.
  161. .INDENT 0.0
  162. .INDENT 3.5
  163. .sp
  164. .nf
  165. .ft C
  166. {
  167. "id": 48,
  168. "type": "DeviceDisconnected",
  169. "time": "2014\-07\-13T21:18:52.859929215+02:00",
  170. "data": {
  171. "error": "unexpected EOF",
  172. "id": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  173. }
  174. }
  175. .ft P
  176. .fi
  177. .UNINDENT
  178. .UNINDENT
  179. .sp
  180. \fBNOTE:\fP
  181. .INDENT 0.0
  182. .INDENT 3.5
  183. The error key contains the cause for disconnection, which might not
  184. necessarily be an error as such. Specifically, "EOF" and "unexpected
  185. EOF" both signify TCP connection termination, either due to the other
  186. device restarting or going offline or due to a network change.
  187. .UNINDENT
  188. .UNINDENT
  189. .SS DeviceDiscovered
  190. .sp
  191. Emitted when a new device is discovered using local discovery.
  192. .INDENT 0.0
  193. .INDENT 3.5
  194. .sp
  195. .nf
  196. .ft C
  197. {
  198. "id": 13,
  199. "type": "DeviceDiscovered",
  200. "time": "2014\-07\-17T13:28:05.043465207+02:00",
  201. "data": {
  202. "addrs": [
  203. "172.16.32.25:22000"
  204. ],
  205. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  206. }
  207. }
  208. .ft P
  209. .fi
  210. .UNINDENT
  211. .UNINDENT
  212. .SS DevicePaused
  213. .sp
  214. Emitted when a device was paused.
  215. .INDENT 0.0
  216. .INDENT 3.5
  217. .sp
  218. .nf
  219. .ft C
  220. {
  221. "id": 13,
  222. "type": "DevicePaused",
  223. "time": "2014\-07\-17T13:28:05.043465207+02:00",
  224. "data": {
  225. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  226. }
  227. }
  228. .ft P
  229. .fi
  230. .UNINDENT
  231. .UNINDENT
  232. .SS DeviceRejected
  233. .sp
  234. Emitted when there is a connection from a device we are not configured
  235. to talk to.
  236. .INDENT 0.0
  237. .INDENT 3.5
  238. .sp
  239. .nf
  240. .ft C
  241. {
  242. "id": 24,
  243. "type": "DeviceRejected",
  244. "time": "2014\-08\-19T10:43:00.562821045+02:00",
  245. "data": {
  246. "address": "127.0.0.1:51807",
  247. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK"
  248. }
  249. }
  250. .ft P
  251. .fi
  252. .UNINDENT
  253. .UNINDENT
  254. .SS DeviceResumed
  255. .sp
  256. Generated each time a device was resumed.
  257. .INDENT 0.0
  258. .INDENT 3.5
  259. .sp
  260. .nf
  261. .ft C
  262. {
  263. "id": 2,
  264. "type": "DeviceResumed",
  265. "time": "2014\-07\-13T21:04:33.687836696+02:00",
  266. "data": {
  267. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG"
  268. }
  269. }
  270. .ft P
  271. .fi
  272. .UNINDENT
  273. .UNINDENT
  274. .SS DownloadProgress
  275. .sp
  276. Emitted during file downloads for each folder for each file. By default
  277. only a single file in a folder is handled at the same time, but custom
  278. configuration can cause multiple files to be shown.
  279. .INDENT 0.0
  280. .INDENT 3.5
  281. .sp
  282. .nf
  283. .ft C
  284. {
  285. "id": 221,
  286. "type": "DownloadProgress",
  287. "time": "2014\-12\-13T00:26:12.9876937Z",
  288. "data": {
  289. "folder1": {
  290. "file1": {
  291. "Total": 800,
  292. "Pulling": 2,
  293. "CopiedFromOrigin": 0,
  294. "Reused": 633,
  295. "CopiedFromElsewhere": 0,
  296. "Pulled": 38,
  297. "BytesTotal": 104792064,
  298. "BytesDone": 87883776
  299. },
  300. "dir\e\efile2": {
  301. "Total": 80,
  302. "Pulling": 2,
  303. "CopiedFromOrigin": 0,
  304. "Reused": 0,
  305. "CopiedFromElsewhere": 0,
  306. "Pulled": 32,
  307. "BytesTotal": 10420224,
  308. "BytesDone": 4128768
  309. }
  310. },
  311. "folder2": {
  312. "file3": {
  313. "Total": 800,
  314. "Pulling": 2,
  315. "CopiedFromOrigin": 0,
  316. "Reused": 633,
  317. "CopiedFromElsewhere": 0,
  318. "Pulled": 38,
  319. "BytesTotal": 104792064,
  320. "BytesDone": 87883776
  321. },
  322. "dir\e\efile4": {
  323. "Total": 80,
  324. "Pulling": 2,
  325. "CopiedFromOrigin": 0,
  326. "Reused": 0,
  327. "CopiedFromElsewhere": 0,
  328. "Pulled": 32,
  329. "BytesTotal": 10420224,
  330. "BytesDone": 4128768
  331. }
  332. }
  333. }
  334. }
  335. .ft P
  336. .fi
  337. .UNINDENT
  338. .UNINDENT
  339. .INDENT 0.0
  340. .IP \(bu 2
  341. \fBTotal\fP \- total number of blocks in the file
  342. .IP \(bu 2
  343. \fBPulling\fP \- number of blocks currently being downloaded
  344. .IP \(bu 2
  345. \fBCopiedFromOrigin\fP \- number of blocks copied from the file we are
  346. about to replace
  347. .IP \(bu 2
  348. \fBReused\fP \- number of blocks reused from a previous temporary file
  349. .IP \(bu 2
  350. \fBCopiedFromElsewhere\fP \- number of blocks copied from other files or
  351. potentially other folders
  352. .IP \(bu 2
  353. \fBPulled\fP \- number of blocks actually downloaded so far
  354. .IP \(bu 2
  355. \fBBytesTotal\fP \- approximate total file size
  356. .IP \(bu 2
  357. \fBBytesDone\fP \- approximate number of bytes already handled (already
  358. reused, copied or pulled)
  359. .UNINDENT
  360. .sp
  361. Where block size is 128KB.
  362. .sp
  363. Files/folders appearing in the event data imply that the download has
  364. been started for that file/folder, where disappearing implies that the
  365. downloads have been finished or failed for that file/folder. There is
  366. always a last event emitted with no data, which implies all downloads
  367. have finished/failed.
  368. .SS FolderCompletion
  369. .sp
  370. The \fBFolderCompletion\fP event is emitted when the local or remote
  371. contents for a folder changes. It contains the completion percentage for
  372. a given remote device and is emitted once per currently connected remote
  373. device.
  374. .INDENT 0.0
  375. .INDENT 3.5
  376. .sp
  377. .nf
  378. .ft C
  379. {
  380. "id": 84,
  381. "type": "FolderCompletion",
  382. "time": "2015\-04\-17T14:14:27.043576583+09:00",
  383. "data": {
  384. "completion": 100,
  385. "device": "I6KAH76\-66SLLLB\-5PFXSOA\-UFJCDZC\-YAOMLEK\-CP2GB32\-BV5RQST\-3PSROAU",
  386. "folder": "default"
  387. }
  388. }
  389. .ft P
  390. .fi
  391. .UNINDENT
  392. .UNINDENT
  393. .SS FolderErrors
  394. .sp
  395. The \fBFolderErrors\fP event is emitted when a folder cannot be successfully
  396. synchronized. The event contains the ID of the affected folder and a list of
  397. errors for files or directories therein. This list of errors is obsolete once
  398. the folder changes state to \fBsyncing\fP \- if errors remain after the next
  399. synchronization attempt, a new \fBFolderErrors\fP event is emitted.
  400. .INDENT 0.0
  401. .INDENT 3.5
  402. .sp
  403. .nf
  404. .ft C
  405. {
  406. "id": 132,
  407. "type": "FolderErrors",
  408. "time": "2015\-06\-26T13:39:24.697401384+02:00",
  409. "data": {
  410. "errors": [
  411. {
  412. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/h2j/.syncthing.aslkjd.tmp: permission denied",
  413. "path": "h2j/aslkjd"
  414. }
  415. ],
  416. "folder": "default"
  417. }
  418. }
  419. .ft P
  420. .fi
  421. .UNINDENT
  422. .UNINDENT
  423. .sp
  424. New in version 0.11.12.
  425. .sp
  426. \fBSEE ALSO:\fP
  427. .INDENT 0.0
  428. .INDENT 3.5
  429. The statechanged event.
  430. .UNINDENT
  431. .UNINDENT
  432. .SS FolderRejected
  433. .sp
  434. Emitted when a device sends index information for a folder we do not
  435. have, or have but do not share with the device in question.
  436. .INDENT 0.0
  437. .INDENT 3.5
  438. .sp
  439. .nf
  440. .ft C
  441. {
  442. "id": 27,
  443. "type": "FolderRejected",
  444. "time": "2014\-08\-19T10:41:06.761751399+02:00",
  445. "data": {
  446. "device": "EJHMPAQ\-OGCVORE\-ISB4IS3\-SYYVJXF\-TKJGLTU\-66DIQPF\-GJ5D2GX\-GQ3OWQK",
  447. "folder": "GXWxf\-3zgnU",
  448. "folderLabel": "My Pictures"
  449. }
  450. }
  451. .ft P
  452. .fi
  453. .UNINDENT
  454. .UNINDENT
  455. .SS Folder Scan Progress
  456. .sp
  457. Emitted in regular intervals (folder setting ProgressIntervalS, 2s by default)
  458. during scans giving the amount of bytes already scanned and to be scanned in
  459. total , as well as the current scanning rates in bytes per second.
  460. .INDENT 0.0
  461. .INDENT 3.5
  462. .sp
  463. .nf
  464. .ft C
  465. {
  466. "data" : {
  467. "total" : 1,
  468. "rate" : 0,
  469. "current" : 0,
  470. "folder" : "bd7q3\-zskm5"
  471. },
  472. "globalID" : 29,
  473. "type" : "FolderScanProgress",
  474. "time" : "2017\-03\-06T15:00:58.072004209+01:00",
  475. "id" : 29
  476. }
  477. .ft P
  478. .fi
  479. .UNINDENT
  480. .UNINDENT
  481. .SS FolderSummary
  482. .sp
  483. The FolderSummary event is emitted when folder contents have changed
  484. locally. This can be used to calculate the current local completion
  485. state.
  486. .INDENT 0.0
  487. .INDENT 3.5
  488. .sp
  489. .nf
  490. .ft C
  491. {
  492. "id": 16,
  493. "type": "FolderSummary",
  494. "time": "2015\-04\-17T14:12:20.460121585+09:00",
  495. "data": {
  496. "folder": "default",
  497. "summary": {
  498. "globalBytes": 0,
  499. "globalDeleted": 0,
  500. "globalFiles": 0,
  501. "ignorePatterns": false,
  502. "inSyncBytes": 0,
  503. "inSyncFiles": 0,
  504. "invalid": "",
  505. "localBytes": 0,
  506. "localDeleted": 0,
  507. "localFiles": 0,
  508. "needBytes": 0,
  509. "needFiles": 0,
  510. "state": "idle",
  511. "stateChanged": "2015\-04\-17T14:12:12.455224687+09:00",
  512. "version": 0
  513. }
  514. }
  515. }
  516. .ft P
  517. .fi
  518. .UNINDENT
  519. .UNINDENT
  520. .SS ItemFinished
  521. .sp
  522. Generated when Syncthing ends synchronizing a file to a newer version. A
  523. successful operation:
  524. .INDENT 0.0
  525. .INDENT 3.5
  526. .sp
  527. .nf
  528. .ft C
  529. {
  530. "id": 93,
  531. "type": "ItemFinished",
  532. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  533. "data": {
  534. "item": "test.txt",
  535. "folder": "default",
  536. "error": null,
  537. "type": "file",
  538. "action": "update"
  539. }
  540. }
  541. .ft P
  542. .fi
  543. .UNINDENT
  544. .UNINDENT
  545. .sp
  546. An unsuccessful operation:
  547. .INDENT 0.0
  548. .INDENT 3.5
  549. .sp
  550. .nf
  551. .ft C
  552. {
  553. "id": 44,
  554. "type": "ItemFinished",
  555. "time": "2015\-05\-27T11:21:05.711133004+02:00",
  556. "data": {
  557. "action": "update",
  558. "error": "open /Users/jb/src/github.com/syncthing/syncthing/test/s2/foo/.syncthing.hej.tmp: permission denied",
  559. "folder": "default",
  560. "item": "foo/hej",
  561. "type": "file"
  562. }
  563. }
  564. .ft P
  565. .fi
  566. .UNINDENT
  567. .UNINDENT
  568. .sp
  569. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  570. .sp
  571. New in version 0.11.10: The \fBmetadata\fP action.
  572. .SS ItemStarted
  573. .sp
  574. Generated when Syncthing begins synchronizing a file to a newer version.
  575. .INDENT 0.0
  576. .INDENT 3.5
  577. .sp
  578. .nf
  579. .ft C
  580. {
  581. "id": 93,
  582. "type": "ItemStarted",
  583. "time": "2014\-07\-13T21:22:03.414609034+02:00",
  584. "data": {
  585. "item": "test.txt",
  586. "folder": "default",
  587. "type": "file",
  588. "action": "update"
  589. }
  590. }
  591. .ft P
  592. .fi
  593. .UNINDENT
  594. .UNINDENT
  595. .sp
  596. The \fBaction\fP field is either \fBupdate\fP (contents changed), \fBmetadata\fP (file metadata changed but not contents), or \fBdelete\fP\&.
  597. .sp
  598. New in version 0.11.10: The \fBmetadata\fP action.
  599. .SS Listen Addresses Changed
  600. .sp
  601. This event is emitted when a listen address changes.
  602. .INDENT 0.0
  603. .INDENT 3.5
  604. .sp
  605. .nf
  606. .ft C
  607. {
  608. "type" : "ListenAddressesChanged",
  609. "id" : 70,
  610. "time" : "2017\-03\-06T15:01:24.88340663+01:00",
  611. "globalID" : 70,
  612. "data" : {
  613. "address" : {
  614. "Fragment" : "",
  615. "RawQuery" : "",
  616. "Scheme" : "dynamic+https",
  617. "Path" : "/endpoint",
  618. "RawPath" : "",
  619. "User" : null,
  620. "ForceQuery" : false,
  621. "Host" : "relays.syncthing.net",
  622. "Opaque" : ""
  623. },
  624. "wan" : [
  625. {
  626. "ForceQuery" : false,
  627. "User" : null,
  628. "Host" : "31.15.66.212:443",
  629. "Opaque" : "",
  630. "Path" : "/",
  631. "RawPath" : "",
  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. }
  636. ],
  637. "lan" : [
  638. {
  639. "RawQuery" : "id=F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=",
  640. "Scheme" : "relay",
  641. "Fragment" : "",
  642. "RawPath" : "",
  643. "Path" : "/",
  644. "Host" : "31.15.66.212:443",
  645. "Opaque" : "",
  646. "ForceQuery" : false,
  647. "User" : null
  648. }
  649. ]
  650. }
  651. }
  652. .ft P
  653. .fi
  654. .UNINDENT
  655. .UNINDENT
  656. .SS LocalChangeDetected
  657. .sp
  658. Generated upon scan whenever the local disk has discovered an updated file from the
  659. previous scan. This does \fInot\fP include events that are discovered and copied from
  660. other devices (remote\-change\-detected), only files that were changed on the
  661. local filesystem.
  662. .INDENT 0.0
  663. .INDENT 3.5
  664. .sp
  665. .nf
  666. .ft C
  667. {
  668. "id": 7,
  669. "globalID": 59,
  670. "time": "2016\-09\-26T22:07:10.7189141\-04:00",
  671. "type": "LocalChangeDetected",
  672. "data": {
  673. "action": "deleted",
  674. "folderID": "vitwy\-zjxqt",
  675. "label": "TestSync",
  676. "path": "C:\e\eUsers\e\eNate\e\eSync\e\etestfolder\e\etest file.rtf",
  677. "type": "file"
  678. }
  679. }
  680. .ft P
  681. .fi
  682. .UNINDENT
  683. .UNINDENT
  684. .SS LocalIndexUpdated
  685. .sp
  686. Generated when the local index information has changed, due to
  687. synchronizing one or more items from the cluster or discovering local
  688. changes during a scan.
  689. .INDENT 0.0
  690. .INDENT 3.5
  691. .sp
  692. .nf
  693. .ft C
  694. {
  695. "id": 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 RemoteChangeDetected
  732. .sp
  733. Generated upon scan whenever a file is locally updated due to a remote change.
  734. Files that are updated locally produce a local\-change\-detected event.
  735. .INDENT 0.0
  736. .INDENT 3.5
  737. .sp
  738. .nf
  739. .ft C
  740. {
  741. "time" : "2017\-03\-06T23:58:21.844739891+01:00",
  742. "globalID" : 123,
  743. "data" : {
  744. "type" : "file",
  745. "action" : "deleted",
  746. "path" : "/media/ntfs_data/Dokumente/testfile",
  747. "label" : "Dokumente",
  748. "folderID" : "Dokumente",
  749. "modifiedBy" : "BPDFDTU"
  750. },
  751. "type" : "RemoteChangeDetected",
  752. "id" : 2
  753. }
  754. .ft P
  755. .fi
  756. .UNINDENT
  757. .UNINDENT
  758. .SS Remote Download Progress
  759. .sp
  760. This event is emitted when a download\-progress message is
  761. received. It returns a map \fBdata\fP of filenames with a count of
  762. downloaded blocks. The files in questions are currently being
  763. downloaded on the remote \fBdevice\fP and belong to \fBfolder\fP\&.
  764. .INDENT 0.0
  765. .INDENT 3.5
  766. .sp
  767. .nf
  768. .ft C
  769. {
  770. "time" : "2017\-03\-07T00:11:37.65838955+01:00",
  771. "globalID" : 170,
  772. "data" : {
  773. "state" : {
  774. "tahr64\-6.0.5.iso" : 1784
  775. },
  776. "device" : "F4HSJVO\-CP2C3IL\-YLQYLSU\-XTYODAG\-PPU4LGV\-PH3MU4N\-G6K56DV\-IPN47A",
  777. "folder" : "Dokumente"
  778. },
  779. "type" : "RemoteDownloadProgress",
  780. "id" : 163
  781. }
  782. .ft P
  783. .fi
  784. .UNINDENT
  785. .UNINDENT
  786. .SS RemoteIndexUpdated
  787. .sp
  788. Generated each time new index information is received from a device.
  789. .INDENT 0.0
  790. .INDENT 3.5
  791. .sp
  792. .nf
  793. .ft C
  794. {
  795. "id": 44,
  796. "type": "RemoteIndexUpdated",
  797. "time": "2014\-07\-13T21:04:35.394184435+02:00",
  798. "data": {
  799. "device": "NFGKEKE\-7Z6RTH7\-I3PRZXS\-DEJF3UJ\-FRWJBFO\-VBBTDND\-4SGNGVZ\-QUQHJAG",
  800. "folder": "lightroom",
  801. "items": 1000
  802. }
  803. }
  804. .ft P
  805. .fi
  806. .UNINDENT
  807. .UNINDENT
  808. .SS Starting
  809. .sp
  810. Emitted exactly once, when Syncthing starts, before parsing
  811. configuration etc.
  812. .INDENT 0.0
  813. .INDENT 3.5
  814. .sp
  815. .nf
  816. .ft C
  817. {
  818. "id": 1,
  819. "type": "Starting",
  820. "time": "2014\-07\-17T13:13:32.044470055+02:00",
  821. "data": {
  822. "home": "/home/jb/.config/syncthing"
  823. }
  824. }
  825. .ft P
  826. .fi
  827. .UNINDENT
  828. .UNINDENT
  829. .SS StartupComplete
  830. .sp
  831. Emitted exactly once, when initialization is complete and Syncthing is
  832. ready to start exchanging data with other devices.
  833. .INDENT 0.0
  834. .INDENT 3.5
  835. .sp
  836. .nf
  837. .ft C
  838. {
  839. "id": 1,
  840. "type": "StartupComplete",
  841. "time": "2014\-07\-13T21:03:18.383239179+02:00",
  842. "data": null
  843. }
  844. .ft P
  845. .fi
  846. .UNINDENT
  847. .UNINDENT
  848. .SS StateChanged
  849. .sp
  850. Emitted when a folder changes state. Possible states are \fBidle\fP,
  851. \fBscanning\fP, \fBsyncing\fP and \fBerror\fP\&. The field \fBduration\fP is
  852. the number of seconds the folder spent in state \fBfrom\fP\&. In the example
  853. below, the folder \fBdefault\fP was in state \fBscanning\fP for 0.198
  854. seconds and is now in state \fBidle\fP\&.
  855. .INDENT 0.0
  856. .INDENT 3.5
  857. .sp
  858. .nf
  859. .ft C
  860. {
  861. "id": 8,
  862. "type": "StateChanged",
  863. "time": "2014\-07\-17T13:14:28.697493016+02:00",
  864. "data": {
  865. "folder": "default",
  866. "from": "scanning",
  867. "duration": 0.19782869900000002,
  868. "to": "idle"
  869. }
  870. }
  871. .ft P
  872. .fi
  873. .UNINDENT
  874. .UNINDENT
  875. .SH AUTHOR
  876. The Syncthing Authors
  877. .SH COPYRIGHT
  878. 2015, The Syncthing Authors
  879. .\" Generated by docutils manpage writer.
  880. .