File Manager API

For developers: Hubitat File Manager API

File Manager API

Hubitat provides an interface for app developers to create/upload, delete, download, and list File Manager files.

NOTE: This information is for developers. End users looking for information how to use File Manager should consult the File Manager documentation.

Methods

  • void deleteHubFile(String fileName): deletes the supplied file name
  • byte[] downloadHubFile(String fileName): returns a byte array containing the contents from the supplied file name
  • List<Map<String,String>> getHubFiles()
  • void uploadHubFile(String fileName, byte[] bytes): uploads (creates or overwrites) the suppled file name with the supplied byte array content (same format retrieved from downloadHubFile()); note that file name is subject to name restrictions identical to regular use of File Manager.