This should be under /api, and also consider changing the name to something more descriptive, something like /api/fs/listdirectories (or better if you can figure something out)