Create site from xml

cancel
Showing results for 
Search instead for 
Did you mean: 
franciscoduarte
Member II

Create site from xml

Hello,

We are trying to separate all the business logic from our image. At this moment, we are creating the needed sites through bootstraping. We would like to make this external.

I've extracted our created site through this endpoint: http://localhost:8082/alfresco/s/api/sites/our-site/export

This exports a zip file which contains the our-site.xml with all the folders and rules created until now.

We would like to upload this xml file, through some rest api possibly, into a clean alfresco installation and make the site available with all the configuration provided.

Something like this with the content model: https://hub.alfresco.com/t5/alfresco-content-services-forum/register-custom-content-model-using-rest...

Would this be something achievable? If not, can you advise?

Thanks in advance,

Francisco Duarte

4 Replies
sanjaybandhniya
Intermediate

Re: Create site from xml

franciscoduarte
Member II

Re: Create site from xml

I will give it a try. thanks

franciscoduarte
Member II

Re: Create site from xml

Hello,

I tried this and it actually worked. All the folder and respective rules were created in the documentLibrary from the site I have created imeddiately before.

But now I have a different problem. I have one folder which has one rule triggered when a file enters that same folder. I know that rule is being triggered because a can see the logs from my custom code.

But in the end, I get a nodeRef not found error and the rule does nothing. Now, I'm sure the rule exists because what I said before and I can see the rule in Share, with that same UUID in the error which supposedly does not exists.

Here is the stacktrace: https://pastebin.com/SH3LpAFi

I do not understand what's happening. Could you help?

Best regards,

Francisco Duarte

franciscoduarte
Member II

Re: Create site from xml

I was doing something wrong. It is working now.