# 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.