# Syncthing **Distributed File Synchronization** Endpoints for managing Syncthing-based distributed file synchronization services. These APIs enable secure, decentralized file sharing and synchronization across Flux nodes, providing reliable data distribution and backup capabilities for decentralized applications and user data. **Synchronization Services:** - Peer-to-peer file synchronization - Distributed storage management - Conflict resolution - Encryption and security - Bandwidth optimization ## Set an error message - [POST /syncthing/system/error](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsystemerrorpost.md): Post with an error message in the body (plain text) to register a new error. The new error will be displayed on any active GUI clients. ## List of error messages - [GET /syncthing/system/error](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsystemerrorget.md): Get list with error message. ## Remove all recent errors - [POST /syncthing/system/error/clear](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsystemerrorclear.md): Post with empty body to remove all recent errors. ## Syncthing version information - [GET /syncthing/system/version](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsystemversion.md): Returns the current Syncthing version information. ## Perform an upgrade - [POST /syncthing/system/upgrade](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingupgradepost.md): Perform an upgrade to the newest released version and restart. Does nothing if there is no newer version than currently running. ## Checks for a possible upgrade - [GET /syncthing/system/upgrade](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingupgradeget.md): Checks for a possible upgrade and returns an object describing the newest version and upgrade possibility. ## Returns a list of directories - [GET /syncthing/system/browse](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytembrowse.md): Returns a list of directories matching the path given by the optional parameter . The path can use patterns as described in Go’s filepath package. A ‘current* is not given, filesystem root paths are returned. ## Pause the given device or all devices - [GET /syncthing/system/pause](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytempause.md): Pause the given device or all devices. Takes the optional parameter device (device ID). When omitted, pauses all devices. Returns status 200 and no content upon success, or status 500 and a plain text error on failure. ## Resume the given device or all devices - [GET /syncthing/system/resume](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytemresume.md): Resume the given device or all devices. Takes the optional parameter device (device ID). When omitted, pauses all devices. Returns status 200 and no content upon success, or status 500 and a plain text error on failure. ## Restart Syncthing - [GET /syncthing/system/restart](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsystemrestart.md): Immediately restart Syncthing. ## Shutdown Syncthing - [GET /syncthing/system/shutdown](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsystemshutdown.md): Immediately shutdown Syncthing. ## Erase the current index database and restart Syncthing - [GET /syncthing/system/reset](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsystemreset.md): Erase the current index database and restart Syncthing. With no query parameters, the entire database is erased from disk. By specifying the folder parameter with a valid folder ID, only information for that folder will be erased. ## Status of Syncthing - [GET /syncthing/system/status](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsystemstatus.md): Returns information about current system status and resource usage. The CPU percent value has been deprecated from the API and will always report 0. ## Returns the path locations - [GET /syncthing/system/paths](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytempath.md): Returns the path locations used internally for storing configuration, database, and others. ## Returns the list of configured devices and some metadata associated with them - [GET /syncthing/system/connections](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytemconnections.md): Returns the list of configured devices and some metadata associated with them. The list also contains the local device itself as not connected. The connection types are TCP (Client), TCP (Server), Relay (Client) and Relay (Server). ## Returns/Add local discovery cache - [GET /syncthing/system/discovery](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytemdiscovery.md): Returns the contents of the local discovery cache. ## Returns the set of debug facilities. - [GET /syncthing/system/debug](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytemdebug.md): Returns the set of debug facilities and which of them are currently enabled. Enables or disables debugging for specified facilities. Give one or both of enable and disable query parameters, with comma separated facility names. To disable debugging of the beacon and discovery packages, and enable it for config and db. ## Returns the list of recent log entries - [GET /syncthing/system/log](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytemlog.md): Returns the list of recent log entries. The optional parameter limits the results to message newer than the given timestamp in * format. ## Returns the list of recent log entries as text - [GET /syncthing/system/logtxt](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytemlogtxt.md): Returns the list of recent log entries as text. The optional parameter limits the results to message newer than the given timestamp in * format. ## Ping pong tester call - [GET /syncthing/system/ping](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsysytemping.md): Return object. ## Returns config - [GET /syncthing/config](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfig.md): Returns the entire config. ## Returns device config section - [GET /syncthing/config/devices](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigdevices.md): Returns all devices as an array. Returns the device for the given ID. ## Returns folder config section - [GET /syncthing/config/folders](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigfoldersget.md): Returns all folders as an array. Returns the folders for the given ID. ## Replace folder config section - [POST /syncthing/config/folders](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigfolderspost.md): Replace folder config section. ## Returns a template folder configuration - [GET /syncthing/config/defaults/folder](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigdefaultsfolder.md): Returns a template folder configuration object with all default values, which only needs a unique ID to be applied. ## Returns a template device configuration - [GET /syncthing/config/defaults/device](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigdefaultsdevice.md): Returns a template device configuration object with all default values, which only needs a unique ID to be applied. ## Returns an object with a single lines attribute - [GET /syncthing/config/defaults/ignores](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigignores.md): Returns an object with a single lines attribute listing ignore patterns to be used by default on folders, as an array of single-line strings. ## Returns the respective object - [GET /syncthing/config/options](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigoptions.md): GET returns the respective object, PUT replaces the entire object and PATCH replaces only the given child objects. ## Returns the respective object of gui config - [GET /syncthing/config/gui](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigguiget.md): GET returns the respective object, PUT replaces the entire object and PATCH replaces only the given child objects. ## Replaces the entire gui object in config - [POST /syncthing/config/gui](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigguipost.md): Replaces the entire gui object in config. ## Returns the respective object - [GET /syncthing/config/ldap](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigldapget.md): GET returns the respective object, PUT replaces the entire object and PATCH replaces only the given child objects. ## Replaces the entire ldap config object - [POST /syncthing/config/ldap](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigldappost.md): Replaces the entire ldap config object. ## Status of restart required - [GET /syncthing/config/restart-required](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingconfigrestartrequired.md): GET returns whether a restart of Syncthing is required for the current config to take effect. ## Returns general statistics about devices - [GET /syncthing/stats/device](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingstatsdevice.md): Returns general statistics about devices. Currently, only contains the time the device was last seen and the last connection duration. ## Returns general statistics about folder - [GET /syncthing/stats/folder](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingstatsfolder.md): Returns general statistics about folders. Currently contains the last scan time and the last synced file. ## Lists remote devices which have tried to connect - [GET /syncthing/cluster/pending/devices](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingpendingdevice.md): Lists remote devices which have tried to connect, but are not yet configured in our instance. ## Remove records about a pending remote device which tried to connect - [POST /syncthing/cluster/pending/devices](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingpendingdevicespost.md): Remove records about a pending remote device which tried to connect. Valid values for the device parameter are those from the corresponding GET /rest/cluster/pending/devices endpoint. ## Lists folders which remote devices have offered to us, but are not yet shared from our instance to them - [GET /syncthing/cluster/pending/folders](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingpendingfolders.md): Lists folders which remote devices have offered to us, but are not yet shared from our instance to them. Takes the optional parameter to only return folders offered by a specific remote device. Other offering devices are also omitted from the result. ## Remove records about a pending folder announced from a remote device - [POST /syncthing/cluster/pending/folders](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingpendingfolderspost.md): Remove records about a pending folder announced from a remote device. Valid values for the folde parameters are those from the corresponding GET /rest/cluster/pending/folders endpoint. ## Returns the list of errors encountered during scanning or pulling - [GET /syncthing/folder/errors](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingfolderserror.md): Takes one mandatory parameter, , and returns the list of errors encountered during scanning or pulling. ## Returns the list of archived files that could be recovered - [GET /syncthing/folder/versions](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingfolderversions.md): Takes one mandatory parameter, folder, and returns the list of archived files that could be recovered. How many versions are available depends on the File Versioning configuration. Each entry specifies when the file version was archived as the versionTime, the modTime when it was last modified before being archived, and the size in bytes. ## Returns the directory tree of the global model - [GET /syncthing/db/browse](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbbrowse.md): Returns the directory tree of the global model. takes one mandatory parameter and two optional parameters and . ## Returns the completion percentage and byte / item counts - [GET /syncthing/db/completion](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbcompletion.md): Returns the completion percentage (0 to 100) and byte / item counts. Takes optional and parameters. ## Returns the content of the .stignore as the ignore field - [GET /syncthing/db/ignores](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbignores.md): Takes one parameter, , and returns the content of the .stignore as the ignore field. A second field, expanded, provides a list of strings which represent globbing patterns described by gobwas/glob (based on standard wildcards) that match the patterns in .stignore and all the includes. If appropriate these globs are prepended by the following modifiers ! to negate the glob, (?i) to do case insensitive matching and (?d) to enable removing of ignored files in an otherwise empty directory. ## Updates the content of the .stignore - [POST /syncthing/db/ignores](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbignorespost.md): Expects a format similar to the output of GET /rest/db/ignores call, but only containing the ignore field (expanded field should be omitted). It takes one parameter, folder, and either updates the content of the .stignore echoing it back as a response, or returns an error. ## Returns the list of files which were changed locally in a receive-only folder - [GET /syncthing/db/localchanged](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdblocalchanged.md): Takes one mandatory parameter, , and returns the list of files which were changed locally in a receive-only folder. Thus they differ from the global state and could be reverted by pulling from remote devices again. ## Returns lists of files which are needed by this device in order for it to become in sync - [GET /syncthing/db/need](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbneed.md): Takes one mandatory parameter, folder, and returns lists of files which are needed by this device in order for it to become in sync. ## Returns the list of files which are needed by that remote device in order for it to become in sync with the shared folder - [GET /syncthing/db/remoteneed](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbremoteneed.md): Takes the mandatory parameters and , and returns the list of files which are needed by that remote device in order for it to become in sync with the shared folder. ## Returns information about the current status of a folder - [GET /syncthing/db/status](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbstatus.md): Returns information about the current status of a folder. Parameters , the ID of a folder. ## Request immediate scan - [POST /syncthing/db/scan](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbscan.md): Request immediate scan. Takes the optional parameters (folder ID). ## Request revert of a receive only folder - [POST /syncthing/db/revert](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbrevert.md): Request revert of a receive only folder. Reverting a folder means to undo all local changes. ## Moves the file to the top of the download queue - [POST /syncthing/db/prio](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdbprio.md): Moves the file to the top of the download queue and params are mandatory. ## Request override of a send only folder - [POST /syncthing/db/override](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdboverride.md): Request override of a send only folder. Override means to make the local version latest, overriding changes made on other devices. This API call does nothing if the folder is not a send only folder. Takes the mandatory parameter (folder ID). ## Returns events - [GET /syncthing/events](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingevents.md): To filter the event list, in effect creating a specific subscription for only the desired event types, add a parameter events=EventTypeA,EventTypeB,... where the event types are any of the Event Types. If no filter is specified, all events except LocalChangeDetected and RemoteChangeDetected are included. The optional parameter since= sets the ID of the last event you've already seen. Syncthing returns a JSON encoded array of event objects, starting at the event just after the one with this last seen ID. The default value is 0, which returns all events. There is a limit to the number of events buffered, so if the rate of events is high or the time between polling calls is long some events might be missed. This can be detected by noting a discontinuity in the event IDs. If no new events are produced since , the HTTP call blocks and waits for new events to happen before returning. By default it times out after 60 seconds returning an empty array. The time out duration can be customized with the optional parameter timeout=. To receive only a limited number of events, add the limit= parameter with a suitable value for n and only the last n events will be returned. This can be used to catch up with the latest event ID after a disconnection. ## Returns events - [GET /syncthing/events/disk](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingeventsdisk.md): To filter the event list, in effect creating a specific subscription for only the desired event types, add a parameter events=EventTypeA,EventTypeB,... where the event types are any of the Event Types. If no filter is specified, all events except LocalChangeDetected and RemoteChangeDetected are included. The optional parameter since= sets the ID of the last event you've already seen. Syncthing returns a JSON encoded array of event objects, starting at the event just after the one with this last seen ID. The default value is 0, which returns all events. There is a limit to the number of events buffered, so if the rate of events is high or the time between polling calls is long some events might be missed. This can be detected by noting a discontinuity in the event IDs. If no new events are produced since , the HTTP call blocks and waits for new events to happen before returning. By default it times out after 60 seconds returning an empty array. The time out duration can be customized with the optional parameter timeout=. To receive only a limited number of events, add the limit= parameter with a suitable value for n and only the last n events will be returned. This can be used to catch up with the latest event ID after a disconnection. ## Returns the data sent in the anonymous usage report - [GET /syncthing/svc/report](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsvcreport.md): Returns the data sent in the anonymous usage report. ## Returns a strong random generated string - [GET /syncthing/svc/random/string](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsvcrandom.md): Returns a strong random generated string (alphanumeric) of the specified length. Takes the `` parameter. ## Verifies and formats a device ID. - [GET /syncthing/svc](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingsvc.md): Verifies and formats a device ID. Accepts all currently valid formats (52 or 56 characters with or without separators, upper or lower case, with trivial substitutions). Takes one parameter, id, and returns either a valid device ID in modern format, or an error. ## Returns statistics about each served REST API endpoint - [GET /syncthing/debug/httpmetrics](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdebughttpmetrics.md): Returns statistics about each served REST API endpoint, to diagnose how much time was spent generating the responses. ## Summarizes the completion percentage for each remote device - [GET /syncthing/debug/peercompletion](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdebugpeercompletion.md): Summarizes the completion percentage for each remote device. Returns an object with device IDs as keys and an integer percentage as values. ## Used to capture a profile of what Syncthing is doing on the CPU - [GET /syncthing/debug/cpuprof](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdebugcpuprof.md): The profiling starts when the page is requested and takes 30 seconds. During this time it will seem like nothing is happening and the browser is just waiting, hung, or “spinning”. Don’t worry - leave it be and have patience. Once done the profiling will result in a download called something like syncthing-cpu-windows-amd64-v0.14.4-112233.pprof. This is the file to keep and send in, without modifying the file name as it tells us information necessary to interpret it. ## Used to capture a profile of what Syncthing is doing with the heap memory - [GET /syncthing/debug/heapprof](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdebugheapprof.md): The profiling will result in a download called something like syncthing-heap-windows-amd64-v0.14.4-112233.pprof. This is the file to keep and send in, without modifying the file name as it tells us information necessary to interpret it. ## Collects information about the running instance for troubleshooting purposes - [GET /syncthing/debug/support](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdebugsupport.md): Returns a “support bundle” as a zipped archive, which should be sent to the developers after verifying it contains no sensitive personal information. Credentials for the web GUI and the API key are automatically redacted already. ## Shows diagnostics about a certain file in a shared folder - [GET /syncthing/debug/file](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdebugfile.md): Shows diagnostics about a certain file in a shared folder. Takes the folder (folder ID) and file (folder relative path) parameters. ## Display deviceid - [GET /syncthing/deviceid](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingdeviceid.md): Returns deviceid. ## Display metadata information - [GET /syncthing/meta](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthingmeta.md): Returns metadata variable. ## Check health status - [GET /syncthing/health](https://docs.runonflux.io/fluxapi/syncthing/fluxsyncthinghealth.md): Returns health status object.