integreat-cms icon indicating copy to clipboard operation
integreat-cms copied to clipboard

Allow dynamic export of database objects

Open david-venhoff opened this issue 10 months ago • 2 comments

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


Pull Request Review Guidelines

david-venhoff avatar Apr 29 '24 14:04 david-venhoff