syncthing-rest-api.7 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-REST-API" "7" "Mar 17, 2020" "v1" "Syncthing"
  4. .SH NAME
  5. syncthing-rest-api \- REST 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. .sp
  34. Syncthing exposes a REST interface over HTTP on the GUI port. This is used by
  35. the GUI (from Javascript) and can be used by other processes wishing to control
  36. Syncthing. In most cases both the input and output data is in JSON format. The
  37. interface is subject to change.
  38. .SH API KEY
  39. .sp
  40. To use the REST API an API key must be set and used. The API key can be
  41. generated in the GUI, or set in the \fBconfiguration/gui/apikey\fP element in
  42. the configuration file. To use an API key, set the request header
  43. \fBX\-API\-Key\fP to the API key value. For example, \fBcurl \-X POST \-H
  44. "X\-API\-Key: abc123" http://localhost:8384/rest/...\fP can be used to invoke
  45. with \fBcurl\fP (add \fB\-k\fP flag when using HTTPS with a Syncthing generated or self signed certificate).
  46. .SH SYSTEM ENDPOINTS
  47. .SS GET /rest/system/browse
  48. .sp
  49. Returns a list of directories matching the path given by the optional parameter
  50. \fBcurrent\fP\&. The path can use \fI\%patterns as described in Go’s filepath package\fP <\fBhttps://golang.org/pkg/path/filepath/#Match\fP>\&. A ‘*’ will always be appended
  51. to the given path (e.g. \fB/tmp/\fP matches all its subdirectories). If the option
  52. \fBcurrent\fP is not given, filesystem root paths are returned.
  53. .INDENT 0.0
  54. .INDENT 3.5
  55. .sp
  56. .nf
  57. .ft C
  58. $ curl \-H "X\-API\-Key: yourkey" localhost:8384/rest/system/browse | json_pp
  59. [
  60. "/"
  61. ]
  62. $ curl \-H "X\-API\-Key: yourkey" localhost:8384/rest/system/browse?current=/var/ | json_pp
  63. [
  64. "/var/backups/",
  65. "/var/cache/",
  66. "/var/lib/",
  67. "/var/local/",
  68. "/var/lock/",
  69. "/var/log/",
  70. "/var/mail/",
  71. "/var/opt/",
  72. "/var/run/",
  73. "/var/spool/",
  74. "/var/tmp/"
  75. ]
  76. $ curl \-H "X\-API\-Key: yourkey" localhost:8384/rest/system/browse?current=/var/*o | json_pp
  77. [
  78. "/var/local/",
  79. "/var/lock/",
  80. "/var/log/",
  81. "/var/opt/",
  82. "/var/spool/"
  83. ]
  84. .ft P
  85. .fi
  86. .UNINDENT
  87. .UNINDENT
  88. .SS GET /rest/system/config
  89. .sp
  90. Returns the current configuration.
  91. .INDENT 0.0
  92. .INDENT 3.5
  93. .sp
  94. .nf
  95. .ft C
  96. {
  97. {
  98. "version": 15,
  99. "folders": [
  100. {
  101. "id": "GXWxf\-3zgnU",
  102. "label": "MyFolder",
  103. "path": "...",
  104. "type": "sendreceive",
  105. "devices": [
  106. {
  107. "deviceID": "..."
  108. }
  109. ],
  110. "rescanIntervalS": 60,
  111. "ignorePerms": false,
  112. "autoNormalize": true,
  113. "minDiskFreePct": 1,
  114. "versioning": {
  115. "type": "simple",
  116. "params": {
  117. "keep": "5"
  118. }
  119. },
  120. "copiers": 0,
  121. "pullers": 0,
  122. "hashers": 0,
  123. "order": "random",
  124. "ignoreDelete": false,
  125. "scanProgressIntervalS": 0,
  126. "pullerSleepS": 0,
  127. "pullerPauseS": 0,
  128. "maxConflicts": 10,
  129. "disableSparseFiles": false,
  130. "disableTempIndexes": false,
  131. "fsync": false,
  132. "invalid": ""
  133. }
  134. ],
  135. "devices": [
  136. {
  137. "deviceID": "...",
  138. "name": "Laptop",
  139. "addresses": [
  140. "dynamic",
  141. "tcp://192.168.1.2:22000"
  142. ],
  143. "compression": "metadata",
  144. "certName": "",
  145. "introducer": false
  146. }
  147. ],
  148. "gui": {
  149. "enabled": true,
  150. "address": "127.0.0.1:8384",
  151. "user": "Username",
  152. "password": "$2a$10$ZFws69T4FlvWwsqeIwL.TOo5zOYqsa/.TxlUnsGYS.j3JvjFTmxo6",
  153. "useTLS": false,
  154. "apiKey": "pGahcht56664QU5eoFQW6szbEG6Ec2Cr",
  155. "insecureAdminAccess": false,
  156. "theme": "default"
  157. },
  158. "options": {
  159. "listenAddresses": [
  160. "default"
  161. ],
  162. "globalAnnounceServers": [
  163. "default"
  164. ],
  165. "globalAnnounceEnabled": true,
  166. "localAnnounceEnabled": true,
  167. "localAnnouncePort": 21027,
  168. "localAnnounceMCAddr": "[ff12::8384]:21027",
  169. "maxSendKbps": 0,
  170. "maxRecvKbps": 0,
  171. "reconnectionIntervalS": 60,
  172. "relaysEnabled": true,
  173. "relayReconnectIntervalM": 10,
  174. "startBrowser": false,
  175. "natEnabled": true,
  176. "natLeaseMinutes": 60,
  177. "natRenewalMinutes": 30,
  178. "natTimeoutSeconds": 10,
  179. "urAccepted": \-1,
  180. "urUniqueId": "",
  181. "urURL": "https://data.syncthing.net/newdata",
  182. "urPostInsecurely": false,
  183. "urInitialDelayS": 1800,
  184. "restartOnWakeup": true,
  185. "autoUpgradeIntervalH": 12,
  186. "keepTemporariesH": 24,
  187. "cacheIgnoredFiles": false,
  188. "progressUpdateIntervalS": 5,
  189. "limitBandwidthInLan": false,
  190. "minHomeDiskFreePct": 1,
  191. "releasesURL": "https://upgrades.syncthing.net/meta.json",
  192. "alwaysLocalNets": [],
  193. "overwriteRemoteDeviceNamesOnConnect": false,
  194. "tempIndexMinBlocks": 10
  195. },
  196. "ignoredDevices": [],
  197. "ignoredFolders": []
  198. }
  199. }
  200. .ft P
  201. .fi
  202. .UNINDENT
  203. .UNINDENT
  204. .SS GET /rest/system/config/insync
  205. .sp
  206. Returns whether the config is in sync, i.e. whether the running
  207. configuration is the same as that on disk.
  208. .INDENT 0.0
  209. .INDENT 3.5
  210. .sp
  211. .nf
  212. .ft C
  213. {
  214. "configInSync": true
  215. }
  216. .ft P
  217. .fi
  218. .UNINDENT
  219. .UNINDENT
  220. .SS POST /rest/system/config
  221. .sp
  222. Post the full contents of the configuration, in the same format as returned by
  223. the corresponding GET request. When posting the configuration succeeds,
  224. the posted configuration is immediately applied, except for changes that require a restart. Query
  225. rest\-config\-insync to check if a restart is required.
  226. .sp
  227. This endpoint is the main point to control Syncthing, even if the change only
  228. concerns a very small part of the config: The usual workflow is to get the
  229. config, modify the needed parts and post it again.
  230. .SS GET /rest/system/connections
  231. .sp
  232. \fBNOTE:\fP
  233. .INDENT 0.0
  234. .INDENT 3.5
  235. Return format changed in 0.13.0.
  236. .UNINDENT
  237. .UNINDENT
  238. .sp
  239. Returns the list of configured devices and some metadata associated
  240. with them. The list also contains the local device itself as not connected.
  241. .sp
  242. The connection types are \fBTCP (Client)\fP, \fBTCP (Server)\fP, \fBRelay (Client)\fP and \fBRelay (Server)\fP\&.
  243. .INDENT 0.0
  244. .INDENT 3.5
  245. .sp
  246. .nf
  247. .ft C
  248. {
  249. "total" : {
  250. "paused" : false,
  251. "clientVersion" : "",
  252. "at" : "2015\-11\-07T17:29:47.691637262+01:00",
  253. "connected" : false,
  254. "inBytesTotal" : 1479,
  255. "type" : "",
  256. "outBytesTotal" : 1318,
  257. "address" : ""
  258. },
  259. "connections" : {
  260. "YZJBJFX\-RDBL7WY\-6ZGKJ2D\-4MJB4E7\-ZATSDUY\-LD6Y3L3\-MLFUYWE\-AEMXJAC" : {
  261. "connected" : true,
  262. "inBytesTotal" : 556,
  263. "paused" : false,
  264. "at" : "2015\-11\-07T17:29:47.691548971+01:00",
  265. "clientVersion" : "v0.12.1",
  266. "address" : "127.0.0.1:22002",
  267. "type" : "TCP (Client)",
  268. "outBytesTotal" : 550
  269. },
  270. "DOVII4U\-SQEEESM\-VZ2CVTC\-CJM4YN5\-QNV7DCU\-5U3ASRL\-YVFG6TH\-W5DV5AA" : {
  271. "outBytesTotal" : 0,
  272. "type" : "",
  273. "address" : "",
  274. "at" : "0001\-01\-01T00:00:00Z",
  275. "clientVersion" : "",
  276. "paused" : false,
  277. "inBytesTotal" : 0,
  278. "connected" : false
  279. },
  280. "UYGDMA4\-TPHOFO5\-2VQYDCC\-7CWX7XW\-INZINQT\-LE4B42N\-4JUZTSM\-IWCSXA4" : {
  281. "address" : "",
  282. "type" : "",
  283. "outBytesTotal" : 0,
  284. "connected" : false,
  285. "inBytesTotal" : 0,
  286. "paused" : false,
  287. "at" : "0001\-01\-01T00:00:00Z",
  288. "clientVersion" : ""
  289. }
  290. }
  291. }
  292. .ft P
  293. .fi
  294. .UNINDENT
  295. .UNINDENT
  296. .SS GET /rest/system/debug
  297. .sp
  298. New in version 0.12.0.
  299. .sp
  300. Returns the set of debug facilities and which of them are currently enabled.
  301. .INDENT 0.0
  302. .INDENT 3.5
  303. .sp
  304. .nf
  305. .ft C
  306. {
  307. "enabled": [
  308. "beacon"
  309. ],
  310. "facilities": {
  311. "beacon": "Multicast and broadcast discovery",
  312. "config": "Configuration loading and saving",
  313. "connections": "Connection handling",
  314. "db": "The database layer",
  315. "dialer": "Dialing connections",
  316. "discover": "Remote device discovery",
  317. "events": "Event generation and logging",
  318. "http": "REST API",
  319. "main": "Main package",
  320. "model": "The root hub",
  321. "protocol": "The BEP protocol",
  322. "relay": "Relay connection handling",
  323. "scanner": "File change detection and hashing",
  324. "stats": "Persistent device and folder statistics",
  325. "sync": "Mutexes",
  326. "upgrade": "Binary upgrades",
  327. "upnp": "UPnP discovery and port mapping",
  328. "versioner": "File versioning"
  329. }
  330. }
  331. .ft P
  332. .fi
  333. .UNINDENT
  334. .UNINDENT
  335. .SS POST /rest/system/debug
  336. .sp
  337. New in version 0.12.0.
  338. .sp
  339. Enables or disables debugging for specified facilities. Give one or both of
  340. \fBenable\fP and \fBdisable\fP query parameters, with comma separated facility
  341. names. To disable debugging of the beacon and discovery packages, and enable it
  342. for config and db:
  343. .INDENT 0.0
  344. .INDENT 3.5
  345. .sp
  346. .nf
  347. .ft C
  348. $ curl \-H X\-API\-Key:abc123 \-X POST \(aqhttp://localhost:8384/rest/system/debug?disable=beacon,discovery&enable=config,db\(aq
  349. .ft P
  350. .fi
  351. .UNINDENT
  352. .UNINDENT
  353. .SS GET /rest/system/discovery
  354. .sp
  355. Returns the contents of the local discovery cache.
  356. .INDENT 0.0
  357. .INDENT 3.5
  358. .sp
  359. .nf
  360. .ft C
  361. {
  362. "LGFPDIT7SKNNJVJZA4FC7QNCRKCE753K72BW5QD2FOZ7FRFEP57Q": [
  363. "192.162.129.11:22000"
  364. ]
  365. }
  366. .ft P
  367. .fi
  368. .UNINDENT
  369. .UNINDENT
  370. .SS POST /rest/system/discovery
  371. .sp
  372. \fBNOTE:\fP
  373. .INDENT 0.0
  374. .INDENT 3.5
  375. Removed in v0.12.0.
  376. .UNINDENT
  377. .UNINDENT
  378. .sp
  379. Post with the query parameters \fBdevice\fP and \fBaddr\fP to add entries to
  380. the discovery cache.
  381. .INDENT 0.0
  382. .INDENT 3.5
  383. .sp
  384. .nf
  385. .ft C
  386. curl \-X POST http://127.0.0.1:8384/rest/system/discovery?device=LGFPDIT7SKNNJVJZA4FC7QNCRKCE753K72BW5QD2FOZ7FRFEP57Q\e&addr=192.162.129.11:22000
  387. # Or with the X\-API\-Key header:
  388. curl \-X POST \-\-header "X\-API\-Key: TcE28kVPdtJ8COws1JdM0b2nodj77WeQ" http://127.0.0.1:8384/rest/system/discovery?device=LGFPDIT7SKNNJVJZA4FC7QNCRKCE753K72BW5QD2FOZ7FRFEP57Q\e&addr=192.162.129.11:22000
  389. .ft P
  390. .fi
  391. .UNINDENT
  392. .UNINDENT
  393. .SS POST /rest/system/error/clear
  394. .sp
  395. Post with empty to body to remove all recent errors.
  396. .SS GET /rest/system/error
  397. .sp
  398. \fBNOTE:\fP
  399. .INDENT 0.0
  400. .INDENT 3.5
  401. Return format changed in 0.12.0.
  402. .UNINDENT
  403. .UNINDENT
  404. .sp
  405. Returns the list of recent errors.
  406. .INDENT 0.0
  407. .INDENT 3.5
  408. .sp
  409. .nf
  410. .ft C
  411. {
  412. "errors": [
  413. {
  414. "when": "2014\-09\-18T12:59:26.549953186+02:00",
  415. "message": "This is an error string"
  416. }
  417. ]
  418. }
  419. .ft P
  420. .fi
  421. .UNINDENT
  422. .UNINDENT
  423. .SS POST /rest/system/error
  424. .sp
  425. Post with an error message in the body (plain text) to register a new
  426. error. The new error will be displayed on any active GUI clients.
  427. .SS GET /rest/system/log
  428. .sp
  429. New in version 0.12.0.
  430. .sp
  431. Returns the list of recent log entries.
  432. .INDENT 0.0
  433. .INDENT 3.5
  434. .sp
  435. .nf
  436. .ft C
  437. {
  438. "messages": [
  439. {
  440. "when": "2014\-09\-18T12:59:26.549953186+02:00",
  441. "message": "This is a log entry"
  442. }
  443. ]
  444. }
  445. .ft P
  446. .fi
  447. .UNINDENT
  448. .UNINDENT
  449. .SS POST /rest/system/pause
  450. .sp
  451. Pause the given device or all devices.
  452. .sp
  453. Takes the optional parameter \fBdevice\fP (device ID). When omitted,
  454. pauses all devices. Returns status 200 and no content upon success, or status
  455. 500 and a plain text error on failure.
  456. .SS GET /rest/system/ping
  457. .sp
  458. Returns a \fB{"ping": "pong"}\fP object.
  459. .INDENT 0.0
  460. .INDENT 3.5
  461. .sp
  462. .nf
  463. .ft C
  464. {
  465. "ping": "pong"
  466. }
  467. .ft P
  468. .fi
  469. .UNINDENT
  470. .UNINDENT
  471. .SS POST /rest/system/ping
  472. .sp
  473. Returns a \fB{"ping": "pong"}\fP object.
  474. .SS POST /rest/system/reset
  475. .sp
  476. Post with empty body to erase the current index database and restart
  477. Syncthing. With no query parameters, the entire database is erased from disk.
  478. By specifying the \fBfolder\fP parameter with a valid folder ID, only
  479. information for that folder will be erased:
  480. .INDENT 0.0
  481. .INDENT 3.5
  482. .sp
  483. .nf
  484. .ft C
  485. $ curl \-X POST \-H "X\-API\-Key: abc123" http://localhost:8384/rest/system/reset?folder=default
  486. .ft P
  487. .fi
  488. .UNINDENT
  489. .UNINDENT
  490. .sp
  491. \fBCaution\fP: See \fB\-reset\-database\fP for \fB\&.stfolder\fP creation side\-effect and caution regarding mountpoints.
  492. .SS POST /rest/system/restart
  493. .sp
  494. Post with empty body to immediately restart Syncthing.
  495. .SS POST /rest/system/resume
  496. .sp
  497. Resume the given device or all devices.
  498. .sp
  499. Takes the optional parameter \fBdevice\fP (device ID). When omitted,
  500. resumes all devices. Returns status 200 and no content upon success, or status
  501. 500 and a plain text error on failure.
  502. .SS POST /rest/system/shutdown
  503. .sp
  504. Post with empty body to cause Syncthing to exit and not restart.
  505. .SS GET /rest/system/status
  506. .sp
  507. Returns information about current system status and resource usage. The CPU percent value has been deprecated from the API and will always report 0.
  508. .INDENT 0.0
  509. .INDENT 3.5
  510. .sp
  511. .nf
  512. .ft C
  513. {
  514. "alloc": 30618136,
  515. "connectionServiceStatus": {
  516. "dynamic+https://relays.syncthing.net/endpoint": {
  517. "error": null,
  518. "lanAddresses": [
  519. "relay://23.92.71.120:443/?id=53STGR7\-YBM6FCX\-PAZ2RHM\-YPY6OEJ\-WYHVZO7\-PCKQRCK\-PZLTP7T\-434XCAD&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=canton7"
  520. ],
  521. "wanAddresses": [
  522. "relay://23.92.71.120:443/?id=53STGR7\-YBM6FCX\-PAZ2RHM\-YPY6OEJ\-WYHVZO7\-PCKQRCK\-PZLTP7T\-434XCAD&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=canton7"
  523. ]
  524. },
  525. "tcp://0.0.0.0:22000": {
  526. "error": null,
  527. "lanAddresses": [
  528. "tcp://0.0.0.0:22000"
  529. ],
  530. "wanAddresses": [
  531. "tcp://0.0.0.0:22000"
  532. ]
  533. }
  534. },
  535. "cpuPercent": 0,
  536. "discoveryEnabled": true,
  537. "discoveryErrors": {
  538. "global@https://discovery\-v4\-1.syncthing.net/v2/": "500 Internal Server Error",
  539. "global@https://discovery\-v4\-2.syncthing.net/v2/": "Post https://discovery\-v4\-2.syncthing.net/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)",
  540. "global@https://discovery\-v4\-3.syncthing.net/v2/": "Post https://discovery\-v4\-3.syncthing.net/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)",
  541. "global@https://discovery\-v6\-1.syncthing.net/v2/": "Post https://discovery\-v6\-1.syncthing.net/v2/: dial tcp [2001:470:28:4d6::5]:443: connect: no route to host",
  542. "global@https://discovery\-v6\-2.syncthing.net/v2/": "Post https://discovery\-v6\-2.syncthing.net/v2/: dial tcp [2604:a880:800:10::182:a001]:443: connect: no route to host",
  543. "global@https://discovery\-v6\-3.syncthing.net/v2/": "Post https://discovery\-v6\-3.syncthing.net/v2/: dial tcp [2400:6180:0:d0::d9:d001]:443: connect: no route to host"
  544. },
  545. "discoveryMethods": 8,
  546. "goroutines": 49,
  547. "lastDialStatus": {
  548. "tcp://10.20.30.40": {
  549. "when": "2019\-05\-16T07:41:23Z",
  550. "error": "dial tcp 10.20.30.40:22000: i/o timeout"
  551. },
  552. "tcp://172.16.33.3:22000": {
  553. "when": "2019\-05\-16T07:40:43Z",
  554. "ok": true
  555. },
  556. "tcp://83.233.120.221:22000": {
  557. "when": "2019\-05\-16T07:41:13Z",
  558. "error": "dial tcp 83.233.120.221:22000: connect: connection refused"
  559. }
  560. },
  561. "myID": "P56IOI7\-MZJNU2Y\-IQGDREY\-DM2MGTI\-MGL3BXN\-PQ6W5BM\-TBBZ4TJ\-XZWICQ2",
  562. "pathSeparator": "/",
  563. "startTime": "2016\-06\-06T19:41:43.039284753+02:00",
  564. "sys": 42092792,
  565. "themes": [
  566. "default",
  567. "dark"
  568. ],
  569. "tilde": "/Users/jb",
  570. "uptime": 2635
  571. }
  572. .ft P
  573. .fi
  574. .UNINDENT
  575. .UNINDENT
  576. .sp
  577. New in version 1.2.0: The \fBlastDialStatus\fP dictionary contains the last error (or \fBnull\fP for
  578. success) for each peer address that Syncthing has attempted to contact.
  579. The \fBconnectionServiceStatus\fP entries gained \fB"error": null\fP
  580. attributes where previously there would be no \fBerror\fP attribute at all
  581. in the success case.
  582. .SS GET /rest/system/upgrade
  583. .sp
  584. Checks for a possible upgrade and returns an object describing the
  585. newest version and upgrade possibility.
  586. .INDENT 0.0
  587. .INDENT 3.5
  588. .sp
  589. .nf
  590. .ft C
  591. {
  592. "latest": "v0.14.47",
  593. "majorNewer": false,
  594. "newer": true,
  595. "running": "v0.14.46"
  596. }
  597. .ft P
  598. .fi
  599. .UNINDENT
  600. .UNINDENT
  601. .SS POST /rest/system/upgrade
  602. .sp
  603. Perform an upgrade to the newest released version and restart. Does
  604. nothing if there is no newer version than currently running.
  605. .SS GET /rest/system/version
  606. .sp
  607. Returns the current Syncthing version information.
  608. .INDENT 0.0
  609. .INDENT 3.5
  610. .sp
  611. .nf
  612. .ft C
  613. {
  614. "arch": "amd64",
  615. "longVersion": "syncthing v0.10.27+3\-gea8c3de (go1.4 darwin\-amd64 default) jb@syno 2015\-03\-16 11:01:29 UTC",
  616. "os": "darwin",
  617. "version": "v0.10.27+3\-gea8c3de"
  618. }
  619. .ft P
  620. .fi
  621. .UNINDENT
  622. .UNINDENT
  623. .SH DATABASE ENDPOINTS
  624. .SS GET /rest/db/browse
  625. .sp
  626. Returns the directory tree of the global model. Directories are always
  627. JSON objects (map/dictionary), and files are always arrays of
  628. modification time and size. The first integer is the files modification
  629. time, and the second integer is the file size.
  630. .sp
  631. The call takes one mandatory \fBfolder\fP parameter and two optional
  632. parameters. Optional parameter \fBlevels\fP defines how deep within the
  633. tree we want to dwell down (0 based, defaults to unlimited depth)
  634. Optional parameter \fBprefix\fP defines a prefix within the tree where to
  635. start building the structure.
  636. .INDENT 0.0
  637. .INDENT 3.5
  638. .sp
  639. .nf
  640. .ft C
  641. $ curl \-s http://localhost:8384/rest/db/browse?folder=default | json_pp
  642. {
  643. "directory": {
  644. "file": ["2015\-04\-20T22:20:45+09:00", 130940928],
  645. "subdirectory": {
  646. "another file": ["2015\-04\-20T22:20:45+09:00", 130940928]
  647. }
  648. },
  649. "rootfile": ["2015\-04\-20T22:20:45+09:00", 130940928]
  650. }
  651. $ curl \-s http://localhost:8384/rest/db/browse?folder=default&levels=0 | json_pp
  652. {
  653. "directory": {},
  654. "rootfile": ["2015\-04\-20T22:20:45+09:00", 130940928]
  655. }
  656. $ curl \-s http://localhost:8384/rest/db/browse?folder=default&levels=1 | json_pp
  657. {
  658. "directory": {
  659. "file": ["2015\-04\-20T22:20:45+09:00", 130940928],
  660. "subdirectory": {}
  661. },
  662. "rootfile": ["2015\-04\-20T22:20:45+09:00", 130940928]
  663. }
  664. $ curl \-s http://localhost:8384/rest/db/browse?folder=default&prefix=directory/subdirectory | json_pp
  665. {
  666. "another file": ["2015\-04\-20T22:20:45+09:00", 130940928]
  667. }
  668. $ curl \-s http://localhost:8384/rest/db/browse?folder=default&prefix=directory&levels=0 | json_pp
  669. {
  670. "file": ["2015\-04\-20T22:20:45+09:00", 130940928],
  671. "subdirectory": {}
  672. }
  673. .ft P
  674. .fi
  675. .UNINDENT
  676. .UNINDENT
  677. .sp
  678. \fBNOTE:\fP
  679. .INDENT 0.0
  680. .INDENT 3.5
  681. This is an expensive call, increasing CPU and RAM usage on the device. Use sparingly.
  682. .UNINDENT
  683. .UNINDENT
  684. .SS GET /rest/db/completion
  685. .sp
  686. Returns the completion percentage (0 to 100) for a given device and
  687. folder. Takes \fBdevice\fP and \fBfolder\fP parameters.
  688. .INDENT 0.0
  689. .INDENT 3.5
  690. .sp
  691. .nf
  692. .ft C
  693. {
  694. "completion": 100,
  695. "globalBytes": 156793013575,
  696. "needBytes": 0,
  697. "needDeletes": 0
  698. }
  699. .ft P
  700. .fi
  701. .UNINDENT
  702. .UNINDENT
  703. .sp
  704. \fBNOTE:\fP
  705. .INDENT 0.0
  706. .INDENT 3.5
  707. This is an expensive call, increasing CPU and RAM usage on the device. Use sparingly.
  708. .UNINDENT
  709. .UNINDENT
  710. .SS GET /rest/db/file
  711. .sp
  712. Returns most data available about a given file, including version and
  713. availability. Takes \fBfolder\fP and \fBfile\fP parameters.
  714. .INDENT 0.0
  715. .INDENT 3.5
  716. .sp
  717. .nf
  718. .ft C
  719. {
  720. "availability": [
  721. {
  722. "id": "ITZRNXE\-YNROGBZ\-HXTH5P7\-VK5NYE5\-QHRQGE2\-7JQ6VNJ\-KZUEDIU\-5PPR5AM",
  723. "fromTemporary": false
  724. }
  725. ],
  726. "global": {
  727. "deleted": false,
  728. "ignored": false,
  729. "invalid": false,
  730. "localFlags": 0,
  731. "modified": "2018\-08\-18T12:21:13.836784059+02:00",
  732. "modifiedBy": "SYNO4VL",
  733. "mustRescan": false,
  734. "name": "testfile",
  735. "noPermissions": false,
  736. "numBlocks": 1,
  737. "permissions": "0755",
  738. "sequence": 107499,
  739. "size": 1234,
  740. "type": 0,
  741. "version": [
  742. "SYNO4VL:1"
  743. ]
  744. },
  745. "local": {
  746. "deleted": false,
  747. "ignored": false,
  748. "invalid": false,
  749. "localFlags": 0,
  750. "modified": "2018\-08\-18T12:21:13.836784059+02:00",
  751. "modifiedBy": "SYNO4VL",
  752. "mustRescan": false,
  753. "name": "testfile",
  754. "noPermissions": false,
  755. "numBlocks": 1,
  756. "permissions": "0755",
  757. "sequence": 111038,
  758. "size": 1234,
  759. "type": 0,
  760. "version": [
  761. "SYNO4VL:1"
  762. ]
  763. }
  764. }
  765. .ft P
  766. .fi
  767. .UNINDENT
  768. .UNINDENT
  769. .SS GET /rest/db/ignores
  770. .sp
  771. Takes one parameter, \fBfolder\fP, and returns the content of the
  772. \fB\&.stignore\fP as the \fBignore\fP field. A second field, \fBexpanded\fP,
  773. provides a list of strings which represent globbing patterns described by gobwas/glob (based on standard wildcards) that match the patterns in \fB\&.stignore\fP and all the includes. If appropriate these globs are prepended by the following modifiers: \fB!\fP to negate the glob, \fB(?i)\fP to do case insensitive matching and \fB(?d)\fP to enable removing of ignored files in an otherwise empty directory.
  774. .INDENT 0.0
  775. .INDENT 3.5
  776. .sp
  777. .nf
  778. .ft C
  779. {
  780. "ignore": [
  781. "(?i)/Backups"
  782. ],
  783. "expanded": [
  784. "(?i)Backups",
  785. "(?i)Backups/**"
  786. ]
  787. }
  788. .ft P
  789. .fi
  790. .UNINDENT
  791. .UNINDENT
  792. .SS POST /rest/db/ignores
  793. .sp
  794. Expects a format similar to the output of \fBGET\fP call, but only
  795. containing the \fBignore\fP field (\fBexpanded\fP field should be omitted).
  796. It takes one parameter, \fBfolder\fP, and either updates the content of
  797. the \fB\&.stignore\fP echoing it back as a response, or returns an error.
  798. .SS GET /rest/db/need
  799. .sp
  800. Takes one mandatory parameter, \fBfolder\fP, and returns lists of files which are
  801. needed by this device in order for it to become in sync.
  802. .sp
  803. Furthermore takes an optional \fBpage\fP and \fBperpage\fP arguments for pagination.
  804. Pagination happens, across the union of all needed files, that is \- across all
  805. 3 sections of the response.
  806. For example, given the current need state is as follows:
  807. .INDENT 0.0
  808. .IP 1. 3
  809. \fBprogress\fP has 15 items
  810. .IP 2. 3
  811. \fBqueued\fP has 3 items
  812. .IP 3. 3
  813. \fBrest\fP has 12 items
  814. .UNINDENT
  815. .sp
  816. If you issue a query with \fBpage=1\fP and \fBperpage=10\fP, only the \fBprogress\fP
  817. section in the response will have 10 items. If you issue a request query with
  818. \fBpage=2\fP and \fBperpage=10\fP, \fBprogress\fP section will have the last 5 items,
  819. \fBqueued\fP section will have all 3 items, and \fBrest\fP section will have first
  820. 2 items. If you issue a query for \fBpage=3\fP and \fBperpage=10\fP, you will only
  821. have the last 10 items of the \fBrest\fP section.
  822. .sp
  823. In all these calls, \fBtotal\fP will be 30 to indicate the total number of
  824. available items.
  825. .INDENT 0.0
  826. .INDENT 3.5
  827. .sp
  828. .nf
  829. .ft C
  830. {
  831. # Files currently being downloaded
  832. "progress": [
  833. {
  834. "flags": "0755",
  835. "sequence": 6,
  836. "modified": "2015\-04\-20T23:06:12+09:00",
  837. "name": "ls",
  838. "size": 34640,
  839. "version": [
  840. "5157751870738175669:1"
  841. ]
  842. }
  843. ],
  844. # Files queued to be downloaded next (as per array order)
  845. "queued": [
  846. ...
  847. ],
  848. # Files to be downloaded after all queued files will be downloaded.
  849. # This happens when we start downloading files, and new files get added while we are downloading.
  850. "rest": [
  851. ...
  852. ],
  853. "page": 1,
  854. "perpage": 100,
  855. "total": 2000
  856. }
  857. .ft P
  858. .fi
  859. .UNINDENT
  860. .UNINDENT
  861. .sp
  862. \fBNOTE:\fP
  863. .INDENT 0.0
  864. .INDENT 3.5
  865. This is an expensive call, increasing CPU and RAM usage on the device. Use sparingly.
  866. .UNINDENT
  867. .UNINDENT
  868. .SS POST /rest/db/override
  869. .sp
  870. Request override of a send only folder. Override means to make the local
  871. version latest, overriding changes made on other devices. This API call does
  872. nothing if the folder is not a send only folder.
  873. .sp
  874. Takes the mandatory parameter \fIfolder\fP (folder ID).
  875. .INDENT 0.0
  876. .INDENT 3.5
  877. .sp
  878. .nf
  879. .ft C
  880. curl \-X POST \-H X\-API\-key:... http://127.0.0.1:8384/rest/db/override?folder=default
  881. .ft P
  882. .fi
  883. .UNINDENT
  884. .UNINDENT
  885. .SS POST /rest/db/prio
  886. .sp
  887. Moves the file to the top of the download queue.
  888. .INDENT 0.0
  889. .INDENT 3.5
  890. .sp
  891. .nf
  892. .ft C
  893. curl \-X POST http://127.0.0.1:8384/rest/db/prio?folder=default&file=foo/bar
  894. .ft P
  895. .fi
  896. .UNINDENT
  897. .UNINDENT
  898. .sp
  899. Response contains the same output as \fBGET /rest/db/need\fP
  900. .SS POST /rest/db/revert
  901. .sp
  902. New in version 0.14.50.
  903. .sp
  904. Request revert of a receive only folder. Reverting a folder means to undo
  905. all local changes. This API call does nothing if the folder is not a receive
  906. only folder.
  907. .sp
  908. Takes the mandatory parameter \fIfolder\fP (folder ID).
  909. .INDENT 0.0
  910. .INDENT 3.5
  911. .sp
  912. .nf
  913. .ft C
  914. curl \-X POST \-H X\-API\-Key:... http://127.0.0.1:8384/rest/db/revert?folder=default
  915. .ft P
  916. .fi
  917. .UNINDENT
  918. .UNINDENT
  919. .SS POST /rest/db/scan
  920. .sp
  921. Request immediate scan. Takes the optional parameters \fBfolder\fP (folder ID),
  922. \fBsub\fP (path relative to the folder root) and \fBnext\fP (time in seconds). If
  923. \fBfolder\fP is omitted or empty all folders are scanned. If \fBsub\fP is given,
  924. only this path (and children, in case it’s a directory) is scanned. The \fBnext\fP
  925. argument delays Syncthing’s automated rescan interval for a given amount of
  926. seconds.
  927. .sp
  928. Requesting scan of a path that no longer exists, but previously did, is
  929. valid and will result in Syncthing noticing the deletion of the path in
  930. question.
  931. .sp
  932. Returns status 200 and no content upon success, or status 500 and a
  933. plain text error if an error occurred during scanning.
  934. .INDENT 0.0
  935. .INDENT 3.5
  936. .sp
  937. .nf
  938. .ft C
  939. curl \-X POST http://127.0.0.1:8384/rest/db/scan?folder=default&sub=foo/bar
  940. .ft P
  941. .fi
  942. .UNINDENT
  943. .UNINDENT
  944. .SS GET /rest/db/status
  945. .sp
  946. Returns information about the current status of a folder.
  947. .sp
  948. Parameters: \fBfolder\fP, the ID of a folder.
  949. .INDENT 0.0
  950. .INDENT 3.5
  951. .sp
  952. .nf
  953. .ft C
  954. {
  955. "globalBytes": 0,
  956. "globalDeleted": 0,
  957. "globalDirectories": 0,
  958. "globalFiles": 0,
  959. "globalSymlinks": 0,
  960. "ignorePatterns": false,
  961. "inSyncBytes": 0,
  962. "inSyncFiles": 0,
  963. "invalid": "",
  964. "localBytes": 0,
  965. "localDeleted": 0,
  966. "localDirectories": 0,
  967. "localFiles": 0,
  968. "localSymlinks": 0,
  969. "needBytes": 0,
  970. "needDeletes": 0,
  971. "needDirectories": 0,
  972. "needFiles": 0,
  973. "needSymlinks": 0,
  974. "pullErrors": 0,
  975. "receiveOnlyChangedBytes": 0,
  976. "receiveOnlyChangedDeletes": 0,
  977. "receiveOnlyChangedDirectories": 0,
  978. "receiveOnlyChangedFiles": 0,
  979. "receiveOnlyChangedSymlinks": 0,
  980. "sequence": 0,
  981. "state": "idle",
  982. "stateChanged": "2018\-08\-08T07:04:57.301064781+02:00",
  983. "version": 0
  984. }
  985. .ft P
  986. .fi
  987. .UNINDENT
  988. .UNINDENT
  989. .sp
  990. The various fields have the following meaning:
  991. .INDENT 0.0
  992. .TP
  993. .B global*:
  994. Data in the cluster latest version.
  995. .TP
  996. .B inSync*:
  997. Data that is locally the same as the cluster latest version.
  998. .TP
  999. .B local*:
  1000. Data that is locally present, regardless of whether it’s the same or different version as the cluster latest version.
  1001. .TP
  1002. .B need*:
  1003. Data that is needed to become up to date with the cluster latest version (i.e., data that is out of sync).
  1004. .TP
  1005. .B receiveOnlyChanged*:
  1006. Data that has changed locally in a receive only folder, and thus not been sent to the cluster.
  1007. .TP
  1008. .B invalid:
  1009. Deprecated, always empty.
  1010. .TP
  1011. .B pullErrors:
  1012. The number of files that failed to sync during the last sync operations.
  1013. .TP
  1014. .B sequence:
  1015. The current folder sequence number.
  1016. .TP
  1017. .B state:
  1018. The current folder state.
  1019. .TP
  1020. .B stateChanged:
  1021. When the folder state last changed.
  1022. .TP
  1023. .B version:
  1024. Deprecated, equivalent to the sequence number.
  1025. .UNINDENT
  1026. .sp
  1027. \fBNOTE:\fP
  1028. .INDENT 0.0
  1029. .INDENT 3.5
  1030. This is an expensive call, increasing CPU and RAM usage on the device. Use sparingly.
  1031. .UNINDENT
  1032. .UNINDENT
  1033. .SH EVENT ENDPOINTS
  1034. .SS GET /rest/events
  1035. .sp
  1036. To receive events, perform a HTTP GET of \fB/rest/events\fP\&.
  1037. .sp
  1038. To filter the event list, in effect creating a specific subscription for
  1039. only the desired event types, add a parameter
  1040. \fBevents=EventTypeA,EventTypeB,...\fP where the event types are any of the event\-types\&.
  1041. .sp
  1042. The optional parameter \fBsince=<lastSeenID>\fP sets the ID of the last event
  1043. you’ve already seen. Syncthing returns a JSON encoded array of event objects,
  1044. starting at the event just after the one with this last seen ID. The default
  1045. value is 0, which returns all events. There is a limit to the number of events
  1046. buffered, so if the rate of events is high or the time between polling calls is
  1047. long some events might be missed. This can be detected by noting a discontinuity
  1048. in the event IDs.
  1049. .sp
  1050. If no new events are produced since \fB<lastSeenID>\fP, the HTTP call blocks and
  1051. waits for new events to happen before returning. By default it times out after
  1052. 60 seconds returning an empty array. The time out duration can be customized
  1053. with the optional parameter \fBtimeout=<seconds>\fP\&.
  1054. .sp
  1055. To receive only a limited number of events, add the \fBlimit=<n>\fP parameter with a
  1056. suitable value for \fBn\fP and only the \fIlast\fP \fBn\fP events will be returned. This
  1057. can be used to catch up with the latest event ID after a disconnection for
  1058. example: \fB/rest/events?since=0&limit=1\fP\&.
  1059. .SH STATISTICS ENDPOINTS
  1060. .SS GET /rest/stats/device
  1061. .sp
  1062. Returns general statistics about devices. Currently, only contains the
  1063. time the device was last seen.
  1064. .INDENT 0.0
  1065. .INDENT 3.5
  1066. .sp
  1067. .nf
  1068. .ft C
  1069. $ curl \-s http://localhost:8384/rest/stats/device | json
  1070. {
  1071. "P56IOI7\-MZJNU2Y\-IQGDREY\-DM2MGTI\-MGL3BXN\-PQ6W5BM\-TBBZ4TJ\-XZWICQ2": {
  1072. "lastSeen" : "2015\-04\-18T11:21:31.3256277+01:00"
  1073. }
  1074. }
  1075. .ft P
  1076. .fi
  1077. .UNINDENT
  1078. .UNINDENT
  1079. .SS GET /rest/stats/folder
  1080. .sp
  1081. Returns general statistics about folders. Currently contains the
  1082. last scan time and the last synced file.
  1083. .INDENT 0.0
  1084. .INDENT 3.5
  1085. .sp
  1086. .nf
  1087. .ft C
  1088. $ curl \-s http://localhost:8384/rest/stats/folder | json
  1089. {
  1090. "folderid" : {
  1091. "lastScan": "2016\-06\-02T13:28:01.288181412\-04:00",
  1092. "lastFile" : {
  1093. "filename" : "file/name",
  1094. "at" : "2015\-04\-16T22:04:18.3066971+01:00"
  1095. }
  1096. }
  1097. }
  1098. .ft P
  1099. .fi
  1100. .UNINDENT
  1101. .UNINDENT
  1102. .SH MISC SERVICES ENDPOINTS
  1103. .SS GET /rest/svc/deviceid
  1104. .sp
  1105. Verifies and formats a device ID. Accepts all currently valid formats
  1106. (52 or 56 characters with or without separators, upper or lower case,
  1107. with trivial substitutions). Takes one parameter, \fBid\fP, and returns
  1108. either a valid device ID in modern format, or an error.
  1109. .INDENT 0.0
  1110. .INDENT 3.5
  1111. .sp
  1112. .nf
  1113. .ft C
  1114. $ curl \-s http://localhost:8384/rest/svc/deviceid?id=1234 | json
  1115. {
  1116. "error": "device ID invalid: incorrect length"
  1117. }
  1118. $ curl \-s http://localhost:8384/rest/svc/deviceid?id=p56ioi7m\-\-zjnu2iq\-gdr\-eydm\-2mgtmgl3bxnpq6w5btbbz4tjxzwicq | json
  1119. {
  1120. "id": "P56IOI7\-MZJNU2Y\-IQGDREY\-DM2MGTI\-MGL3BXN\-PQ6W5BM\-TBBZ4TJ\-XZWICQ2"
  1121. }
  1122. .ft P
  1123. .fi
  1124. .UNINDENT
  1125. .UNINDENT
  1126. .SS GET /rest/svc/lang
  1127. .sp
  1128. Returns a list of canonicalized localization codes, as picked up from
  1129. the \fBAccept\-Language\fP header sent by the browser.
  1130. .INDENT 0.0
  1131. .INDENT 3.5
  1132. .sp
  1133. .nf
  1134. .ft C
  1135. ["sv_sv","sv","en_us","en"]
  1136. .ft P
  1137. .fi
  1138. .UNINDENT
  1139. .UNINDENT
  1140. .SS GET /rest/svc/random/string
  1141. .sp
  1142. Returns a strong random generated string (alphanumeric) of the specified length. Takes the \fBlength\fP parameter.
  1143. .INDENT 0.0
  1144. .INDENT 3.5
  1145. .sp
  1146. .nf
  1147. .ft C
  1148. {
  1149. "random": "FdPaEaZQ56sXEKYNxpgF"
  1150. }
  1151. .ft P
  1152. .fi
  1153. .UNINDENT
  1154. .UNINDENT
  1155. .SS GET /rest/svc/report
  1156. .sp
  1157. Returns the data sent in the anonymous usage report.
  1158. .INDENT 0.0
  1159. .INDENT 3.5
  1160. .sp
  1161. .nf
  1162. .ft C
  1163. {
  1164. "folderMaxMiB" : 0,
  1165. "platform" : "linux\-amd64",
  1166. "totMiB" : 0,
  1167. "longVersion" : "syncthing v0.12.2 \e"Beryllium Bedbug\e" (go1.4.3 linux\-amd64 default) unknown\[email protected] 2015\-11\-09 13:23:26 UTC",
  1168. "upgradeAllowedManual" : true,
  1169. "totFiles" : 3,
  1170. "folderUses" : {
  1171. "ignorePerms" : 0,
  1172. "autoNormalize" : 0,
  1173. "sendonly" : 0,
  1174. "ignoreDelete" : 0
  1175. },
  1176. "memoryUsageMiB" : 13,
  1177. "version" : "v0.12.2",
  1178. "sha256Perf" : 27.28,
  1179. "numFolders" : 2,
  1180. "memorySize" : 1992,
  1181. "announce" : {
  1182. "defaultServersIP" : 0,
  1183. "otherServers" : 0,
  1184. "globalEnabled" : false,
  1185. "defaultServersDNS" : 1,
  1186. "localEnabled" : false
  1187. },
  1188. "usesRateLimit" : false,
  1189. "numCPU" : 2,
  1190. "uniqueID" : "",
  1191. "urVersion" : 2,
  1192. "rescanIntvs" : [
  1193. 60,
  1194. 60
  1195. ],
  1196. "numDevices" : 2,
  1197. "folderMaxFiles" : 3,
  1198. "relays" : {
  1199. "defaultServers" : 1,
  1200. "enabled" : true,
  1201. "otherServers" : 0
  1202. },
  1203. "deviceUses" : {
  1204. "compressMetadata" : 1,
  1205. "customCertName" : 0,
  1206. "staticAddr" : 1,
  1207. "compressAlways" : 0,
  1208. "compressNever" : 1,
  1209. "introducer" : 0,
  1210. "dynamicAddr" : 1
  1211. },
  1212. "upgradeAllowedAuto" : false
  1213. }
  1214. .ft P
  1215. .fi
  1216. .UNINDENT
  1217. .UNINDENT
  1218. .SH AUTHOR
  1219. The Syncthing Authors
  1220. .SH COPYRIGHT
  1221. 2014-2019, The Syncthing Authors
  1222. .\" Generated by docutils manpage writer.
  1223. .