Skip to content

Instantly share code, notes, and snippets.

@tiff
Last active March 16, 2020 20:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiff/a384f69f0ced5a896f2c to your computer and use it in GitHub Desktop.
Save tiff/a384f69f0ced5a896f2c to your computer and use it in GitHub Desktop.
Protonet File API

Protonet File API

Protonet supports the WebDAV protocol. You can access it under the following URL:

https://yourbox.protonet.info/dav

The API expects XML and responds with XML. WebDAV provides you with all features necessary to work with the Protonet file system (create, delete, list files/folders, ...). There are libraries/clients for almost every programming language that simplify working with the webdav server.

Authorization

WebDAV authorization is done via Basic Access Authorization. User name is the user's first and last name concatenated by a dot (eg. john.doe). Password is the user's password on your Protonet box.

Examples

List all files in the root directory:

curl --user 'john.doe:secretpassword' -X PROPFIND https://yourbox.protonet.info/dav --upload-file - -H "Depth: 1" <<end
<?xml version="1.0"?>
<a:propfind xmlns:a="DAV:">
<a:prop><a:resourcetype/></a:prop>
</a:propfind>
end

Clients/Libraries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment