syncthing / docs

Documentation site
http://docs.syncthing.net/
242 stars 503 forks source link

rest: Missing parameter "dirsonly" in /db/browse #871

Open acolomb opened 2 months ago

acolomb commented 2 months ago

The Syncthing API code evaluates a parameter named dirsonly on the GET /rest/db/browse call:

https://github.com/syncthing/syncthing/blob/17e60b9e0c340d12b80d015663c058bd54d03557/lib/api/api.go#L778

This parameter is not documented. Especially it should be cleared up what values are evaluated as true: no, 0 and false would all be regarded as true if I read the code correctly. Maybe that should be tightened / specified more clearly also in the API code.

calmh commented 2 months ago

That's browse, not scan, but yeah.

acolomb commented 2 months ago

Right, just noticed myself. While I was investigating where the docs even came from. Apparently it was omitted in the very first committed version.

Actually I got confused about the endpoint because I started out wondering how we'd prefer to parse a boolean parameter on an endpoint. And this is the only reference I could find - not a very good one, as shown by the examples.