integreat-cms
integreat-cms copied to clipboard
Allow dynamic export of database objects
Short description
This is an experimental pr which adds a new api endopint that creates a data export which can be imported using ./tools/integreat-cms-cli loaddata path/to/json
To preserve user privacy, only whitelisted models get exported and user account information will not be included in the export. Also only administrators are allowed to use this endpoint.
This is currently a proof of concept and only exports regions, languages, pages and page translations
Please take a look at this and let me know whether this approach is something that could be incorporated :)
Proposed changes
- Add a
dump
function that exports all objects of selected models as json. - Add a new api endpoint
/v3/database
which uses this function to create a data export.
Resolved issues
Fixes: #2516