Hi, I would like to clone an entire space using Admin Api. Reading the Documentation I found that it is possible but I couldn’t found any mutation in Builder GraphQl Playground.
Hi @carloshsf ! Thanks for the question!
So, there isnt a cloneSpace mutation per se, but there are ways to effectively clone a space. That being said, I personally find it easier to actually use our CLI tool for something like this.
Essentially you would use builder import
to copy down your space
And then builder create
to create a new space from that import
Try that out and see if that works for you!
Hi @TimG , thanks for the response, I installed the sdk and it work’s great! The typing support help a lot!
I’m managing to create Spaces and Models, but I would really like to be able to duplicate one or more pages.
Initially I was imagining that by duplicating a Space, all its information would be duplicated as well. Is there a way to do this?
Hey @carloshsf When duplicating a space using builder import
and builder create
as outlined in the docs linked above it should duplicate the content entries as well as the models, settings, etc
Was that how you duplicated the space? Or did you use another flow?
Also worth noting, if you only have a few content entries you can manually copy any content across spaces by selecting Copy to another space
from the drop down if you click the three dots in the upper right corner.
Hi, @TimG !
To what i have understood and from what i have seen by testing the CLI
, the space can only be imported (by downloading the data from one space
in .json format to your local filesystem) and then create a new space with the same imported data you have just downloaded from the space.
And that is perfectly fine the first time, when you create the new space.
But after that can the data in the already existing space be some kind of synced with the space from which it was initially created or just updated somehow, because otherwise the newly created space will always generate new API key for the space and i will have to change this key in my project’s env files… and other things as well ?
The CLI you suggested is great, but it has only two main commands - import
and create
.