Available commands
Various operations can be run on Panoramax API using its command line tool: migrate or clean-up database, authentication token handling, sequence management...
Database migration
As Panoramax is actively developed, when updating from a previous version, some database migration could be necessary. If so, when starting Panoramax, an error message will show up and warn about necessary migration. The following command has to be ran:
Rollback
There might be no reason to do so, but if necessary, a migration rollback can also be done:
Note
A full database rollback (ie. removing all structures and data created by Panoramax API) can also be done by adding --all
to the rollback
command.
Force pictures heading in sequence
Since version 1.4.0, you can import pictures without heading metadata. By default, heading is computed based on sequence movement path (looking in front), but you can edit manually after import using this command:
Cached data
Some data is cached (using materialized views) in database for a better performance.
If you use background workers (and you should on a production-grade instance), they will do this regularly (based on the PICTURE_PROCESS_REFRESH_CRON
parameter). Else you have to run from time to time the flask db refresh
command to keep these views up-to-date. This can be run regularly using cron for example.
Clean-up
Eventually, if you want to clear database and delete derivate versions of pictures files (it doesn't delete original pictures), you can use the cleanup
command:
You can cleanup only certain sequences:
You can also run some partial cleaning with the same cleanup command and one of the following options:
- Removes entries from database
- Removes picture derivates (tiles, SD and thumbnail)
- Removes permanent (original) pictures
- Removes entries from database
- Removes picture derivates (tiles, SD and thumbnail)
- Removes permanent (original) pictures
Sequences reorder
You can sort all sequences by pictures capture time with the following command:
If you want to reorder some specific sequences, you need their ID (the UUID):
JWT token for the instance administrator
An instance administrator can get the JWT token of the default instance's account with the flask command default-account-tokens get
.
This token can then be used to authenticate api calls as bearer token. This is especially useful when running an instance without an OAuth provider.
Check the API authentication section to know more what you can do with this token.
Warning
The instance need to be configured with a valid FLASK_SECRET_KEY
for this to work (cf instance configuration). Be sure not to share this token!