User story #5738
closedExport and import (create, update) Rule with all dependencies
Description
The API allows to get rules, but not with all the groups/directives/parameters used in them. So it's a real burden to import it back in one other Rudder instance.
The ideal scenario would be:
- I can "export" a Rule with all its context (directives, groups, parameters used in directives) and get a JSON file with all the content
- the export is a get "full" on the API, but there is also a "export" button on Rule screen
The "import" part is more tricky, because we have to ask the user how he wants to manage the create/update of the rules and all subparts:
- the import is available either with an API call or via a button on the Rules screen
- on import, look for a rule with the same name or the same UUID
- if none exists, propose to create. Else, ask if the user want to create a new one (with new name) of update the existing one
- also ask if the user want to also import exactly use Directives AND/OR Groups AND/OR parameters of the imported rules, or if he only want to update somes.
- ideally, the user see a diff for each part, so that he knows exactly what is different between the imported rules and the existing one, like what is shown in change request