Routes
The filepack server responds to the following API routes:
| method | path | description |
|---|---|---|
| POST | /api | Verify uploaded directory with hash. |
| GET | /api | Serve file with hash. |
| PUT | /api | Upload file with hash. |
| POST | /api | Delete files, directories, packages, and revisions not reachable by package number. |
| HEAD | /api | Check whether revision is the head of a package. |
| POST | /api | Report which files the server lacks. |
| DELETE | /api | Delete package with number. |
| GET | /api | Return information about package with number. |
| GET | /api | List all package numbers. |
| HEAD | /api | Check whether package with fingerprint is present. |
| POST | /api | Verify uploaded package with fingerprint. |
| GET | /api | List all package fingerprints. |
| POST | /api | Verify uploaded revision and assign it a package number. |
And the following web routes:
| method | path | description |
|---|---|---|
| GET | / | Display all packages. |
| GET | /artwork | Serve cover art of package with fingerprint. |
| GET | /artwork | Serve thumbnail of cover art of package with fingerprint. |
| GET | /directory | Display entries of directory with hash. |
| GET | /favicon.ico | Serve favicon. |
| GET | /file | Serve file with hash. |
| GET | /file | Serve file with hash, with content type inferred from path, redirecting to /file/{hash} if the extension of path is not recognized. |
| GET | /files | Display all files on the server. |
| GET | /install.sh | Serve installation script. |
| GET | /media | Serve audio item of package with fingerprint. |
| GET | /media | Serve image item of package with fingerprint. |
| GET | /media | Serve thumbnail of image item of package with fingerprint. |
| GET | /media | Serve video item of package with fingerprint. |
| GET | /media | Serve placeholder image of video item of package with fingerprint. |
| GET | /media | Serve thumbnail of placeholder image of video item of package with fingerprint. |
| GET | /mount | Redirect to root of mounted package, with trailing slash. |
| GET | /mount | Serve index.html from static directory of mounted package. |
| GET | /mount | Serve path from static directory of mounted package. |
| GET | /package | Display package. |
| GET | /package | Display revision history of package. |
| GET | /package | Display media item of package. |
| GET | /package | Display media of package. |
| GET | /packages | Display all packages. |
| GET | /static | Serve static asset at path. |