REST API¶
Syncthing exposes a REST interface over HTTP on the GUI port. This is used bythe GUI (from Javascript) and can be used by other processes wishing to controlSyncthing. In most cases both the input and output data is in JSON format. Theinterface is subject to change.
API Key¶
To use the REST API an API key must be set and used. The API key can begenerated in the GUI, or set in theconfiguration/gui/apikey element inthe configuration file. To use an API key, set the request headerX-API-Key to the API key value, or set it as aBearer token in theAuthorization header. For example,curl-XPOST-H"X-API-Key:abc123"http://localhost:8384/rest/... orcurl-XPOST-H"Authorization:Bearerabc123"http://localhost:8384/rest/... can be used to invoke withcurl(add-k flag when using HTTPS with a Syncthing generated or self signedcertificate).
One exception to this requirement is/rest/noauth, you do not need an APIkey to use those endpoints. This way third-party devices and services can dosimple calls that don’t expose sensitive information without having to exposeyour API key.
Result Pagination¶
SomeGET endpoints take optionalpage andperpage arguments forpagination. No more thanperpage (defaults to 65536 if not given) resultentries are returned in an array. To access further entries, passing thepage parameter will advance in the results by that many pages. The actuallyused parameters are always returned as attributes in the response object.
System Endpoints¶
- GET /rest/system/browse
- GET /rest/system/config (DEPRECATED)
- GET /rest/system/config/insync (DEPRECATED)
- POST /rest/system/config (DEPRECATED)
- GET /rest/system/connections
- GET /rest/system/discovery
- POST /rest/system/discovery
- POST /rest/system/error/clear
- GET /rest/system/error
- POST /rest/system/error
- GET /rest/system/log
- GET /rest/system/log.txt
- GET /rest/system/loglevels
- POST /rest/system/loglevels
- GET /rest/system/paths
- POST /rest/system/pause
- GET /rest/system/ping
- POST /rest/system/ping
- POST /rest/system/reset
- POST /rest/system/restart
- POST /rest/system/resume
- POST /rest/system/shutdown
- GET /rest/system/status
- GET /rest/system/upgrade
- POST /rest/system/upgrade
- GET /rest/system/version
Config Endpoints¶
Cluster Endpoints¶
Concerns the mesh network structure.
Folder Endpoints¶
Runtime state of the individual shared folders.
Database Endpoints¶
Event Endpoints¶
Statistics Endpoints¶
Misc Services Endpoints¶
Debug Endpoints¶
Noauth Endpoints¶
Calls that do not require authentication.