syncthing-event-api.7 16 KB

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