syncthing-event-api.7 17 KB

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