You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If namespaces are used as environments its challenging to copy data from one namespace to another without relying on export/import.
Ideal Solution
It would be nice if we provided a 'Copy Namespace API' that allows the user to duplicate all data from one namespace to a new or potentially existing one. More on the latter below.
Potential Structure
URL: POST /api/v1/namespaces/{sourceNamespace}/copy
Body:
target/target.key contains info about the destination namespace either to be created or existing. its an object to allow for future iteration (ie: maybe we add a name field allowing the new namespace to be created with key and name, by default name will match key)
conflict_strategy: options fail | overwrite , specifies what to do on conflict (only for existing namespaces) that is conflicts that occur from object key/id collision. Either we fail the operation or overwrite the target namespace. Default would be fail.
Etc
After this API existed we could then easily add the ability to copy namespaces in the UI
This would only work for relational backends as declarative backends are read-only
Search
I searched for other open and closed issues before opening this
Problem
If namespaces are used as environments its challenging to copy data from one namespace to another without relying on export/import.
Ideal Solution
It would be nice if we provided a 'Copy Namespace API' that allows the user to duplicate all data from one namespace to a new or potentially existing one. More on the latter below.
Potential Structure
URL:
POST /api/v1/namespaces/{sourceNamespace}/copy
Body:
Field Descriptions
target
/target.key
contains info about the destination namespace either to be created or existing. its an object to allow for future iteration (ie: maybe we add a name field allowing the new namespace to be created with key and name, by default name will match key)conflict_strategy
: optionsfail
|overwrite
, specifies what to do on conflict (only for existing namespaces) that is conflicts that occur from object key/id collision. Either we fail the operation or overwrite the target namespace. Default would befail
.Etc
Search
Additional Context
Example: https://api.permit.io/v2/redoc#tag/Environments/operation/copy_environment
FLI-847
The text was updated successfully, but these errors were encountered: