2.4 KiB
DSV play storage
This application has two jobs:
- handle new uploads and places them in the daemon's processing queue.
- serve presentation files after verifying valid access rights
In order for file serving to work, the hosting web server must support the X-Sendfile header.
Python dependencies
The application runs on python3. Its dependencies require python development
libraries to work, e.g. python3-dev
on Debian. Dependencies are
listed in requirements.txt
.
The directory ./venv
is exempted from git for ease of virtualenv use.
Setup
The application requires a database and two writable directories.
A dump of the schema is available for import from ./db.sql
.
The required writable directories are ./queue
and ./storage
. Both may
be symbolic links.
Remaining settings should be set in ./config.ini
. The format is documented
in ./config.ini.example
.
API reference
The API always returns JSON objects on successful requests unless otherwise noted.
/presentation
GET a list of all available presentation IDs.
/presentation/{{PACKAGEID}}
GET the package information for PACKAGEID.
DELETE PACKAGEID. Requires authentication as
configured in config.ini
.
This should change to a bearer token to align with other authenticated resources.
/presentation/{{PACKAGEID}}/{{PATH}}[?token={{TOKEN}}]
GET the file at PATH in PACKAGEID. TOKEN is required for all files except images.
/notify
Deprecated in favor of the origin-specific subpaths default
, mediasite
and cattura
.
GET a brief description of the incoming package format.
POST a package to be processed.
/notify/hold
Same as /notify
, but packages submitted this way are put on hold.
/notify/default
POST a package to be processed. The request body should be a package specification as documented by the play daemon.
/notify/mediasite
POST a package to be processed. The request body should be a package specification in the mediasite package format.
/notify/cattura
POST a package to be processed from a cattura recorder webhook.
/status/daemon
GET the processing daemon status. Returns a single
boolean field, running
.
/status/queue
GET a list of all items in the processing queue. The items are sorted in the order they will be processed. Items on hold are not shown.