GET /rest/system/browse

Returns a list of directories matching the path given by the optional parameter current. The path can use patterns as described in Go’s filepath package. A ‘*’ will always be appended to the given path (e.g. /tmp/ matches all its subdirectories). If the option current is not given, filesystem root paths are returned.

  1. $ curl -H "X-API-Key: yourkey" localhost:8384/rest/system/browse | json_pp
  2. [
  3. "/"
  4. ]
  5. $ curl -H "X-API-Key: yourkey" localhost:8384/rest/system/browse?current=/var/ | json_pp
  6. [
  7. "/var/backups/",
  8. "/var/cache/",
  9. "/var/lib/",
  10. "/var/local/",
  11. "/var/lock/",
  12. "/var/log/",
  13. "/var/mail/",
  14. "/var/opt/",
  15. "/var/run/",
  16. "/var/spool/",
  17. "/var/tmp/"
  18. ]
  19. $ curl -H "X-API-Key: yourkey" localhost:8384/rest/system/browse?current=/var/*o | json_pp
  20. [
  21. "/var/local/",
  22. "/var/lock/",
  23. "/var/log/",
  24. "/var/opt/",
  25. "/var/spool/"
  26. ]