Using Pydio’s REST API (curl examples)

There are literally no examples anywhere on how to use Pydio’s RESTful API.
The official docs are often incorrect, don’t include many parameters or describe them wrong.
Here are a few examples that I got to through trail & error:

Uploading files:

Sharing files:

Other options you may use:
– password
– expiration (how many days until the link expires)

In the response body you’ll get the link to the file.

Downloading files:

References: