We have use case:
Clone (copy) schema with content into another app (immediately). New schema should have unique name
(and label
).
By using general API we can do that using steps (separate requests):
- Get
original
schema with fields
- Create
new
schema using original
fields
- Get
original
schema content
- Upsert
original
schema content bulk into new
schema
Is there another way to do it through our backend API?
Thats basically the the way you go. What would you like to improve?
I think idea of improvement could be just one endpoint like:
POST /apps/{appName}/schemas/{schemaName}/clone
with data:
appName
- destination of new schema
schemaName
- new schema name
copyContent
(boolean, optional)
It will be helpful to manage schema clone case using one endpoint instead of bunch of separate requests.
Yes, but I try to avoid doing long running operations in the backend.
1 Like