Skip to content

Instantly share code, notes, and snippets.


Eser Gozcu EserGozcu

  • Sweden
View GitHub Profile
import requests
url_system_status = ""
headers= {"X-API-Key" : "XXXXXXX"}
contents = open('config_edited.json', 'rb').read()
post_data =,headers=headers,data=contents)
View gist:c1a6428e41acf20d58b0761e250a6932
version 28
folders [{'id': '99ske-maske', 'label': '1', 'filesystemType': 'basic', 'path': 'R:\\1', 'type': 'readwrite', 'devices': [{'deviceID': 'KEDUFUO-', 'introducedBy': ''}, {'deviceID': 'KW23ASQ-', 'introducedBy': ''}], 'rescanIntervalS': 60, 'fsWatcherEnabled': False, 'fsWatcherDelayS': 10, 'ignorePerms': False, 'autoNormalize': True, 'minDiskFree': {'value': 1, 'unit': '%'}, 'versioning': {'type': '', 'params': {}}, 'copiers': 0, 'pullers': 0, 'hashers': 0, 'order': 'random', 'ignoreDelete': False, 'scanProgressIntervalS': 0, 'pullerPauseS': 0, 'maxConflicts': 10, 'disableSparseFiles': False, 'disableTempIndexes': False, 'paused': False, 'weakHashThresholdPct': 25, 'markerName': '.stfolder'}]
devices [{'deviceID': 'KEDUFUO', 'name': 'LAP1', 'addresses': ['dynamic'], 'compression': 'metadata', 'certName': '', 'introducer': False, 'skipIntroductionRemovals': False, 'introducedBy': '', 'paused': False, 'allowedNetworks': [], 'autoAcceptFolders': False}, {'deviceID': 'KW23ASQ', 'name': '', 'addresses': ['
View gist:3daa5da49eefe11bb052335f637df249
import requests #request library is to send HTTP requests
url_system_status = ""
#according to the documentation of Syncthing,/rest/system/config exposes configuration details
headers= {"X-API-Key" : "XXXXXXXXXXX"}
headers is for authentication. Syncthing REST API exposes the end points via API Key
API key can be found at Syncthing GUI --> Actions --> Settings
You can’t perform that action at this time.