Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
acolomb opened this issue Aug 5, 2024 · 2 comments
Open

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

acolomb opened this issue Aug 5, 2024 · 2 comments

Comments

@acolomb
Copy link
Member

acolomb commented Aug 5, 2024

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
Copy link
Member

calmh commented Aug 5, 2024

That's browse, not scan, but yeah.

@acolomb acolomb changed the title rest: Missing parameter "dirsonly" in /db/scan rest: Missing parameter "dirsonly" in /db/browse Aug 5, 2024
@acolomb
Copy link
Member Author

acolomb commented Aug 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants